jenkins-bot has submitted this change and it was merged.
Change subject: MWTableNode: Apply wikitable class to pasted tables
......................................................................
MWTableNode: Apply wikitable class to pasted tables
Bug: T85577
Change-Id: I9714cf3e8ccc165f91af939481c845c3ec9c5f6b
---
M modules/ve-mw/dm/nodes/ve.dm.MWTableNode.js
1 file changed, 6 insertions(+), 1 deletion(-)
Approvals:
Jforrester: Looks good to me, approved
jenkins-bot: Verified
diff --git a/modules/ve-mw/dm/nodes/ve.dm.MWTableNode.js
b/modules/ve-mw/dm/nodes/ve.dm.MWTableNode.js
index 6fad964..88d636f 100644
--- a/modules/ve-mw/dm/nodes/ve.dm.MWTableNode.js
+++ b/modules/ve-mw/dm/nodes/ve.dm.MWTableNode.js
@@ -44,13 +44,18 @@
ve.dm.TableCaptionNode.static.parentNodeTypes.push( 'mwTable' );
ve.dm.TableRowNode.static.childNodeTypes.push( 'mwTransclusionTableCell' );
-ve.dm.MWTableNode.static.toDataElement = function ( domElements ) {
+ve.dm.MWTableNode.static.toDataElement = function ( domElements, converter ) {
var attributes = {},
dataElement = { type: this.name },
classAttr = domElements[ 0 ].getAttribute( 'class' );
this.setClassAttributes( attributes, classAttr );
+ // Default to wikitable when pasting
+ if ( converter.isFromClipboard() ) {
+ attributes.wikitable = true;
+ }
+
if ( !ve.isEmptyObject( attributes ) ) {
dataElement.attributes = attributes;
}
--
To view, visit https://gerrit.wikimedia.org/r/265785
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I9714cf3e8ccc165f91af939481c845c3ec9c5f6b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders <[email protected]>
Gerrit-Reviewer: DLynch <[email protected]>
Gerrit-Reviewer: Jforrester <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits