Reputation: 233
I've been searching this for hours, i've even seen this question here, but it doesn't seem to work for me: TinyMce Allow all Html tag
I want to make it possible to write links like
<a href="www.google.com">Google</a>
directly in the editor. I'm using
valid_elements : "*[*]",
but it still does not work. What can I do?
Upvotes: 1
Views: 2942
Reputation: 50840
I am not sure, but the setting [] does not seem to be enough. You will also have a look at the valid_children setting.
Here is what i use (be aware to set the attributes too):
valid_elements: "@[id|class|title|style|onmouseover]," +
"a[name|href|target|title|alt]," +
"#p,blockquote,-ol,-ul,-li,br,img[src|height|width],-sub,-sup,-b,-i,-u," +
"-span[data-mce-type],hr",
valid_children: "body[p|ol|ul]" +
",p[a|span|b|i|u|sup|sub|img|hr|#text]" +
",span[p|a|b|i|u|sup|sub|img|#text]" +
",a[span|b|i|u|sup|sub|img|#text]" +
",b[span|a|i|u|sup|sub|img|#text]" +
",i[span|a|b|u|sup|sub|img|#text]" +
",sup[span|a|i|b|u|sub|img|#text]" +
",sub[span|a|i|b|u|sup|img|#text]" +
",li[span|a|b|i|u|sup|sub|img|ol|ul|#text]" +
",ol[li]" +
",ul[li]",
Upvotes: 1