mediawiki-extensions-Discus.../modules/dt-ve/dt.ce.MWSignatureNode.js
Bartosz Dziewoński ee69365b82 Signature handling in visual mode
Load 'ext.visualEditor.mwsignature' (which implements VE's existing
handling for signatures), then subclass and override a bunch of things
in order to:

* Replace the context menu with a note that you don't need to type the
  signature when commenting using the reply widget

* Override the sequence/command to insert signature so that it selects
  it afterwards and thus displays the context menu

* Treat signatures as signature nodes when switching from wikitext,
  instead of the normal pre-save transform turning them into regular
  links and text

Bug: T255738
Change-Id: Icb542451c2307ab51e56bd627804096c7b5552c8
2020-07-16 01:32:19 +02:00

13 lines
318 B
JavaScript

function DtCeMWSignatureNode() {
// Parent constructor
DtCeMWSignatureNode.super.apply( this, arguments );
}
OO.inheritClass( DtCeMWSignatureNode, ve.ce.MWSignatureNode );
DtCeMWSignatureNode.static.name = 'dtMwSignature';
ve.ce.nodeFactory.register( DtCeMWSignatureNode );
module.exports = DtCeMWSignatureNode;