mirror of
https://github.com/StarCitizenTools/mediawiki-extensions-TabberNeue.git
synced 2024-12-19 19:41:01 +00:00
6165b06f28
Adding some basic support for visual editing in VisualEditor. Currently it is nothing fancy, just the ability to recognize <tabber/> tags and a simple dialog with code editor to edit the Tabber code. It would be iterated upon in the future.
34 lines
753 B
JavaScript
34 lines
753 B
JavaScript
/**
|
|
* ContentEditable MediaWiki Tabber node.
|
|
*
|
|
* @class
|
|
* @extends ve.ce.MWBlockExtensionNode
|
|
*
|
|
* @constructor
|
|
* @param {ve.dm.MWTabberNode} model Model to observe
|
|
* @param {Object} [config] Configuration options
|
|
*/
|
|
ve.ce.MWTabberNode = function VeCeMWTabberNode() {
|
|
// Parent constructor
|
|
ve.ce.MWTabberNode.super.apply( this, arguments );
|
|
|
|
// DOM changes
|
|
this.$element.addClass( 've-ce-mwTabberNode' );
|
|
};
|
|
|
|
/* Inheritance */
|
|
|
|
OO.inheritClass( ve.ce.MWTabberNode, ve.ce.MWBlockExtensionNode );
|
|
|
|
/* Static Properties */
|
|
|
|
ve.ce.MWTabberNode.static.name = 'mwTabber';
|
|
|
|
ve.ce.MWTabberNode.static.tagName = 'div';
|
|
|
|
ve.ce.MWTabberNode.static.primaryCommandName = 'mwTabber';
|
|
|
|
/* Registration */
|
|
|
|
ve.ce.nodeFactory.register( ve.ce.MWTabberNode );
|