원클릭으로
md-to-lexical
// Convert Shiroi Markdown to Haklex Lexical JSON. Use when the user wants to convert a markdown file or string to rich text editor JSON format.
// Convert Shiroi Markdown to Haklex Lexical JSON. Use when the user wants to convert a markdown file or string to rich text editor JSON format.
Use when releasing @haklex/* packages and propagating to downstream consumers (Yohaku, admin-vue3, mx-core, mx-space). Owns end-to-end orchestration: change detection, per-package semver calc, peer-dep audit to prevent duplicate-instance bugs (e.g. lucide-react React Context mismatch), topologically-ordered publish with npm registry polling, parallel-worktree downstream smoke tests, auto-revert on failure, and direct push to downstream primary branches (no PRs). Fully autonomous — no user confirmation gates. Supersedes the old /release command.
Use when writing Haklex articles with Markdown plus LiteXML, choosing the appropriate Haklex node for content, authoring LiteXML fragments, or converting a LightXML/LiteXML string or file into Lexical SerializedEditorState JSON, Markdown, or Static Render HTML via the `litexml` CLI.
Use when creating or modifying demo/ UI components — buttons, cards, panels, pills, inputs, badges. Reference for all component CSS classes and their exact specs.
Use when modifying demo/ UI — adding pages, components, or styles. Defines the monochrome visual system, layout patterns, and component conventions for the haklex demo site.
Use when adding or modifying colors, spacing, typography, or layout values in demo/ CSS. Complete token reference for the monochrome design system.
| name | md-to-lexical |
| description | Convert Shiroi Markdown to Haklex Lexical JSON. Use when the user wants to convert a markdown file or string to rich text editor JSON format. |
| user_invocable | true |
Converts Shiroi-flavored Markdown to Haklex's Lexical SerializedEditorState JSON.
Run the conversion script:
npx tsx scripts/md-to-lexical/index.ts <input.md> > output.json
Or pipe from stdin:
cat article.md | npx tsx scripts/md-to-lexical/index.ts - > output.json
| Markdown | Lexical Node |
| ---------------------------------------------- | ---------------------------------- | ---- | --------- | --- | ----------- |
| # heading | HeadingNode |
| paragraph | ParagraphNode |
| > quote | QuoteNode |
| > [!NOTE/TIP/WARNING/IMPORTANT/CAUTION] | AlertQuoteNode |
| - list / 1. list | ListNode |
| --- | HorizontalRuleNode |
| ```lang ``` | CodeBlockNode |
| ```mermaid ``` | MermaidNode |
|  | ImageNode |
|  | VideoNode (auto-detect) |
| <video src="..."> | VideoNode |
| | table | | TableNode |
| $eq$ | KaTeXInlineNode |
| $$eq$$ | KaTeXBlockNode |
| **bold**, *italic*, ~~strike~~ | text format flags |
| ++underline++, ==highlight== | text format flags |
| ^superscript^, ~subscript~ | text format flags |
| `code` | text format flag |
| | | text | | | SpoilerNode |
| [name]{GH@handle} | MentionNode |
| [^id] / [^id]: ... | FootnoteNode / FootnoteSectionNode |
| <ruby>base<rt>reading</rt></ruby> | RubyNode |
| <tag>text</tag> | TagNode |
| [text](url) | LinkNode |
| standalone URL paragraph | LinkCardNode |
| :::gallery/carousel | GalleryNode |
| :::warn/info/error/banner | BannerNode |
| :::grid{cols=N,gap=M} | GridContainerNode |
| :::masonry | GalleryNode (masonry) |
| <details><summary>...</summary>...</details> | DetailsNode |
| <Tabs><tab label="...">code</tab>...</Tabs> | CodeSnippetNode |
| <excalidraw>snapshot</excalidraw> | ExcalidrawNode |
| <nested-doc>content</nested-doc> | NestedDocNode |