It seems that whenever clipboard content that includes
tags (and other HTML elements) is pasted into the text area, it's not pasted in as plain text. After a save, HTML has not been stripped out, and a bunch of other formatting errors (such as markdown characters being /escaped) come up.
EDIT: The below does well for stripping out HTML tags, but, for some reason removes links identified as URLs, even though they aren't wrapped in any kind of <a> tag in the .txt file. See temp fix #2 below
for others having this problem, i'm patching this in kirby's config with:
Everything seems to be working as normal, but the problem persists. I haven't dug into it's forcePlainText option, but it either isn't doing anything or is not doing what we'd expect.
It seems that whenever clipboard content that includes
I see this in wysiwyg.js:
But neither seem to be happening.
This seems to be an issue with the underlying MediumEditor component (we're using version 5.9 here).
This could probably be fixed by upgrading to a newer version of MediumEditor. Unfortunately, we're too busy to do it right now.
I will keep this issue open though, and I'll come back to it at a later date.
EDIT: The below does well for stripping out HTML tags, but, for some reason removes links identified as URLs, even though they aren't wrapped in any kind of
<a>
tag in the .txt file. See temp fix #2 belowfor others having this problem, i'm patching this in kirby's config with:
where 'problem fields' is a (annoyingly, manually) defined list of all of the fields that I have across blueprints that use WYSIWYG
using both panel.page.sort because, currently, the update hook doesn't fire if the page is visible, and sort fires instead
@JonasDoebertin Thanks for all of the updates!
I replaced medium-editor-5.9.0.min.js with the latest medium-editor.js from https://github.com/yabwe/medium-editor
Everything seems to be working as normal, but the problem persists. I haven't dug into it's forcePlainText option, but it either isn't doing anything or is not doing what we'd expect.
Adding this regex replace after line 4985:
knocks out all
<div>
tags.