feat(Editor): allow disabling starter kit for plain text#6713
Conversation
Accept a boolean for the `starter-kit` prop so `starter-kit="false"` gives a plain text editor, keeping the essential nodes and history while disabling every formatting feature.
commit: |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe editor’s Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🔗 Linked issue
❓ Type of change
📚 Description
The
starter-kitprop now accepts a boolean. Setting it tofalsegives a plain text editor: it keeps the essential nodes (document, paragraph, text) plus history and hard breaks, and disables every formatting feature such as bold, italic, headings, lists, code, blockquote, links and horizontal rules. The customCodeandHorizontalRuleextensions are skipped too.Previously the only way to get a plain text editor was to turn off each formatting feature by hand through the
starter-kitobject, for example when building a plain textChatPrompt:This now becomes:
starter-kitset totrueor an object keeps the current behavior unchanged.📝 Checklist