mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-28 00:00:49 +00:00
Unregister core image types
Once MW images are registered, we should remove core image support so we don't accidentally match to them (e.g. an MW inline image with an unsupported extra RDFa type). Change-Id: I1c8567346c371fe338f95b232c9ac53e009c5a46
This commit is contained in:
parent
b7f92605b2
commit
425e581613
|
@ -251,4 +251,5 @@ ve.dm.MWBlockImageNode.prototype.getCaptionNode = function () {
|
|||
|
||||
/* Registration */
|
||||
|
||||
ve.dm.modelRegistry.unregister( ve.dm.BlockImageNode );
|
||||
ve.dm.modelRegistry.register( ve.dm.MWBlockImageNode );
|
||||
|
|
|
@ -211,4 +211,5 @@ ve.dm.MWInlineImageNode.static.toDomElements = function ( data, doc ) {
|
|||
|
||||
/* Registration */
|
||||
|
||||
ve.dm.modelRegistry.unregister( ve.dm.InlineImageNode );
|
||||
ve.dm.modelRegistry.register( ve.dm.MWInlineImageNode );
|
||||
|
|
|
@ -240,7 +240,7 @@ ve.init.mw.Target.static.importRules = {
|
|||
// Annotations
|
||||
'link', 'textStyle/span', 'textStyle/font', 'textStyle/underline', 'meta/language',
|
||||
// Nodes
|
||||
'inlineImage', 'blockImage', 'div', 'alienInline', 'alienBlock', 'comment'
|
||||
'div', 'alienInline', 'alienBlock', 'comment'
|
||||
],
|
||||
removeOriginalDomElements: true
|
||||
},
|
||||
|
|
|
@ -37,7 +37,10 @@ ve.test.utils.mwEnvironment = ( function () {
|
|||
ve.dm.MWPreformattedNode,
|
||||
ve.dm.MWTableNode
|
||||
],
|
||||
overridden = [];
|
||||
overridden = [
|
||||
ve.dm.InlineImageNode,
|
||||
ve.dm.BlockImageNode
|
||||
];
|
||||
|
||||
function setupOverrides() {
|
||||
var i;
|
||||
|
|
Loading…
Reference in a new issue