- md5
- 6e92d45a201cc1505a06723744a75553
- sha1
- 5fd72ac5dc0ec6049df5645ec3519b93fe135d93
- sha256
- 7867623f26f716155bac55420d12605635f4d64b54cf3be55b9a92db04b789f0
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
/**
* TinyMCE version 8.10.1 (2026-10-28)
*/
(function () {
'use strict';
var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
const setContent = (editor, html) => {
// We get a lovely "Wrong document" error in IE 11 if we
// don't move the focus to the editor before creating an undo
// transaction since it tries to make a bookmark for the current selection
editor.focus();
editor.undoManager.transact(() => {
editor.setContent(html);
});
editor.selection.setCursorLocation();
editor.nodeChanged();
};
const getContent = (editor) => {
return editor.getContent({ source_view: true });
};
const open = (editor) => {
const editorContent = getContent(editor);
editor.windowManager.open({
title: 'Source Code',
size: 'large',
body: {
type: 'panel',
items: [
{
type: 'textarea',
name: 'code',
spellcheck: false,
}
]
},
buttons: [
{
type: 'cancel',
name: 'cancel',
text: 'Cancel'
},
{
type: 'submit',
name: 'save',
text: 'Save',
primary: true
}
],
initialData: {
code: editorContent
},
onSubmit: (api) => {
setContent(editor, api.getData().code);
api.close();
}
});
};
const register$1 = (editor) => {
editor.addCommand('mceCodeEditor', () => {
open(editor);
});
};
const register = (editor) => {
const onAction = () => editor.execCommand('mceCodeEditor');
editor.ui.registry.addButton('code', {
icon: 'sourcecode',
tooltip: 'Source code',
onAction
});
editor.ui.registry.addMenuItem('code', {
icon: 'sourcecode',
text: 'Source code',
onAction
});
};
const PLUGIN_CODE = 'code';
var Plugin = () => {
global.add(PLUGIN_CODE, (editor) => {
register$1(editor);
register(editor);
return {
getMetadata: () => ({ name: 'Code', type: 'opensource', slug: PLUGIN_CODE })
};
});
};
Plugin();
/** *****
* DO NOT EXPORT ANYTHING
*
* IF YOU DO ROLLUP WILL LEAVE A GLOBAL ON THE PAGE
*******/
})();
The same content is in 2 releases, Joomla 6.2.1-rc1 to 6.2.1. See them all, or every version of this file.