In case it helps, here is the code I used to achieve what I wanted.
This one defineds a "CrossedOut" button that adds a simple template {{CrossedOut|MyText}} that put "strikethroug" formatting (with a custom infotip) to the selection.
ve.ui.CrossedOutCommand = function VeUiCrossedOutCommand() {
ve.ui.CrossedOutCommand.super.call( this, 'CrossedOut' );
};
OO.inheritClass( ve.ui.CrossedOutCommand, ve.ui.Command );
ve.ui.CrossedOutCommand.prototype.execute = function ( surface ) {
var model = surface.getModel(),
doc = model.getDocument(),
range = model.getSelection().getRange(),
docRange = doc.shallowCloneFromRange( range );
ve.init.target.getWikitextFragment( docRange, false ).done( function ( wikitext ) {
model.getFragment().insertContent([
{
type: 'mwTransclusionInline',
attributes: {
mw: {
parts: [{
template: {
target: {
href: 'Template:CrossedOut',
wt: 'CrossedOut'
},
params: {
1: {
wt: wikitext
}
}
}
}]
}
}
} , {
type: '/mwTransclusionInline'
} ] );
} );
};
ve.ui.commandRegistry.register( new ve.ui.CrossedOutCommand() );
ve.ui.CrossedOutTool = function VeUiCrossedOutTool() {
ve.ui.CrossedOutTool.super.apply( this, arguments );
};
OO.inheritClass( ve.ui.CrossedOutTool, ve.ui.Tool );
ve.ui.CrossedOutTool.static.name = 'CrossedOut';
ve.ui.CrossedOutTool.static.icon = 'strikethrough';
ve.ui.CrossedOutTool.static.title = OO.ui.deferMsg('CrossedOut');
ve.ui.CrossedOutTool.static.commandName = 'CrossedOut';
ve.ui.toolFactory.register( ve.ui.CrossedOutTool );