Skip to content

FIX: Fix MD/rich toggle state in wizard composer - #325

Merged
angusmcleod merged 4 commits into
paviliondev:mainfrom
davidlippidinova:fix/wizard-composer-rich-editor
Nov 5, 2026
Merged

angusmcleod merged 4 commits into
paviliondev:mainfrom
davidlippidinova:fix/wizard-composer-rich-editor

Conversation

@sisti86dinova

@sisti86dinova sisti86dinova commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

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-editor computes isRichEditorEnabled as editorComponent !== TextareaEditor. The wizard uses CustomWizardTextareaEditor, a subclass of TextareaEditor, so core treats it as the rich editor. The toggle shows "rich", the first click switches to core's plain TextareaEditor (still Markdown, without the wizard's smart-list handling), and only the second click loads the rich editor.

Change

  • Override isRichEditorEnabled so CustomWizardTextareaEditor counts as Markdown.
  • After toggleRichEditor, if a wizard composer switched back to core's TextareaEditor, swap in CustomWizardTextareaEditor again.

The wizard composer still starts in Markdown mode, as it does today, and setupEditorMode is unchanged.

🤖 Generated with Claude Code

sisti86dinova and others added 3 commits November 3, 2026 10:42
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>
@sisti86dinova sisti86dinova changed the title Fix/wizard composer rich editor FIX: Fix MD/rich toggle state in wizard composer Nov 3, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DSz8MWGMF9Utk4gyCsBEcw
@angusmcleod
angusmcleod merged commit e8ead81 into paviliondev:main Nov 5, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants