neviom Posted February 8, 2016 Share Posted February 8, 2016 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ť? Link to comment Share on other sites More sharing options...
Caleydon Posted February 8, 2016 Share Posted February 8, 2016 (edited) 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 February 8, 2016 by Caleydon (see edit history) Link to comment Share on other sites More sharing options...
neviom Posted February 8, 2016 Author Share Posted February 8, 2016 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? Link to comment Share on other sites More sharing options...
javad2140 Posted June 5, 2016 Share Posted June 5, 2016 Can Help In ? https://www.prestashop.com/forums/topic/531114-tinymce-inserting-code/ Link to comment Share on other sites More sharing options...
JAKCRABBIT Posted July 26, 2016 Share Posted July 26, 2016 Administrace - Konfigurace - Hlavní - Použít knihovnu HTMLPurifier - NE Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now