User:Nardog/CodeEditorAssist.js: Difference between revisions

Content deleted Content added
Created page with '$(function codeEditorAssist() { let handleEditor = (editor, isEdit) => { if (isEdit && ['loading', 'loaded', 'executing', 'ready'].includes(mw.loader.getState...'
 
No edit summary
Line 1:
$(function codeEditorAssist() {
let handleEditor = (editor, isEdit) => {
isEdit && mw.loader.loadusing(['ext.wikiEditor', 'oojs-ui.styles.icons-interactions'], (); => {
if (isEdit && ['loading', 'loaded', 'executing', 'ready'].includes(mw.loader.getState('ext.wikiEditor'))) {
mw.loader.using$('ext#wpTextbox1').wikiEditor('addToToolbar', () => {
section: 'main',
mw.loader.load('oojs-ui.styles.icons-interactions');
group: 'codeeditor-style',
$('#wpTextbox1').wikiEditor('addToToolbar', {
sectiontools: 'main',{
group: 'codeeditor-stylesettings',: {
label: 'Open code editor settings',
tools: {
'codeeditor-settings'type: {'button',
labeloouiIcon: 'Open code editor settings',
typeaction: 'button',{
oouiIcontype: 'settingscallback',
actionexecute: () => {
type: editor.execCommand('callbackshowSettingsMenu',);
execute: () => {
editor.execCommand('showSettingsMenu');
}
}
}
}
});
});
});
let defSettings;