Repository navigation
FIX: Fix MD/rich toggle state in wizard composer - #325
Merged
angusmcleod merged 4 commits intoNov 5, 2026
Merged
angusmcleod merged 4 commits into
angusmcleod merged 4 commits into
Conversation
The wizard composer always forced the textarea editor, and when the rich_editor site setting is enabled isRichEditorEnabled started out undefined, so users had to click the MD/rich toggle twice to reach the rich text view. Initialise it from the site setting, defer to core setupEditorMode and only swap in CustomWizardTextareaEditor in markdown mode so the wizard text bindings keep working. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Core derives isRichEditorEnabled from editorComponent and only treats its own TextareaEditor as markdown, so the wizard textarea editor made the toggle start in the rich state. Override the getter and keep the wizard textarea editor when toggling back to markdown. The wizard composer keeps defaulting to markdown, and core setupEditorMode (which assumes a logged in user) is no longer called. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DSz8MWGMF9Utk4gyCsBEcw
angusmcleod
approved these changes
Nov 5, 2026
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.
Problem
In wizard composer fields the Markdown/Rich toggle starts in the wrong state, so users have to click it twice to reach the rich text editor.
Core
d-editorcomputesisRichEditorEnabledaseditorComponent !== TextareaEditor. The wizard usesCustomWizardTextareaEditor, a subclass ofTextareaEditor, so core treats it as the rich editor. The toggle shows "rich", the first click switches to core's plainTextareaEditor(still Markdown, without the wizard's smart-list handling), and only the second click loads the rich editor.Change
isRichEditorEnabledsoCustomWizardTextareaEditorcounts as Markdown.toggleRichEditor, if a wizard composer switched back to core'sTextareaEditor, swap inCustomWizardTextareaEditoragain.The wizard composer still starts in Markdown mode, as it does today, and
setupEditorModeis unchanged.🤖 Generated with Claude Code