docs/solutions/logic-errors/2026-04-06-trailing-block-normalize-inserts-must-run-without-suggestions.md
In suggestion mode, typing inside a table could create an unrelated Add: Paragraph suggestion under the table.
The extra suggestion came from the editor's trailing-block normalization, not from the user's input.
TrailingBlockPlugin inserted its fallback paragraph directly inside normalizeNode.
That insert ran through the normal editor transform pipeline, so suggestion tracking could record it as a user change when the editor was in suggestion mode.
Make trailing-block insertion pluggable instead of hard-coding the transform:
insert(editor, { at, insert, type }) hook to TrailingBlockPluginSuggestionPlugin.withoutSuggestions(insert)This keeps packages/utils generic while letting the app opt specific normalize-generated inserts out of suggestion tracking.
These checks passed:
bun test packages/utils/src/lib/plugins/trailing-block/withTrailingBlock.spec.tsx
pnpm install
pnpm turbo build --filter=./packages/utils --filter=./apps/www
pnpm turbo typecheck --filter=./packages/utils --filter=./apps/www
pnpm lint:fix
Browser check:
http://127.0.0.1:3051/blocks/playgroundSuggestion1 inside a table cellAdd: ParagraphWhen a plugin inserts nodes during normalization, do not assume those transforms should be tracked like direct user edits.
Prefer a small escape hatch at the plugin boundary, then let the app layer decide whether that insert should run inside withoutSuggestions, withoutNormalizing, or another wrapper.