VisualEditor: Preserve rich text formatting when pasting from internal or external sources (tracking)
Closed, ResolvedPublic

Description

No matter the text is copied from an external source of another part of the document.


Version: unspecified
Severity: enhancement

bzimport set Reference to bz33105.
liangent created this task.Via LegacyDec 14 2011, 2:41 PM
TrevorParscal added a comment.Via ConduitDec 14 2011, 7:20 PM

Right now we only support plain text copy and paste. Rich text copy and paste within the document will be supported next, and eventually rich text paste from content copied outside the document will be supported where possible.

brion added a comment.Via ConduitDec 14 2011, 7:22 PM

Tweaking title to clarify for enhancement request, so this'll look nice in the tracker. :)

Jdforrester-WMF added a comment.Via ConduitJun 22 2012, 6:31 PM

Confirmed still a missing feature in current version. :-)

bzimport added a comment.Via ConduitJun 22 2012, 9:10 PM

orbit wrote:

When copying one portion of the article and pasting into the same article, rich text pasting IS supported. Copying from an external source (another article or another application), only plain text pasting is supported.

@liangent, what platform/browser/version/method are you using to copy and paste? Very specific instructions would be helpful.

bzimport added a comment.Via ConduitJun 22 2012, 9:19 PM

orbit wrote:

Oops, James just pointed out to me that this bug was originally filed against the December demo that used a very different copy/paste mechanism. For now, I'm leaving this open as an enhancement to fully support rich text copy and paste from external sources.

Jdforrester-WMF added a comment.Via ConduitJun 22 2012, 10:06 PM

Mass-moving items into VisualEditor product

Jdforrester-WMF added a comment.Via ConduitJun 23 2012, 1:36 AM

Mass-move out of "General" to "ContentEditable".

Jdforrester-WMF added a comment.Via ConduitJun 25 2012, 4:54 PM

Clarify title

bzimport added a comment.Via ConduitJun 29 2012, 12:33 AM

orbit wrote:

With this change:
https://gerrit.wikimedia.org/r/#/c/13423/
rich copying and pasting from other ve instances (same wiki, same browser) is supported. I've changed the title to only indicate the feature request for rich copy and paste from external sources (other websites, Microsoft Word, etc).

bzimport added a comment.Via ConduitFeb 25 2013, 11:27 PM

orbit wrote:

Due to added complexity to the Linear Model in the last 6 months, the previously-supported copy and paste from separate ve instances is no longer supported as we work toward a universal solution.

Jdforrester-WMF added a comment.Via ConduitJul 2 2013, 8:07 PM
  • Bug 37860 has been marked as a duplicate of this bug. ***
Jdforrester-WMF added a comment.Via ConduitJul 15 2013, 1:17 AM
  • Bug 50946 has been marked as a duplicate of this bug. ***
Jdforrester-WMF added a comment.Via ConduitJul 15 2013, 1:18 AM
  • Bug 50283 has been marked as a duplicate of this bug. ***
Jdforrester-WMF added a comment.Via ConduitJul 15 2013, 1:18 AM
  • Bug 50401 has been marked as a duplicate of this bug. ***
Jdforrester-WMF added a comment.Via ConduitJul 15 2013, 1:18 AM
  • Bug 50282 has been marked as a duplicate of this bug. ***
jayvdb added a comment.Via ConduitJul 22 2013, 2:25 AM
  • Bug 51220 has been marked as a duplicate of this bug. ***
Excirial added a comment.Via ConduitJul 22 2013, 5:53 PM

Since 51220 has been marked as a duplicate, i figure it might be useful to respond here - especially since this bug has been open for a while.

At the moment it would seem that it is impossible to rearrange or move a section in the visual editor if that section contains an image inside it. Drag and Drop is not supported as of yet, and copy / cut and pasting of such as section results in the removal of all wikisyntax (And the image) from that section.

Images themselves are often present in the middle of a section so this issue is common. At the same time the article's that receive most traffic are the most likely to suffer from this issue (If we assume that the best quality article's tend to be the ones most commonly visited).

SalixAlba added a comment.Via ConduitJul 25 2013, 10:25 PM

Is it supposed to be working for cut and paste inside a single article?

I've had variable results trying to rearrange sections in http://en.wikipedia.org/wiki/MathML
in particular the subsections of Software support. Sometimes it works fine other times it loses formatting and references.

Steps to reproduce:

  1. Edit this revision:

http://en.wikipedia.org/w/index.php?title=MathML&oldid=565784757&veaction=edit

  1. Scroll down to Software support
  2. Make a couple of blank lines above "Editors"
  3. Select the whole of the Web browsers section. When selecting ensure the selection is a complete rectangle going all the way to the right hand border.
  4. Copy and paste above Editors

If instead selecting a rectangular region the selection goes to the last character on the last line, the copy and paste seems to work fine.

Jdforrester-WMF added a comment.Via ConduitJul 26 2013, 11:12 PM
  • Bug 52091 has been marked as a duplicate of this bug. ***
Jdforrester-WMF added a comment.Via ConduitAug 8 2013, 6:19 AM
  • Bug 37860 has been marked as a duplicate of this bug. ***
SalixAlba added a comment.Via ConduitAug 9 2013, 8:05 PM

Another example discussed at
http://en.wikipedia.org/w/index.php?title=Wikipedia:VisualEditor/Feedback#Editing existing bulleted lists

