[Beta]: In the Plite forced-layout example, the empty title shows no placeholder after the whole document is deleted
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 78/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- react, typescript
Direzione di ricerca
Leggi apps/www/src/app/(app)/examples/plite/_examples/forced-layout.tsx, in particolare la configurazione del titolo e del testo segnaposto dell’editor, insieme a packages/plitejs/src/react/editable/root-selector-sources.ts per capire quando compaiono i segnaposto. Riproduci il problema selezionando tutto ed eliminando il contenuto dell’esempio forced-layout. Modifica l’esempio in modo che un titolo vuoto sia identificato visibilmente, quindi conferma che l’indicazione del titolo compare dopo l’eliminazione.
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:
NOT_ENOUGH_INFO
Summary
On https://beta.platejs.org/examples/plite/forced-layout, after Select All and Backspace, the title and the paragraph are both empty, and nothing on the page shows where the title goes. The example sets placeholder="Enter a title…" on its editor, but that placeholder never appears. Slate's forced-layout example puts the text Untitled back instead.
Reproduction
Repro 1: delete everything, Chromium
An agent ran this on the live Beta in headless Chromium 149 (Playwright) on 2026-10-24 and recorded it.
- Open https://beta.platejs.org/examples/plite/forced-layout with its default content.
- Click in the body paragraph.
- Press ⌘A, then Backspace.
Result: the editor holds H2 "" and P "". The text Enter a title is nowhere in the editor, as text, as a placeholder or data-placeholder attribute, or as CSS content.
Repro 2: Safari
An agent in Safari 27.0.1 on 2026-10-20 (PT) saw the same empty title, while Slate's example filled in Untitled. natamox retested by hand on 2026-10-20 (PT) and saw no placeholder.
Expected
The empty title shows the placeholder the example sets, Enter a title…. Slate's example fills in Untitled instead. Either one tells the reader where the title goes.
Actual
Both blocks are empty, and nothing marks the title.
Environment
- Exact
nextcommit/Beta package version:NOT_ENOUGH_INFO. The page does not show its build. - Repro 1: Chromium 149.0.7827.55 (Playwright, headless) on macOS, 2026-10-24.
- Repro 2: Safari 27.0.1 on macOS, 2026-10-20 (PT).
- Not tried in Firefox or on a phone.
Caveat
From a reading of the code on next a32ed63c78:
- The editor shows its placeholder only when the document has exactly one block whose text is empty.
usePlaceholderValueinpackages/plitejs/src/react/editable/root-selector-sources.ts:197-211checksstate.nodes.children().length === 1. - The example's schema always keeps a title and a paragraph (
apps/www/src/app/(app)/examples/plite/_examples/forced-layout.tsx:16-30). An emptied document still has two blocks, so the placeholder set atforced-layout.tsx:68can never show. - So the fix likely belongs in the example, such as a placeholder on the title itself or
Untitledas in Slate, not in Plite core. Not tried as a code change.
Evidence
- Repro 1: the agent's recording, 0:19, real time, with the step panel on the right. The dark box at the bottom left is drawn by the test script. It lists the top-level blocks and says whether
Enter a title…is in the editor. ⌘A and Backspace are at 0:05, and the result shows from 0:10.
Repro 1 — Chromium 149, /examples/plite/forced-layout
https://github.com/user-attachments/assets/9053b06a-9d21-419a-bd54-1772e09935d4
Related
- #5297 is another bug in this example, with Enter and Backspace inside the title.
- Lingua principale
- TypeScript
- Stelle
- 16.6k
- Fork
- 993
- Merge medio
- 20h 1m
- PR unite (30g)
- 61
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 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 oggi. 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 1 giorno 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
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di udecode/plate
Issue simili
-
New icon: `filter-clear`Apertacalcite-ui-icons enhancement impact - p3 - not time sensitive needs triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
Esri/calcite-design-system#15467 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
diegosouzapw/OmniRoute#18390 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 86/100
guilhermerodz/input-otp#157 · 1 commento ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
davidjerleke/embla-carousel#1414 ·
I maintainer di solito rispondono entro 4 giorni