Sangeeta
Sangeeta

Reputation: 388

setting <P> as newline tag in umbraco7 tinymce

I've run into an issue where Rich text editor in umbraco enters <Br> on every press of enter. However in older version it was <p> tag. I want to change this behaviour of tinymce editor in umbraco7. I've tried various options like : 1) Setting following in tinymceConfig.config

<customConfig>
    <config key="force_br_newlines">FALSE</config>
    <config key="force_p_newlines">TRUE</config>             
  </customConfig>

2) edited tinymce.min.js located at /umbraco/lib/tinymce/tinymce.min.js

But this had no effect and I still get <Br> on pressing enter in rich text editor.

Has any one run into similar issue before and found solution to control this in umbraco 7?

Upvotes: 1

Views: 469

Answers (2)

DanKodi
DanKodi

Reputation: 3640

Add the following in customConfig element

<config key="forced_root_block">false</config>
<config key="convert_newlines_to_brs">true</config>
<config key="force_br_newlines">true</config>

Upvotes: 1

Michael Fromin
Michael Fromin

Reputation: 13736

Assuming you are using TinyMCE 4 the setting you want is called forced_root_block:

https://www.tinymce.com/docs/configure/content-filtering/#forced_root_block

The appropriate value for the setting is not true or false but a string containing the block element to use. For example:

forced_root_block : 'p' 

You would have to ask someone with familiarity with Umbraco the exact format to use in their configuration file.

Upvotes: 0

Related Questions