giuspen / cherrytree

cherrytree
https://www.giuspen.net/cherrytree/
Other
3.34k stars 457 forks source link

MarkdownShortcutPlugin is not showing resultant styling for Header markdown #2334

Closed jsoneaday closed 1 year ago

jsoneaday commented 1 year ago

Version, Operative system I am on lexical 0.12.0 and Mac Ventura 13.5.1

Describe the bug When I write markdown in the text area for creating a header it does not show the desired style. However if I type bold or italics markdown (*, ) it immediately updates into the styled text.

To Reproduce Steps to reproduce the behavior:

  1. Create this jsx
    <LexicalComposer initialConfig={initialConfig}>
      <PlainTextPlugin
        contentEditable={<ContentEditable className="texteditor-container" />}
        placeholder={<div>Enter some text...</div>}
        ErrorBoundary={LexicalErrorBoundary}
      />
      <MarkdownShortcutPlugin transformers={DEFAULT_TRANSFORMERS} />
      <HistoryPlugin />
      <OnChangePlugin onChange={onChangeState} />
    </LexicalComposer>
  2. Pass in this initialConfig
    const initialConfig = {
    namespace: "JobDescEditor",
    theme,
    onError,
    editable: true,
    nodes: [
    HorizontalRuleNode,
    CodeNode,
    HeadingNode, // I was hoping this is the header node?
    LinkNode,
    ListNode,
    ListItemNode,
    QuoteNode,
    ],
    };
  3. Run app and see results similar to below

Screenshots

Screenshot 2023-08-20 at 10 20 23 PM