开发者

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

开发者 https://www.devze.com 2023-02-05 14:09 出处:网络
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.

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 cl开发者_JAVA百科oser 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,
0

精彩评论

暂无评论...
验证码 换一张
取 消