web-components icon indicating copy to clipboard operation
web-components copied to clipboard

Preserve formatting when pasting from Google Chrome, Word, etc.

Open Michael-Grover opened this issue 5 years ago • 5 comments

Is your feature request related to a problem? Please describe. Currently when a user copies text with simple formatting like italicization and bolding from a source like Microsoft Word or Google Docs, and then pastes that text into the markdown editor, none of the formatting is preserved.

As a user I would like as much of my formatting to be preserved as possible. I would expect basic formatting like italicization and bolding at least to be preserved. I would not want to paste in text from another contract and then have to manually identify what is supposed to be italicized and what's supposed to be bold, and then change every instance in the markdown editor to match my original document

Michael-Grover avatar Apr 14 '20 00:04 Michael-Grover

This may possibly involve further work in the markdown-transform

jolanglinais avatar Apr 14 '20 15:04 jolanglinais

To debug these we need the HTML that they are putting on the clipboard. If it is a mess of span with css to apply formatting then it can be very hard to recover semantic content like <h1> etc.

dselman avatar Apr 14 '20 15:04 dselman

Relates to https://github.com/accordproject/markdown-editor/issues/198

jolanglinais avatar May 13 '20 14:05 jolanglinais

I was trying to work on this issue. on Inserting HTML from clipboard the formatting is preserved but deleting the same, it gives the below error.

preserveFormatting

Error :

image

Rupesh-2003 avatar Mar 23 '21 09:03 Rupesh-2003

@Rupesh-2003 my guess is that this would be the starting point of where to figure out the issue: withHtml.js

jolanglinais avatar Mar 23 '21 13:03 jolanglinais