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

Cannot paste into an inline code element #48

Closed
b-kelly opened this issue Mar 15, 2021 · 1 comment
Closed

Cannot paste into an inline code element #48

b-kelly opened this issue Mar 15, 2021 · 1 comment
Labels
bug Something isn't working mode - rich text Affects the editor's rich text (wysiwyg) mode
Milestone

Comments

@b-kelly
Copy link
Collaborator

b-kelly commented Mar 15, 2021

Reported on Meta.SE

Describe the bug

  1. Start typing.

  2. Copy some text (from anywhere) to your clipboard

  3. Use the Ctrl-K shortcut to start a new inline code block or just click the button

  4. (Optional) start typing in your inline code block (the bug happens either way)

  5. Paste your text (Ctrl-V)

Expected: The text will be pasted into the inline code block, and the cursor will be at the end of the text

Currently: The text is pasted as plain text. If there had been text in the inline block, the block closes and the text appears after it. If there hadn’t been text in the inline block, the block vanishes, never to be seen again (if you toggle to markdown mode, there is no evidence of the block.

The same also happens if you select any text within the inline code block and then paste - if you have three words in the block, and select the middle one, then paste, it will split the inline code block into two (first and third words) and then add your pasted text as plain text between the two inline code blocks.

@b-kelly b-kelly added the bug Something isn't working label Mar 15, 2021
@b-kelly b-kelly added the mode - rich text Affects the editor's rich text (wysiwyg) mode label Oct 7, 2021
@b-kelly b-kelly moved this to Todo in Stacks-Editor Apr 20, 2022
@b-kelly b-kelly added this to the Alpha 2 milestone Apr 20, 2022
@b-kelly b-kelly moved this from Todo to In Progress in Stacks-Editor May 11, 2022
@b-kelly
Copy link
Collaborator Author

b-kelly commented May 11, 2022

I'm able to repro this issue still. Looks like it may be because of html parsing from the clipboard, as ctrl-shift-v (which causes the browser to strip all non-text/plain entries from the pasted content) works as expected.

Repository owner moved this from In Progress to Done in Stacks-Editor May 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working mode - rich text Affects the editor's rich text (wysiwyg) mode
Projects
Status: Done
Development

No branches or pull requests

1 participant