-
Notifications
You must be signed in to change notification settings - Fork 167
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
Fix markdown plugin for copy/paste code #1326
Conversation
@@ -54,8 +54,11 @@ function cacheGetRangeForMarkdownOperation( | |||
return false; | |||
} | |||
|
|||
const parentBlockText = textInlineElement.getParentBlock().getTextContent(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need to add comment to explain why we do this, better with some example
…u/juliaroldi/markdown-plugin
…rosoft/roosterjs into u/juliaroldi/markdown-plugin
@@ -54,6 +54,8 @@ function cacheGetRangeForMarkdownOperation( | |||
return false; | |||
} | |||
|
|||
//if the text is pasted, it might create a inner element inside the text element, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to have two or more layers of DIV?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if we have to or more layers, the markdown plugin will not work. It only work for inline elements.
When a text is pasted, it might create new inlineElement inside the current element, then to ensure the text must be converted or not, check text of the parentBlock.