Files
webstudio/apps
Bogdan Chadkin b80b4c21f7 Remove paragraphs from text editor (#514)
Ref https://github.com/webstudio-is/webstudio-designer/issues/487

Before lexical created paragraphs when press enter which we tried to
visually represent as line break by removing margins and converted to
line break to instances.

This could lead to a few issues.

1. When paragraph block is inside `<a>` nothing can be typed in the
beginning and in the end of paragraph

2. Paragraphs can be styled by users which can break text editor
visually

Here I overwritten default Enter command and insert line break instead
of paragraph. To protect from external sources like paste from clipboard
added transform to merge all paragraphs if move than one.

We will still have one paragraph in the root with display: inline style.
Though it will cause less damage to editor with user styles.
2022-11-27 13:33:12 +03:00
..