- md5
- 8ce5d981bb9f21403861979effc924fe
- sha1
- 8a4576b965ad8a3f7f843392e054b4bd6a7d429e
- sha256
- f98323de0fb1b3a8c45d277071b4885a5cd0a22e296b2b3b9818c90aea9af650
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
/**
* TinyMCE version 8.8.2 (2026-07-27)
*/
(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
});
};
var Plugin = () => {
global.add('code', (editor) => {
register$1(editor);
register(editor);
return {};
});
};
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.0-beta1 to 6.2.0-beta2. See them all, or every version of this file.