Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

[Beta]: In the Plite forced-layout example, the empty title shows no placeholder after the whole document is deleted

Aperta Adatta ai principianti
#5,306 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

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
Ambito
frontend, web-dev

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.

  1. Open https://beta.platejs.org/examples/plite/forced-layout with its default content.
  2. Click in the body paragraph.
  3. 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 next commit/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. usePlaceholderValue in packages/plitejs/src/react/editable/root-selector-sources.ts:197-211 checks state.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 at forced-layout.tsx:68 can never show.
  • So the fix likely belongs in the example, such as a placeholder on the title itself or Untitled as 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

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di udecode/plate

Tutte le issue di udecode/plate

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.