Jump to content
neviom

Ignorovanie Hml5 Atribútov

Recommended Posts

Zdravím,

 

snažím sa pridať do cms kus kódu, ale po uložení sa niektoré atribúty úplne vymažu.

 

Toto sa snažím vložiť:

<ul class="nav nav-tabs" role="tablist">
    <li role="presentation" class="active"><a href="#home" aria-controls="home" role="tab" data-toggle="tab">Home</a></li>
    <li role="presentation"><a href="#profile" aria-controls="profile" role="tab" data-toggle="tab">Profile</a></li>
    <li role="presentation"><a href="#messages" aria-controls="messages" role="tab" data-toggle="tab">Messages</a></li>
    <li role="presentation"><a href="#settings" aria-controls="settings" role="tab" data-toggle="tab">Settings</a></li>
  </ul>

  <!-- Tab panes -->
  <div class="tab-content">
    <div role="tabpanel" class="tab-pane active" id="home">...</div>
    <div role="tabpanel" class="tab-pane" id="profile">...</div>
    <div role="tabpanel" class="tab-pane" id="messages">...</div>
    <div role="tabpanel" class="tab-pane" id="settings">...</div>
  </div>

Po uložení mi zostane len toto:

<!-- Nav tabs -->
<ul class="nav nav-tabs">
	<li class="active"><a href="#home">Home</a></li>
	<li><a href="#profile">Profile</a></li>
	<li><a href="#messages">Messages</a></li>
	<li><a href="#settings">Settings</a></li>
</ul>
<!-- Tab panes -->
<div class="tab-content">
	<div class="tab-pane active" id="home">...</div>
	<div class="tab-pane" id="profile">...</div>
	<div class="tab-pane" id="messages">...</div>
	<div class="tab-pane" id="settings">...</div>
</div>

Nejaké tipy ako tomuto defaultnému správaniu zabrániť?

Share this post


Link to post
Share on other sites

Je potrebne upravit nastavenie TinyMCE editora, ktory pri ukladani tieto atributy vyfiltruje a do databazy sa ulozia uz bez nich.

 

Subor, ktory treba upravit: /js/admin/tinymce.inc.js

Prirucka: https://www.tinymce.com/docs/configure/

 

Iba tipujem, ale zrejme potrebujes pridat:

 

allow_html_in_named_anchor: true

Edited by Caleydon

Share this post


Link to post
Share on other sites

Je potrebne upravit nastavenie TinyMCE editora, ktory pri ukladani tieto atributy vyfiltruje a do databazy sa ulozia uz bez nich.

 

Subor, ktory treba upravit: /js/admin/tinymce.inc.js

Prirucka: https://www.tinymce.com/docs/configure/

 

Iba tipujem, ale zrejme potrebujes pridat:

 

Ďakujem za super tip. 

 

 

 

allow_html_in_named_anchor: true

 

Žiadná zmena nenastala, ani po preštudovaní tinyMCE a po úprave js súboru sa zmena vôbec neprejavila. 

extended_valid_elements : "@[class|name|id|role|aria-controls|data-toggle]",
valid_children : "+*[*]",
valid_elements: "*[*]",

Skúšal som rôzne kombinície, pridával som to aj do valid_elements a nič. Upravujem to vo správnom súbore, lebo keď pridám:

toolbar2: "code",

pribudne nová položka v toolbare na druhom riadku.

 

Nejaké návrhy, kde robím chybu?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More