mirror of
https://github.com/webstudio-is/webstudio.git
synced 2026-11-07 20:44:05 +09:00
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.