Make extension body the default description for extension nodes

Change-Id: Ifada2a6a0279e64a1ba82f49e03884e362516a83
This commit is contained in:
Ed Sanders 2019-07-31 16:38:27 +01:00
parent 51b93cea94
commit 89ecd64a55

View file

@ -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 */
/**