【Feature Requests】【Markdown】Copying and pasting content from the Visual Studio Code editor into a rich text editor should result in the content being parsed as Markdown. #4892
Damon0820
started this conversation in
Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Pasting Markdown from VSCode is incorrectly parsed as code block
Description
When copying Markdown content from Visual Studio Code (and VSCode-based editors like Cursor, Trae, etc.) into Plate, the content is always inserted as a code block, instead of being parsed and rendered as Markdown.
However, when copying the exact same Markdown content from other editors (e.g., Zed, WebStorm, or macOS TextEdit), the content is correctly parsed as Markdown and rendered as rich text.
This inconsistency creates a poor user experience for teams that rely on VSCode for writing Markdown content.
Expected Behavior
Pasting Markdown content from any editor (including VSCode) should:
Be parsed as Markdown
Render correctly as rich text (headings, lists, bold, etc.)
NOT be forced into a code block
Relevant code:
Code block plugin (
src/lib/withInsertDataCodeBlock.ts)The logic that interprets
data.getData("vscode-editor-data")as a signal to insert a code block should be removed.Markdown plugin (
src/lib/MarkdownPlugin.ts)Add handling for
data.getData("vscode-editor-data")بحيث it skips HTML parsing and instead falls back to parsing"text/plain"as Markdown.others
vscode mimetypes:
Beta Was this translation helpful? Give feedback.
All reactions