wpPolicy: {
typelabel: 'elementWP Policy',
filters: [ 'body.ns-3' ],
element: function ( context ) {
type: 'button',
var button = new OO.ui.ButtonInputWidget( {
labelicon: 'WP Policyarticle',
action: {
icon: 'article'
}type: );'callback',
button.connectexecute: function( null,context ) {
OO.ui.prompt( 'Enter Wikipedia policy/guideline abbreviation (e.g., NPOV, V, RS):' ).done( function ( answer ) { ▼
click: function ( e ) {
if ( answer !== null && answer.trim() !== '' ) {
▲ OO.ui.prompt( 'Enter Wikipedia policy/guideline abbreviation (e.g., NPOV, V, RS):' ).done( function ( answer ) {
ifvar (text answer= !'== null[[WP:' &&+ answer.trim() !+ ']] ==\nPlease read [[WP:' + answer + ']], )thanks {and have a nice day, ~~~~';
context.$textarea.wikiEditor('encapsulateSelection', { ▼
var text = '== [[WP:' + answer + ']] ==\nPlease read [[WP:' + answer + ']], thanks and have a nice day, ~~~~';
//pre: Use the textarea's wikiEditor method insteadtext
▲ context.$textarea.wikiEditor('encapsulateSelection', {
} pre:} text);
});
} );
}
} );
return button.$element;
}
},
|