mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-12-22 19:12:50 +00:00
1fc11e0146
The difference is that metaitems are not visible on the editing surface, and their exact position is not preserved when the paragraph containing them is edited. This behavior is desirable for e.g. categories, but not for <noinclude> and related tags, which are intentionally placed in specific places in the text. Note that we don't really have any editing interface for these nodes yet. But you can see them (and they come with descriptions and links to documentation pages), and delete or copy-paste them. Bug: T250937 Change-Id: I104e7abbd650567df0e59813653c46a66d955d58
38 lines
878 B
JavaScript
38 lines
878 B
JavaScript
/*!
|
|
* VisualEditor ContentEditable MWIncludesNode class.
|
|
*
|
|
* @copyright 2011-2020 VisualEditor Team and others; see AUTHORS.txt
|
|
* @license The MIT License (MIT); see LICENSE.txt
|
|
*/
|
|
|
|
/**
|
|
* ContentEditable MW node for noinclude, includeonly and onlyinclude tags.
|
|
*
|
|
* @class
|
|
* @extends ve.ce.AlienInlineNode
|
|
* @constructor
|
|
* @param {ve.dm.MWIncludesNode} model
|
|
* @param {Object} [config]
|
|
*/
|
|
ve.ce.MWIncludesNode = function VeCeMWIncludesNode() {
|
|
// Parent constructor
|
|
ve.ce.MWIncludesNode.super.apply( this, arguments );
|
|
|
|
// DOM changes
|
|
this.$element
|
|
.addClass( 've-ce-mwIncludesNode' )
|
|
.text( this.model.getWikitextTag() );
|
|
};
|
|
|
|
/* Inheritance */
|
|
|
|
OO.inheritClass( ve.ce.MWIncludesNode, ve.ce.AlienInlineNode );
|
|
|
|
/* Static Properties */
|
|
|
|
ve.ce.MWIncludesNode.static.name = 'mwIncludes';
|
|
|
|
/* Registration */
|
|
|
|
ve.ce.nodeFactory.register( ve.ce.MWIncludesNode );
|