[Beta]: Read-only editor is still an editable region: a click focuses it and right-click offers Paste
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 56/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- react, typescript
- Ambito
- accessibility, frontend
Direzione di ricerca
Start with packages/plitejs/src/react/components/editable.tsx at the contentEditable and read-only handling, then inspect apps/www/src/registry/components/editor/editor.tsx and html-export.tsx for the affected demos. Compare the rendered attributes and focus behavior with the Slate read-only example. Done means read-only content remains selectable and copyable without focusing as an editable region, showing a caret, or offering Cut and Paste.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Testing lane
- Repository:
udecode/plate - Branch:
next - Release channel: Beta
- Exact commit/package version:
7f98d46ed5for the agent's 2026-10-21 runs,NOT_ENOUGH_INFOfor the others
Summary
A read-only editor on Beta still acts as an editable region. A click moves focus into it, and right-click shows the editing menu with Cut, Paste and Paste and Match Style. In the HTML export demo the click also shows an insertion caret. No input changes the text, so the content stays read-only, but the editor looks like one you can type in. Slate's read-only example and the Slate to HTML demo on platejs.org show read-only content as static text.
Reproduction
Repro 1: /examples/plite/read-only, Chrome
- Open https://beta.platejs.org/examples/plite/read-only.
- Right-click
theinThis example shows what happens when the Editor is set to readOnly, it is not editable. - With text on the clipboard, choose Paste. Right-click
theagain and choose Paste and Match Style. - Click the text.
The menu in step 2 lists Cut, Copy, Paste and Paste and Match Style, with Undo and Redo grayed out. Paste and Paste and Match Style leave the text as it was. After step 4 focus is on the editor root, which reads contenteditable="true" and aria-readonly="true". On https://www.slatejs.org/examples/read-only the menu has Look Up, Copy and Search Google, with no Cut or Paste. After a click there the editor reads contenteditable="false" and focus stays on body.
Repro 2: /docs/examples/html-export, Chrome
- Open https://beta.platejs.org/docs/examples/html-export. The demo's preview frame is /view/html-export.
- In the left
Editorpane, which is read-only, click the end ofHeading 1. - Type
QandA, then press Backspace.
After step 2 focus moves into the editor and a caret shows after Heading 1. After step 3 the text has not changed and the caret is still there. The editor root reads contenteditable="true" and aria-readonly="true", with a collapsed selection after Heading 1. On https://platejs.org/docs/examples/slate-to-html (preview frame /view/slate-to-html) the left Editor pane is read-only too, but it reads contenteditable="false". The same click shows no caret, focus stays on body, and typing changes nothing.
Expected
A read-only editor is static text, as on slatejs.org/examples/read-only and platejs.org/docs/examples/slate-to-html. A click does not move focus into it or show a caret, and right-click shows the reading menu without Cut or Paste. Selecting and copying text keeps working, as it does today in Beta's and Slate's read-only examples. natamox checked both pages by hand and counts the editable state on Beta as a bug.
Actual
Beta keeps the read-only editor root contenteditable="true" and only adds aria-readonly="true". A click focuses it, the HTML export demo shows a caret, and right-click offers Cut, Paste and Paste and Match Style. Typing, Paste and Paste and Match Style change nothing.
Environment
- Exact
nextcommit/Beta package version:7f98d46ed5for the agent's 2026-10-21 runs,NOT_ENOUGH_INFOfor the others. - Repro 1: an agent drove desktop Chrome on macOS on 2026-10-20 (PT) and recorded the menus and both Paste runs. That Chrome version was not recorded. An agent read back the attributes and focus in Chromium 152 in an agent's browser on 2026-10-21 (PT). natamox confirmed the editable region and the Paste menu by hand in Chrome on 2026-10-21 (PT).
- Repro 2: an agent ran the steps in Chromium 152 in an agent's browser on 2026-10-21 (PT). natamox confirmed the caret and the ignored typing by hand in Chrome the same day.
- The Chrome version and OS of the hand checks:
NOT_ENOUGH_INFO.
Caveat
- From a reading of the code on
next, not confirmed by a fix: Plite'sEditablealways renderscontentEditable(packages/plitejs/src/react/components/editable.tsx:531), and read-only only addsaria-readonly(:516). Its default style hides the caret withcaretColor: 'transparent'when read-only (:553). Plate's registryEditorpassesdisableDefaultStyles(apps/www/src/registry/components/editor/editor.tsx:132), which drops that style. The HTML export pane renders<EditorRoot readOnly>with thatEditor(apps/www/src/registry/components/editor/html-export.tsx:97). By this reading, that is why repro 2 shows a caret. Slate'sEditablewritescontentEditable={!readOnly}. - The code comment beside the caret style says read-only editors stay selectable without a caret, so the editable root may be on purpose. Nobody has checked.
- Firefox notes for the HTML export pane only say that typing does nothing, which is the same read-only design. Whether Firefox shows the caret was not recorded.
- #5250 is a different problem: edits get through a read-only inline element. Here the content stays read-only, but the editor still presents as editable.
Evidence
- Repro 1, slides: 12 seconds, Beta beside slatejs.org, built from frames of the agent's Chrome recording and from the agent's readback. From 0:03 the two right-click menus: Beta's has Cut, Paste and Paste and Match Style, with Undo and Redo grayed out, and Slate's has Look Up, Copy and Search, with no Paste. From 0:08 the readback after a click in the text: Beta reads
contenteditable="true"andaria-readonly="true"with focus on the editor root, and Slate readscontenteditable="false"with focus onbody. - Repro 1, menu recording: the agent's Chrome screen recording, 20 seconds, with English captions. The browser's profile button is blurred. Slate's menu shows from 0:01. Beta's menu shows from 0:06. Paste is chosen at 0:10 and Paste and Match Style at 0:17, and the text stays the same both times.
- Repro 2, slides: 15 seconds, Beta beside platejs.org, built from the agent's screenshots. At 0:03 the click: Beta shows a caret after
Heading 1, and platejs.org shows none. At 0:07, after the typing, the text is unchanged on both sites and Beta's caret is still there. From 0:11 the readback: Beta readscontenteditable="true"andaria-readonly="true"with focus on the editor root, and platejs.org readscontenteditable="false"with focus onbody.
Repro 1 — Chrome, /examples/plite/read-only
https://github.com/user-attachments/assets/a21163df-3363-4a84-b48d-3389e26749e0
Repro 1 — Chrome, /examples/plite/read-only (menu recording)
https://github.com/user-attachments/assets/a9f67d47-d011-41c2-9274-6ad72b2d0036
Repro 2 — Chromium, /docs/examples/html-export
https://github.com/user-attachments/assets/89af4709-5f5f-43bf-91e4-44e138c02188
- Lingua principale
- TypeScript
- Stelle
- 16.6k
- Fork
- 993
- Merge medio
- 20h 2m
- PR unite (30g)
- 62
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di udecode/plate
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
I maintainer di solito rispondono entro 1 giorno
-
[Beta]: After Enter saves an edited link URL, the link toolbar stays hidden while the caret is in the linkForse già presa @zbeyens l’ha presa 5 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
udecode/plate#5314 · 1 commento · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
[Beta]: The docs Demo example page starts with an empty editorForse già presa @natamox l’ha presa 6 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
udecode/plate#5308 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di udecode/plate
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
ehmpathy/rhachet-roles-ehmpathy#1231 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
Equal-Vote/bettervoting#1754 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
Doist/todoist-sdk-typescript#740 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 62/100
privatenumber/cleye#47 ·
-
spec-feedback
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100