Page MenuHomePhabricator

Allow copy/paste of cell formatting in Visual Editor Tables
Open, LowPublic

Assigned To
None
Authored By
Wittylama
Mar 13 2018, 12:17 PM
Referenced Files
None
Tokens
"Like" token, awarded by Ciencia_Al_Poder."Love" token, awarded by Guarapiranga."Mountain of Wealth" token, awarded by John_Cummings.

Description

I am managing a project which has a large table that visualises progress with the use of cell colours.
I am able to use Visual Editor for nearly all of the work in managing this table EXCEPT the handling of these cell colours.

I would like to be able to NOT ONLY copy-paste the contents of a cell, but ALSO the formatting of that cell.

For example:
When I have a cell that is: Navy blue background; white text; and "100" and I copy it in VE, all that gets pasted in the next cell is the "100". This means that I then have to go into code-editor and copy-paste the style elements too. Specifically this:

| style="background: navy; color: white;" |100

For reference, this is the project page I'm referring to: https://www.wikidata.org/wiki/Wikidata:Europeana_migration_vocabulary?oldid=648848231

Event Timeline

matmarex subscribed.

VE only pastes the cell formatting that it understands and can edit – it will copy-paste the cell "type" (header vs content) and rowspan/colspan values. It won't copy-paste any other attributes. So yes, this might require T54180 first.

Deskana moved this task from To Triage to Freezer on the VisualEditor board.

So yes, this might require T54180 first.

I don't think it does. T54180 requires creating menu options and icons on the VE ribbon, the copy/paste with formats (which should be the default, as it is in other word processors) only requires the full cell to be copied instead of only the text component:

|| align=center style=background:yellow | 243,567 || vs || align=center style=background:yellow | 243,567 ||

@Guarapiranga and I discussed this at https://www.mediawiki.org/wiki/Topic:Vcbua5cr5l5z2w6d On the one hand, if what you copied is exactly what you want and you just paste it in, then that's great. But if it's not, and now you can't change it, then that's a problem.

I agree that cell formatting not being transferred after copying/pasting is unintuitive. For me, there should be 3 types of paste:

  1. All cell and text formatting: -
  2. Text formatting only: Ctrl + V
  3. No cell or text formatting (plain text): Ctrl + Shift + V

I would suggest Ctrl + Alt + V for 1 if consensus is to not transfer all cell formatting by default.
This, along with T54180 would probably allow most basic editors to not need to switch from the VE, when editing tables at least.