mdx-editor / mdx-editor/editor
[BUG] The frontmatter is included when copying content.
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 3.7k
- Forks
- 307
- Avg merge
- 14h 22m
- Merged PRs (30d)
- 5
Description
- I have searched for similar issues in both open and closed tickets and cannot find a duplicate.
- I have read the documentation and cannot find an answer.
Describe the bug
When I copy content from the top section in rich text mode, the frontmatter content gets copied along with it. When I paste it, the frontmatter is pasted together with the main content into the editor, causing unexpected results.
Reproduction
To Reproduce
Steps to reproduce the behavior:
- In the live demo, switch to source mode and write the frontmatter
- Switch to rich mode and move your cursor to the top area
- Use the shortcut shift + cmd + ⬆️ to select the content in the upper area
- Copy and paste
- Switch back to source mode and you'll find that the frontmatter has been copied
and pasted multiple times along with the main content
Expected behavior
When copying main content in rich mode, it should not include invisible frontmatter information.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: MacOS
- Browser:Chromium 134.0.6998.89
Additional context
Add any other context about the problem here.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue in the live demo by adding frontmatter in source mode, switching to rich mode, selecting from the top area, and copying and pasting. Verify the rich-mode copy boundary excludes invisible frontmatter and that switching back to source mode shows no duplicated frontmatter.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- markdown, react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100