|
|
// 修改WikiEditor的替换文本框
if (['edit', 'submit'].includes( action ) && skin == 'vector') {
$( this'body'). replaceWith( $on(' <textarea>click', {id: "'input#wikieditor-toolbar-replace-replace "', tabindex:10}function() {▼
mw.loader.using( 'jquery.textSelection' ).then(() => {
$('body'this).onreplaceWith( $('click<textarea>', 'input#{id: "wikieditor-toolbar-replace-replace'", function(tabindex:10}) {
}). keypresson( 'keydown keypress', e => { if (e.keyCode == '13') { e.stopPropagation(); } }) ); ▼
▲ $(this).replaceWith( $('<textarea>', {id: "wikieditor-toolbar-replace-replace", tabindex:10})
.keydown(function(e) {
if (e.keyCode == '13') {
e.stopPropagation();
$(this).textSelection( 'replaceSelection', '\n' );
}
▲ }).keypress(e => { if (e.keyCode == '13') { e.stopPropagation(); } }) );
});
});
}
|