feat(mtext): segmented Edit/Preview toggle, default to preview

The editor opens in preview by default and switches body views with a
segmented Edit | Preview control placed between the toolbar and the body
(active tab highlighted). All toolbar properties feed the rendered preview.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Hakan SevenandClaude Opus 4.8 committed 2026-05-31 01:59:39 +03:00
1 parent a5ad0666ce
commit a07af32714
4 files changed
+38 -11

No files matched your search

+3 -2
View File
@@ -737,8 +737,9 @@ pub enum Message {
MTextAlign(mtext_editor::ParaAlign),
/// Toolbar line-spacing change.
MTextLineSpacing(f32),
/// Toggle the editor between the raw code input and the rendered preview.
MTextTogglePreview,
/// Switch the editor body between raw code input (`false`) and the
/// rendered preview (`true`).
MTextShowPreview(bool),
/// Commit the editor: create or update the MText entity.
MTextOk,
/// Discard the editor without creating / changing the entity.