You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement the first seamless inline Markdown source projection slice for strong and emphasis markers.
Leafdown should keep Milkdown/ProseMirror as the editor engine. This issue adds a focused Leafdown projection plugin that temporarily exposes supported inline Markdown as editable source text inside the ProseMirror document, then commits valid source back to Milkdown's canonical model or falls back to literal text.
Keep the default Milkdown CommonMark/GFM document model outside active projection sessions.
When the caret enters a supported strong or emphasis range, replace the active range with editable source text and track the session in plugin state.
Projected marker characters must be real editable document text, not widget DOM.
Style projected source text with decorations or a narrow transient projection marker if needed.
Suppress Markdown input rules while editing projected source.
Commit valid projected source back to canonical Milkdown marks on exit/save.
Commit invalid projected source as literal text.
Force active projection finalization before getMarkdown() returns.
Implement an explicit projection-session undo/redo strategy. Do not use the naive path where entry and commit are both non-history transactions, because the Design seamless inline Markdown source projection #44 spike showed that path drops redo after commit.
Acceptance criteria
Strong and emphasis markers appear as editable inline source text when active.
Caret movement can pass through opening marker, content, and closing marker characters.
Partial marker deletion is supported without crashes or data loss.
Valid projected source commits back to canonical Milkdown marks.
Invalid projected source falls back to literal text.
Undo/redo works while projection is active.
Undo/redo works after projection commit.
Dirty state ignores projection entry/exit housekeeping and tracks actual user source edits.
Save-time getMarkdown() serializes committed or fallback content correctly while projection is active.
Existing detached source inputs remain for unsupported objects.
Tests cover **, __, *, and _ marker variants, partial deletion, invalid fallback, dirty tracking, serialization, and history behavior.
Out of scope
Links and autolinks.
Footnote references.
Raw HTML.
Images.
Permanent schema/model replacement for Markdown marker tokens.
Summary
Implement the first seamless inline Markdown source projection slice for strong and emphasis markers.
Leafdown should keep Milkdown/ProseMirror as the editor engine. This issue adds a focused Leafdown projection plugin that temporarily exposes supported inline Markdown as editable source text inside the ProseMirror document, then commits valid source back to Milkdown's canonical model or falls back to literal text.
Related spike: #44
Architecture
getMarkdown()returns.Acceptance criteria
getMarkdown()serializes committed or fallback content correctly while projection is active.**,__,*, and_marker variants, partial deletion, invalid fallback, dirty tracking, serialization, and history behavior.Out of scope