Skip to content

Fix pasting in code blocks in content editor

Himanshu Kapoor requested to merge himkp-code-block-paste into master

What does this MR do and why?

Fix pasting in code blocks in content editor

Now when you paste GFM in a markdown code block, it is pasted as GFM. And when you paste GFM in any other code block, it is pasted as plain text.

Changelog: fixed

Screenshots and steps

  1. Copy the following rich text content:

Some rich text content link

  1. Create a markdown code block in rich text editor by typing ```md. (Case 1)
  2. Create a plain text code block in rich text editor by typing ```. (Case 2)
  3. Paste
Case Before After
Markdown code block image.png image.png
Plain text code block image.png image.png
Copying and pasting a section of a code block in the same code block image.png image.png

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Himanshu Kapoor

Merge request reports