mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-15 10:35:48 +00:00
Merge "Move paste rules to Target"
This commit is contained in:
commit
a814b61736
|
@ -134,19 +134,6 @@ OO.inheritClass( ve.init.mw.ViewPageTarget, ve.init.mw.Target );
|
|||
|
||||
/* Static Properties */
|
||||
|
||||
ve.init.mw.ViewPageTarget.static.pasteRules = {
|
||||
'external': {
|
||||
'blacklist': [
|
||||
// Annotations
|
||||
'link', 'textStyle/span', 'textStyle/underline',
|
||||
// Nodes
|
||||
'image', 'div', 'alienInline', 'alienBlock'
|
||||
],
|
||||
'removeHtmlAttributes': true
|
||||
},
|
||||
'all': null
|
||||
};
|
||||
|
||||
/**
|
||||
* Compatibility map used with jQuery.client to black-list incompatible browsers.
|
||||
*
|
||||
|
|
|
@ -198,9 +198,21 @@ ve.init.mw.Target.static.toolbarGroups = [
|
|||
'promote': [ 'reference', 'mediaInsert' ],
|
||||
'demote': [ 'language', 'specialcharacter' ]
|
||||
}
|
||||
|
||||
];
|
||||
|
||||
ve.init.mw.Target.static.pasteRules = {
|
||||
'external': {
|
||||
'blacklist': [
|
||||
// Annotations
|
||||
'link', 'textStyle/span', 'textStyle/underline',
|
||||
// Nodes
|
||||
'image', 'div', 'alienInline', 'alienBlock'
|
||||
],
|
||||
'removeHtmlAttributes': true
|
||||
},
|
||||
'all': null
|
||||
};
|
||||
|
||||
/* Static Methods */
|
||||
|
||||
/**
|
||||
|
|
|
@ -92,11 +92,11 @@ ve.ui.MWMediaEditDialog.static.surfaceCommands = [
|
|||
];
|
||||
|
||||
ve.ui.MWMediaEditDialog.static.pasteRules = ve.extendObject(
|
||||
ve.copy( ve.init.mw.ViewPageTarget.static.pasteRules ),
|
||||
ve.copy( ve.init.mw.Target.static.pasteRules ),
|
||||
{
|
||||
'all': {
|
||||
'blacklist': OO.simpleArrayUnion(
|
||||
ve.getProp( ve.init.mw.ViewPageTarget.static.pasteRules, 'all', 'blacklist' ) || [],
|
||||
ve.getProp( ve.init.mw.Target.static.pasteRules, 'all', 'blacklist' ) || [],
|
||||
[
|
||||
// Tables (but not lists) are possible in wikitext with a leading
|
||||
// line break but we prevent creating these with the UI
|
||||
|
|
|
@ -90,11 +90,11 @@ ve.ui.MWReferenceDialog.static.surfaceCommands = [
|
|||
];
|
||||
|
||||
ve.ui.MWReferenceDialog.static.pasteRules = ve.extendObject(
|
||||
ve.copy( ve.init.mw.ViewPageTarget.static.pasteRules ),
|
||||
ve.copy( ve.init.mw.Target.static.pasteRules ),
|
||||
{
|
||||
'all': {
|
||||
'blacklist': OO.simpleArrayUnion(
|
||||
ve.getProp( ve.init.mw.ViewPageTarget.static.pasteRules, 'all', 'blacklist' ) || [],
|
||||
ve.getProp( ve.init.mw.Target.static.pasteRules, 'all', 'blacklist' ) || [],
|
||||
[
|
||||
// Nested references are impossible
|
||||
'mwReference', 'mwReferenceList',
|
||||
|
|
Loading…
Reference in a new issue