Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

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

Abierto Apto para principiantes
#5,306 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
78/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
react, typescript
Área
frontend, web-dev

Línea de trabajo

Lee apps/www/src/app/(app)/examples/plite/_examples/forced-layout.tsx, especialmente la configuración del título y del marcador de posición del editor, junto con packages/plitejs/src/react/editable/root-selector-sources.ts para entender cuándo aparecen los marcadores de posición. Reproduce el problema seleccionando todo y eliminando el contenido del ejemplo forced-layout. Ajusta el ejemplo para que un título vacío se identifique visiblemente y confirma que la indicación del título aparece después de eliminar el contenido.

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: 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.
Lenguaje dominante
TypeScript
Estrellas
16.6k
Forks
993
Merge medio
20 h 21 min
PR fusionados (30 d)
60

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

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de udecode/plate

Todos los issues de udecode/plate

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.