Skip to content

[4.1] problems with code format in tinymce #37863

Answered by brianteeman
N6REJ asked this question in Q&A
Discussion options

You must be logged in to vote

This is the intended and expectd behaviour of tinymce.

Preserving white space in a rich text editor will never work. Just think about it, it would need to have some form of AI to figure out how the current document is formatted with white space and depending on that format apply the same indentation to new contents of the same type or it will be completely random behavior existing contents would be indented for a while until you modify it.

So it's better to just normalize the whitespace/formatting so that it will always be produced in the same way. We do that by removing all white space before after block elements and some whitespace that is redundant then re-apply line feeds before/afte…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by N6REJ
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants