开发者

edit html in tinymce does not convert \n to line breaks

开发者 https://www.devze.com 2023-03-28 15:49 出处:网络
When i set the content to \'a\\nb\' in tinymce, the edit in html shows \'ab\', and when i set it again, thr开发者_StackOverflow社区ough console. it shows as

When i set the content to 'a\nb' in tinymce, the edit in html shows 'ab', and when i set it again, thr开发者_StackOverflow社区ough console. it shows as

a
b

why could this be happening? and how to fix it?


This might be because of of the cleanup functionality of tinymce. Using html will yield html without tinymce internal elements/attributs and cleaned content.

0

精彩评论

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