guardian/scribe

Formatting lost when pasting rich text into Safari

Open

#239 aberto em 30 de jul. de 2014

Ver no GitHub
 (1 comment) (0 reactions) (0 assignees)JavaScript (265 forks)batch import
enhancementhelp wanted

Métricas do repositório

Stars
 (3.516 stars)
Métricas de merge de PR
 (Nenhuma PRs mesclada em 30d)

Description

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"]

Guia do colaborador