[Expo-tech] Edit This Page - TinyMCE reformats everything
Philip Sargent (Gmail)
philip.sargent at gmail.com
Tue Apr 28 20:50:12 BST 2020
Loads of people have complained about this.
https://drupal.stackexchange.com/questions/49131/how-can-i-get-my-wysiwyg-ed
itor-to-stop-ing-up-my-html
Drupal has some kludges for this sort of thing:
https://www.drupal.org/project/wysiwyg_linebreaks
Not sure we want to go in that direction.
From: Philip Sargent (Gmail) [mailto:philip.sargent at gmail.com]
Sent: 28 April 2020 20:47
To: expo-tech at lists.wookware.org
Subject: Edit This Page - TinyMCE reformats everything
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/dac181b1/attachment.htm>
More information about the Expo-tech
mailing list