2

I am struggling with TinyMCE and custom tags. We are building a custom CMS that is using the TinyMCE WYSIWYG editor. This are my settings:

 tinyMCE.init({ // General options mode: "textareas", width: "200", theme: "advanced", cleanup_on_startup: false, trim_span_elements: false, verify_html: false, cleanup: false, convert_urls: false, ... 

So, in one page I have to add this tag through the source editor:

 <gcse:searchresults-only queryParameterName="search"></gcse:searchresults-only> 

but, the editor is stripping it. I tried adding this rules:

extended_valid_elements: "gcse:searchresults-only[*]", custom_elements: "gcse:searchresults-only" 

and it was possible to add the tag, but if it's not nested in any other tag. If I wrap that tag in a div element, it did strip it (the gcse tag) leaving the div empty.

Question: how can I disable TinyMCE from stripping ANY of the tags?

Thanks.

1 Answer 1

0

Disabling the tinymce cleanup isn't possible since version 3.4. You will have to set valid_elements and valid_children accoring to your needs.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.