[Expo-tech] Edit This Page - TinyMCE reformats everything

Philip Sargent (Gmail) philip.sargent at gmail.com
Tue Apr 28 20:47:18 BST 2020


re a conversation I was having with Wookey about using "Edit this page" as a
mainstream way of editing the website.

 

recap: 

The Problem is that the TinyMCE plugin insists on entirely reformatting the
HTML,

so the "differences detector" in git is unable to clearly show that, e.g., a
comma has been deleted because

as far as git is concerned, every single line has been changed.

 

Investigation:

It appears that TinyMCE creates a valid DOM internally, edits that, and
outputs it. 

So it will always produce pedantically valid HTML and will always screw up
the input layout.

The authors are quite unapologetic about this:

http://archive.tinymce.com/forum/viewtopic.php?id=26030

so this will never be changed and is not avoidable.

 

Long-term fix:

When we edit HTML pages and then push them, we change the git import
procedure to reformat the page to be pedantically clean HTML in the format
that TinyMCE likes. Then any edits will appear as small edits not as
everything changing.

 

Philip

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wookware.org/pipermail/expo-tech/attachments/20200428/2abc2aad/attachment.htm>


More information about the Expo-tech mailing list