gentics / mesh-ui

Gentics Mesh UI
https://getmesh.io
Apache License 2.0
23 stars 27 forks source link

HTML field attaches empty paragraphs #308

Open gosia-cieslewicz opened 4 years ago

gosia-cieslewicz commented 4 years ago

Gentics Mesh Version

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>
Jotschi commented 4 years ago

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

niklaswoehler commented 4 years ago

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

cschockaert commented 4 years ago

Any update to get a raw multiline string editing ?

darioseidl commented 4 years ago

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.

atanaskulin commented 4 years ago

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!

iksent commented 1 year ago

matchVisual helped me to fix this issue:

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