Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Greater than/less than characters not properly rendered when content does not contain any markdown syntax #82

Open
schuma7 opened this issue Nov 28, 2024 · 0 comments

Comments

@schuma7
Copy link

schuma7 commented Nov 28, 2024

Describe the bug
When setting a simple content string containing the < or > chars but not containg any other Markdown-specific syntax, such as "a > b" for example, the editor renders the escaped versions &gt; and &lt;

To Reproduce

  1. In the useEditor hook add the following extensions:
[
  Bold,
  Document,
  Italic,
  Text,
  Paragraph,
  Markdown.configure({
            linkify: true,
            transformCopiedText: true,
            transformPastedText: true,
  })
]
  1. Set the content using
    editor.commands.setContent('a>b', false, { preserveWhitespace: 'full', });
  2. The editor renders the escaped characters instead of the <, > chars:
    image

Expected behavior
I'd expect the <, > chars to be rendered instead of their escaped versions.

Desktop (please complete the following information):

  • OS: Mac OS Sequioa 15.1.1
  • Browser: Chrome
  • Version: 131.0.6778.71 (Official Build) (arm64)

Additional context
Interestingly, adding any Markdown-syntax to the content will cause the content to be rendered as expected
editor.commands.setContent('*italic* a>b', false, { preserveWhitespace: 'full', });

will render:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant