0

I have problem with WYSIWYG editor. It adds paragraph tag automatically on some places that I don't need paragraphs. Is there any option to turn off this setting in dotCMS or any other option to solve this problem?

Thank you!

snoopy_15
  • 1,273
  • 4
  • 18
  • 31

2 Answers2

2

You can configure TinyMCE to do that. See:

http://www.tinymce.com/wiki.php/Configuration:forced_root_block

In dotCMS, will need to override the default tinymce config via a plugin: http://dotcms.com/docs/latest/controlling-tinymce-wysiwyg

wezell
  • 573
  • 3
  • 7
0

Just in case if you don't want to go for tinymce plugin overriding, you can write a simple parser or a regex-matcher(for better performance) using a viewtool. This will take the WYSIWYG field value(code equivalent of it) as input and return your desired value after chopping off the paragraph tag.

This can give you a good control over the value generated by WYSIWYG field since you are sure about the wrapper tag i. e. paragraph tag

Karma-yogi
  • 138
  • 11