feat(Editor): allow disabling starter kit for plain text#271
Merged
Conversation
The starterKit prop now accepts boolean | Partial<StarterKitOptions> (default true). Passing false yields a plain-text editor: all formatting extensions are disabled while the essential nodes remain, and the Code / HorizontalRule extend blocks are gated behind starterKit !== false. b24ui's dropcursor color token is preserved. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JS8ypVfQSFzYVZzkTHhURb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Syncs upstream nuxt/ui commit
76d613c— feat(Editor): allow disabling starter kit for plain text (#6713).What
Editor'sstarterKitprop now acceptsboolean | Partial<StarterKitOptions>(defaulttrue). Passingfalsegives a plain-text editor:starterKitcomputed builds aplainTextoverride that disables every formatting extension (bold/italic/heading/lists/code/blockquote/link/hr/underline/strike/…) while keeping the essential nodes (document, paragraph, text, hard break, history);Code/HorizontalRule.extend(...)blocks are gated behindprops.starterKit !== false.b24ui's
Editor.vuematched upstream's structure, so the runtime changes applied verbatim. Docs (editor.md) gain a::tipexplaining plain-text mode.Deviation
b24ui's dropcursor color is
var(--ui-color-accent-main-primary)(fork token), not upstream'svar(--ui-primary)— preserved in the rewritten computed'sdefudefaults.Verify (
CI=true)dev:prepare·lint·typecheck·test·build— all green. The defaultstarterKit: truereproduces the previous config exactly (defu of{}yields the same object; the!== falseguards stay truthy), so there's no behavior change and no snapshot churn. Suite 5477 passed / 6 skipped.Ledger: cursor advanced to
76d613c; previous entry7e6d8b0reconciled to PR #270.🤖 Generated with Claude Code
Generated by Claude Code