How to Prevent TinyMCE from Wrapping MODX Tags with <p>?

Hi there.
I’m using TinyMCE Rich Text Editor, I really like it but it wraps MODX tags like [[$chunk?]] or [[+img.2]] with <p> tags, adding unnecessary code to my pages.
Is there a way to prevent that ?

Thanks a lot

What exactly do you mean by that?
That when you put the MODX tag on its own line, it gets put in a paragraph tag like every other line?


Maybe this helps if you want to remove the <p> tag for all the content:

If you want to remove only the <p> tags around MODX tags, then you probably have to write a custom plugin for that.

1 Like

Hi @halftrainedharry and thanks a lot!
It seems like {"forced_root_block" : false} did the trick.

Do you have any preference between TinyMCE and CKEditor ? Which one is recommended by Modx ?