Skip to content

Bug: @lexical/markdown text-format combination #2632

@hanford

Description

@hanford

When hydrating a lexical editor with the following markdown **Bold *Italic*** calling $convertFromMarkdownString should properly format this as bold & and bold italic text. However, for some reason, it doesn't, and the rendered result is Bold *Italic*

This seems to work when switching between editor content and markdown in the playground, but it does not work when initializing the playground with this content.

Lexical version: 3.8

Steps To Reproduce

  1. Have a lexical instance with initialEditorState that invokes $convertFromMarkdownString('**Bold *Italic***')
  2. See the content be rendered in editor as Bold *Italic* rather than the expected Bold Italic

Link to code example:

https://codesandbox.io/s/many-lexical-autofocus-forked-efq8sq?file=/src/App.js

The current behavior

Content is Bold and asterisks are rendered in editor

The expected behavior

Content should be Bold and Italic text should be italicized

--

Happy to share any more information if it's useful

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions