[Beta]: Read-only editor is still an editable region: a click focuses it and right-click offers Paste
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 56/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- react, typescript
- Área
- accessibility, frontend
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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
- Lenguaje dominante
- TypeScript
- Estrellas
- 16.6k
- Forks
- 993
- Merge medio
- 20 h 2 min
- PR fusionados (30 d)
- 62
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de udecode/plate
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día
-
[Beta]: After Enter saves an edited link URL, the link toolbar stays hidden while the caret is in the linkPosiblemente ocupada @zbeyens la tomó hace 3 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
udecode/plate#5314 · 1 comentario · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
[Beta]: The docs Demo example page starts with an empty editorPosiblemente ocupada @natamox la tomó hace 4 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
udecode/plate#5308 · 1 asignado ·
Los mantenedores suelen responder en 1 día
Todos los issues de udecode/plate
Issues similares
-
Replace discontinued crypto-js in the themePosiblemente ocupada @aelmanaa la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
PaloAltoNetworks/docusaurus-openapi-docs#1689 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
solana-foundation/solana-web3.js#4015 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
formatSearchQuery drops the :present modifier, so `email:present=true` is sent as `email=true`Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día
-
documentation
Dificultad 1/5 1-3 horas Aptitud para principiantes 90/100
ivopogace/opencode-courier#422 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
chapel-lang/chapel-vscode#158 ·
Los mantenedores suelen responder en 1 día