Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

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

オープン 初心者向け
#5,306 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
78/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
react, typescript
領域
frontend, web-dev

調査の方向性

apps/www/src/app/(app)/examples/plite/_examples/forced-layout.tsxを読み、特にタイトルとエディターのプレースホルダーの設定を確認します。また、packages/plitejs/src/react/editable/root-selector-sources.tsも読み、プレースホルダーが表示されるタイミングを把握します。forced-layoutの例ですべてを選択して内容を削除し、現象を再現します。空のタイトルが視覚的に識別できるよう例を調整し、削除後にタイトルの表示が現れることを確認します。

索引モデルが issue の本文から書いたものです。

説明

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.
主要言語
TypeScript
スター
16.6k
フォーク
993
平均マージ
20時間 21分
マージ済み PR(30日)
60

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

udecode/plate のほかの issue

udecode/plate の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。