This pull request addresses an issue where spaces were removed from Korean text pasted into the rich text field. The problem was caused by the cleanHtmlEmptyElements plugin from Plate, which removes all empty elements, including <span> elements used by MS Word to represent spaces in Korean text.
Content support ticket: https://contentful.atlassian.net/browse/ZEND-5011
Problem
MS Word adds <span> elements for each Korean word, and spaces are represented by empty <span> elements. The cleanHtmlEmptyElements plugin removed these empty <span> elements, causing spaces to be removed in Korean text when pasted into the rich text field.
Solution
We have customized the plugin to ignore empty <span> elements, ensuring that spaces in Korean text are preserved. This change means we no longer rely on the cleanHtmlEmptyElements plugin from Plate.
Additional Changes
Added a test to ensure this behavior is maintained in the future.
Summary
This pull request addresses an issue where spaces were removed from Korean text pasted into the rich text field. The problem was caused by the
cleanHtmlEmptyElements
plugin from Plate, which removes all empty elements, including<span>
elements used by MS Word to represent spaces in Korean text. Content support ticket: https://contentful.atlassian.net/browse/ZEND-5011Problem
MS Word adds
<span>
elements for each Korean word, and spaces are represented by empty<span>
elements. ThecleanHtmlEmptyElements
plugin removed these empty<span>
elements, causing spaces to be removed in Korean text when pasted into the rich text field.Solution
We have customized the plugin to ignore empty
<span>
elements, ensuring that spaces in Korean text are preserved. This change means we no longer rely on thecleanHtmlEmptyElements
plugin from Plate.Additional Changes
Added a test to ensure this behavior is maintained in the future.