Prevent CKEditor 4 from wrapping [shortcode] in paragraphs

Viewed 30

I have CKEditor 4 implemented in a custom development, and I'm having the problem that it wraps the [shortcodes] in paragraphs.

This makes the browser try to keep HTML semantic and generate empty paragraphs.

I need that when inserting

[shortcode-one] text [/ shortcode-one] [shortcode foo = "bar"]

it doesn't end up being

<p>[shortcode-one] text [/ shortcode-one] [shortcode foo = "bar"]</p>

I read the CKEditor 4 documentation and did some testing but no luck.

Also, ckeditor adds empty paragraphs, and we want to keep the ENTER_P functionality but get rid of the

<p>&nbsp;</p>

Any idea where the solution might be?

Thanks!

0 Answers
Related