mesh-ui icon indicating copy to clipboard operation
mesh-ui copied to clipboard

HTML field attaches empty paragraphs

Open gosia-cieslewicz opened this issue 5 years ago • 6 comments

Gentics Mesh Version

  • v1.3.2

Problem

When using WYSIWYG editor in HTML fields, empty p tags are attached before Headings & Lists

Steps to reproduce

  1. In CMS: Open node with HTML field
  2. Add text including Headings & Lists
  3. Save and Publish changes
  4. Open the same node and/or the page rendering text from CMS

Expected behaviour

Rendered HTML has the same structure as text in WYSIWYG Editor

Actual behaviour

  1. Additional whitespace is added in WYSIWYG Editor
  2. Empty p tags are attached before Headings & Lists in rendered HTML:
<p>
  <br>
</p>

gosia-cieslewicz avatar Feb 18 '20 09:02 gosia-cieslewicz

Thank you for the report. This is a UI issue. I'm moving the issue to mesh-ui.

Jotschi avatar Feb 18 '20 12:02 Jotschi

We've experienced this issue, too. It's quite tricky to properly handle content when formatting and updating it.

niklaswoehler avatar Feb 21 '20 13:02 niklaswoehler

Any update to get a raw multiline string editing ?

cschockaert avatar Feb 24 '20 15:02 cschockaert

Possibly related: https://github.com/quilljs/quill/issues/745

In quill (before version 2.0) there is a matchVisual that controls how HTML is generated when pasting whitespace. Setting it to false prevents quill from adding additional whitespace. In quill 2.0 the "visual" matching was removed completely.

darioseidl avatar Apr 23 '20 12:04 darioseidl

Hello mesh-ui Team,

is there any Update or a plan when this Issue is gonna be fixed?

This is very important for us and we will be very glad to hear, how long it takes to fix the problem? Please contact us!

Best Regards!

atanaskulin avatar May 26 '20 14:05 atanaskulin

matchVisual helped me to fix this issue:

modules={{
  ....
  clipboard: {
    matchVisual: false,
  },
}}

iksent avatar Apr 21 '23 23:04 iksent