javascript - Tinymce bug? <br> tags are removed when viewing source -


in tinymce can <br> tag on enter instead of <p>&nbsp;</p> applying following configuration:

forced_root_block : false 

this worked fine in version 4.5.1 of tinymce. switched version 4.5.7 , noticed bug occurred when opening source modal: if end <br> tags, last 2 <br> tags stripped off. tried fixing setting additional options:

        remove_trailing_brs: false,         remove_linebreaks : false 

but no avail. tried switching newer version of tinymce (4.6.5) same thing kept happening.

i found hacky solution: keep <br> tags @ end - can open source modal , add:

<br><br><br><br><p>&nbsp;</p> 

just close element <br> , linebreaks stay in place. not solution problem. because not want force clients use source modal.

does know how can keep using <br> on enter without them being cut off when opening source modal?

here codepen example:

https://codepen.io/anon/pen/wqyope

if hit enter 4 times - 2 <br> tags in code editor


Comments

Popular posts from this blog

PHP and MySQL WP -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

go - golang pprof for c library code -