guardian/scribe

Formatting lost when pasting rich text into Safari

Open

#239 创建于 2014年7月30日

在 GitHub 查看
 (1 评论) (0 反应) (0 负责人)JavaScript (3,516 star) (265 fork)batch import
enhancementhelp wanted

描述

Pasting into Scribe from a rich text source like TextEdit or Pages does not preserve formatting.

clipboardData is present on those pastes, but there is no text/html type. text/plain is available and that's used.

I posted in this thread about keeping the clipboardData polyfill intact for continued Safari support, however this polyfill isn't triggered in the case described above.

https://github.com/guardian/scribe/issues/201

When copy+pasting from TextEdit, here's a list of available types in clipboardData. None of these are actually useful, and Scribe should fallback to the polyfill in this case.

["public.rtf", "text/rtf", "public.utf8-plain-text", "text/plain", "public.utf16-external-plain-text", "CorePasteboardFlavorType 0x75743136", "dyn.ah62d4rv4gk81n65yru", "CorePasteboardFlavorType 0x7573746C", "com.apple.traditional-mac-plain-text", "CorePasteboardFlavorType 0x54455854", "dyn.ah62d4rv4gk81g7d3ru", "CorePasteboardFlavorType 0x7374796C"]

贡献者指南