codex-team/editor.js

An empty block is added in readOnly mode on top

Open

#2613 aperta il 12 feb 2024

Vedi su GitHub
 (3 commenti) (6 reazioni) (0 assegnatari)TypeScript (1985 fork)batch import
almost donebuggood first issue

Metriche repository

Star
 (26.602 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

After the update to 2.29.0 in readonly mode there is a empty block added with an invisible (opacity: 0) placeholder text. The empty line is breaking the layout.

I temporarily fixed it with CSS:

.ce-paragraph[data-placeholder][contenteditable="false"]:empty {
  display: none;
}

Expected behavior: No additional line on top should be rendered, like in v2.28.0 in readOnly mode.

Screenshots: image

Device, Browser, OS: Macbook, Chrome, MacOS

Editor.js version: 2.29.0

Guida contributor