mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-24 22:35:41 +00:00
Make extension body the default description for extension nodes
Change-Id: Ifada2a6a0279e64a1ba82f49e03884e362516a83
This commit is contained in:
parent
51b93cea94
commit
89ecd64a55
|
@ -48,6 +48,11 @@ ve.ce.MWExtensionNode.static.rendersEmpty = false;
|
|||
|
||||
ve.ce.MWExtensionNode.static.iconWhenInvisible = 'markup';
|
||||
|
||||
ve.ce.MWExtensionNode.static.getDescription = function ( model ) {
|
||||
var body = ve.getProp( model.getAttribute( 'mw' ), 'body', 'extsrc' ) || '';
|
||||
return body.slice( 0, 100 ) + ( body.length > 100 ? '…' : '' );
|
||||
};
|
||||
|
||||
/* Methods */
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue