Page MenuHomePhabricator

Pasting from clipboard should not keep only basic formatting
Closed, DuplicatePublic

Description

Migrated from: https://wikimedia.mingle.thoughtworks.com/projects/language_engineering/cards/4485

Context

Pasting content to a content editable area shows it with the source format by default. Currently we remove all formatting what causes links and references to be lost when moving things around.

Narrative

As a user<i>, I can paste content from different sources without formatting that I cannot later control but preserving the one I can</i>//<i>, so that it becomes usable in the translation</i>.//

Acceptance Criteria

  • When pasting some rich text, the result is plain text added to the translation with some basic formatting (as described below):
  • If the text contains fragments with bold, italics, or lists, those will be preserved.
  • If the text contains article links, those will be kept.
  • If the text contains references, those will be kept.
  • (Optional) If the text contains links to a different Wiki, those will be adapted using Wikidata to point to the target wiki.
  • (Optional) If the text contains external links, those will be preserved (if it is possible to use the link card with them).