mobiledoc-kit icon indicating copy to clipboard operation
mobiledoc-kit copied to clipboard

Copy/paste cards not serialized to html/text

Open bantic opened this issue 10 years ago • 0 comments

When copying, the editor sets the clipboard html and text data to the result of rendering the selected range of the post with the html and text renderers, respectively. These renderers need to have html and text versions of the cards in the mobiledoc in order to render them correctly, but the only cards available are the editor's cards, which will be dom cards. The code currently uses a no-op unknownCardHandler to skip cards in the rendered output. This is not a problem when copy-pasting between mobiledoc-kit editors because the mobiledoc is still serialized into the HTML, but it will cause the cards to not appear when copying from the editor and pasting into another (non-mobilekit) document.

bantic avatar Nov 24 '15 17:11 bantic