V
V
Vadim2014-01-31 05:45:13
TinyMCE
Vadim, 2014-01-31 05:45:13

TinyMCE, how to disable wrapping of a given tag?

The need for a tag was needed:
<component data-name=""></component>
To process it, I had to write a plugin:

editor.on('preInit', function() {
        editor.schema.addValidElements('component');
        editor.parser.addNodeFilter('component', function(nodes,name) { ... }
        ...
}

Now the component tag is processed as it should: in the editor as a picture, in the source code as a code.
The problem is that the component tag is wrapped in p tags .
<p><component data-name=""></component></p>
How to disable wrapping of this tag?
Thank you!

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question