Disable TipTap undo/redo when the history feature is disabled - #6312
Disable TipTap undo/redo when the history feature is disabled#6312VPS-Obi wants to merge 1 commit into
history feature is disabled#6312Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yml Review profile: CHILL Plan: Team Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yml Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 8 included reviews per hour; 6 remain after this review. 📝 SummarySummary by CodeRabbit
WalkthroughTipTap now disables undo and redo functionality when the ChangesTipTap history control
Estimated code review effort: 1 (Trivial) | ~5 minutes Merge Risk: ⚪ Minimal · up to This change disables TipTap history, undo/redo shortcuts, and toolbar availability consistently when the history feature is off. No current merge-readiness risk remains. Suggested reviewers: 🚥 Pre-merge checks | ✅ 6✅ Passed checks (6 passed)
Full details: Docstring CoverageExplanation No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2 files. (1 skipped: 1 unsupported.) Full details: Requires Human ReviewExplanation The patch changes only two existing TipTap source files and adds one ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
supports array with per-feature optionshistory feature is disabled
The `history` option only hid the undo/redo toolbar buttons while TipTap's undoRedo extension stayed enabled, so the keyboard shortcuts kept working and the editor still tracked history. Pass `undoRedo: false` to StarterKit so the extension and its shortcuts follow the configured feature. Removing the extension also removes its `undo`/`redo` commands, so the toolbar must no longer query them via `editor.can()` when the feature is disabled. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AL6Fd1WgimvhAaUtUiRAcK
a0a6f03 to
4bd226c
Compare
|
Does this solve a problem? I don't see a reason why undo/redo should not work using keyboard. Like it does for every other text input. The reason for the config setting is maybe only to get a clean toolbar. |
Addresses #6311 (comment): disabling the
historyfeature of the TipTap Rich Text Block only hid the undo/redo toolbar buttons. TipTap'sundoRedoextension stayed enabled becauseStarterKit.configurenever receivedundoRedo: false, so the keyboard shortcuts kept working and the editor kept tracking history — the feature looked disabled but wasn't.https://claude.ai/code/session_01AL6Fd1WgimvhAaUtUiRAcK