THe bug occurred in editing [[en:Education in the United States#Electives]], all styling and links are lost

To reproduce the error reliably:
edit any bullet list immediately preceding a section header with the visual editor.

  1. Bring the cursor to the beginning of the last bullet.
  2. Holding down the CTRL-key, press the down-cursor key, thereby selecting the entire line plus some part of the following header.
  3. Still holding down the CTRL-key, press the left-cursor key just until the header letters no longer appear as selected.
  4. Cut the selected text and paste it in front of an earlier bullet point (or, probably, anywhere else in the article). Weird results ensue.

Incidentally, as soon as the text is cut, the up-cursor button is disabled.
I believe that the following line's header formatting codes are actually selected but the user cannot see this. Microsoft Word has similar buggy behavior.

I can reproduce the same on chrome on a mac, with shift and arrow keys.

Trevor-at-Wikia added a comment.Via ConduitSep 27 2013, 6:24 PM

I am noticing that in latest Mac/Chrome, in-article formatting is preserved when copying or cutting and pasting. However in latest Mac/Firefox all formatting is being stripped. Is that issue within the scope of this ticket, or should I open another?

Jdforrester-WMF added a comment.Via ConduitSep 27 2013, 7:11 PM

(In reply to comment #22)

I am noticing that in latest Mac/Chrome, in-article formatting is preserved
when copying or cutting and pasting. However in latest Mac/Firefox all
formatting is being stripped. Is that issue within the scope of this ticket,
or
should I open another?

Please open another (though I can't reproduce locally - both Chrome and Firefox work the same for me).

Qgil added a comment.Via ConduitOct 15 2013, 5:58 AM

Does this "rich formatting" include references and other VisualEditor artifacts?

Use case:

An editor is translating an article from en.wiki to zz.wiki. Opens both pages with VisualEditor, copies the content from en.wiki and pastes it to zz.wiki.

Esanders added a comment.Via ConduitOct 24 2013, 2:56 PM

@Quim, good question. The current implementation we're working on will let you copy cross wiki with no questions asked, but as you point out, if the template or image doesn't exist on the other wiki you going to have a Bad Time.

We'll need to think about how we sanitise the data or warn the user when copy-pasting cross wiki.

Jdforrester-WMF added a comment.Via ConduitDec 3 2013, 12:51 AM

Re-prioritising down, as the main work is now complete.

Jdforrester-WMF moved this task to Backlog on the VisualEditor workboard.Via WebNov 24 2014, 1:23 AM
Jdforrester-WMF closed this task as "Resolved".Via WebDec 3 2014, 1:28 AM
Jdforrester-WMF claimed this task.
Jdforrester-WMF removed blocking tasks: T60419: VisualEditor: Copying a template from one page to another: render is correct, but template is gone., T60389: VisualEditor: Clouds are added at the end of a paste, T60387: VisualEditor: Templated tables seem to fail in copy paste, T60388: VisualEditor: Pasting a syntaxhighlight block from another VE surface don't load syntaxhighlight's styling, T60383: VisualEditor: Pasting a template throws undefined getModel error, T60384: VisualEditor: Copying a section throws undefined error, T60379: VisualEditor: undefined error during copy, T60318: VisualEditor: Pasting a table with a caption breaks fixUpInsertion, T60241: VisualEditor: Template is getting pasted as a table while doing copy-paste, T53538: VisualEditor: Reverse selections break copy paste functionality, T56728: VisualEditor: Copying a heading's text doesn't copy its format (unless the entire node is copied), T56721: VisualEditor: Header formatting is stripped when copying (or cutting) and pasting inside a single article in Firefox, T54771: VisualEditor: Pasting block level elements can lose annotations, T51396: VisualEditor: Can't copy/paste a reference or template unless you select text either side, T56410: VisualEditor: [Regression] Copy/paste of existing templates and images broken (unformatted text pasted only), T56262: Parsoid: mw:Entity not preserved if data-parsoid missing, T54271: VisualEditor: Editing a pasted template alters copy buffer. Displayed result differs from saved result., T54102: VisualEditor: Write newFromDocumentReplace so editing document slices is simple, T54096: VisualEditor: Copying between editors with wikitext-irrelevant CRs pastes the ↵ as a literal character, not a CE newline placeholder, T54091: The read HTML should have hinting to allow full DOM copying (as opposed to just rich copying) from read mode into VE surfaces, T50720: VisualEditor: Paste of content does not use the context's annotation, T55828: VisualEditor: Pasting text into VE from external text processor removes newlines, T55781: VisualEditor: Insert external pasted content as "unformatted" if Ctrl+/Cmd+Shift+V rather than Ctrl+/Cmd+V trigger, T52128: VisualEditor: HTML comment not removed from user pasting (? from external source), T52126: VisualEditor: Can't copy/paste header from start of document without losing formatting, T53725: VisualEditor: Rich content copied from sub-documents (image captions, references, etc.) down-cast to plain text when the sub-document is closed, T50172: VisualEditor: Throttle or otherwise handle large copy-paste input, T50170: VisualEditor: Support pasting of HTML from external sources, T43193: VisualEditor: Support copy and paste from other VE instances (surfaces), T39932: VisualEditor: Upload-by-insertion of images via copy-paste.

Now tracked in VisualEditor-CopyPaste instead.

Jdforrester-WMF set Security to None.Via WebTue, Aug 4, 10:31 PM
Jdforrester-WMF set Story Points to 0.

Add Comment