简体   繁体   中英

How can i force Tinymce to wrap all content inside paragraphs?

I initialize tinymce using forced_root_block: 'p', (this usually works fine). The problem i am facing seems to be a special case. I use Firefox. When i press ctrl+a and when all contetn is marked press one single letter (in example 'd') a closer inspection using firbug shows

<body ...>d</body>

If i push a second letter the editors content gets wrapped into a paragraph.

I need to style the editors content using css and paragraphs, but when there is no paragraph i am not able to style the content and the user could get irritated. How can i solve this issue?

Add this to your tinymce config:

forced_root_block : "p",
force_br_newlines : false,
force_p_newlines : true,

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM