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

Links inside blockquotes are not preserved when deserializing Markdown #3689

Open
Royal-lobster opened this issue Oct 30, 2024 · 0 comments
Open
Labels
bug Something isn't working

Comments

@Royal-lobster
Copy link

Royal-lobster commented Oct 30, 2024

Description

When using editor.api.markdown.deserialize with the MarkdownPlugin, links that are contained within blockquotes are being converted to plain text instead of being preserved as link elements.

Current Behavior

The link inside the blockquote is converted to plain text, losing its link functionality.

Expected Behavior

The link should be preserved as a proper link element while maintaining its position inside the blockquote.

Reproduction steps

  1. Set up a Plate editor with MarkdownPlugin, BlockquotePlugin and LinkPlugin:
const editor = createPlateEditor({
  plugins: [MarkdownPlugin, LinkPlugin, BlockquotePlugin],
});
  1. Try to deserialize Markdown content containing a link inside a blockquote:
const markdown = `> Here is a [link](https://example.com) inside a blockquote`;
const value = editor.api.markdown.deserialize(markdown);

Plate version

38.0.1

Slate React version

0.103.0

Screenshots

No response

Logs

No response

Browsers

Chrome, Firefox, Safari

@Royal-lobster Royal-lobster added the bug Something isn't working label Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant