views:

311

answers:

2

My application features a CMS for editing Django templates.

Whenever I type something like

{% sometag %}

TinyMCE will actually store

{%<span>sometag</span>%}

Is there any way to prevent TinyMCE from doing this?

+1  A: 

Try opening the HTML view and adding the code from there. That should stop TinyMCE from changing anything.

Sam152
I was hoping for a better solution...otherwise, why use TinyMCE at all?
ראובן
+1  A: 

Ok! I got it. The elements were only being added when I pasted content. And there's a TinyMCE initialization setting to stop this

         'paste_remove_spans': True,
ראובן