: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
classes: 'sidebar-toolbar',
createSidebar: createSidebar
var fireSkinLoaded$1 = function (editor) {
editor._skinLoaded = true;
Events.fireSkinLoaded(editor);
if (editor.initialized) {
var SkinLoaded = { fireSkinLoaded: fireSkinLoaded$1 };
var DOM$2 = global$3.DOM;
var switchMode = function (panel) {
panel.find('*').disabled(e.mode === 'readonly');
var editArea = function (border) {
var editAreaContainer = function (editor) {
classes: 'edit-aria-container',
Sidebar.createSidebar(editor)
var render = function (editor, theme, args) {
var panel, resizeHandleCtrl, startSize;
if (isSkinDisabled(editor) === false && args.skinUiCss) {
DOM$2.styleSheetLoader.load(args.skinUiCss, SkinLoaded.fireSkinLoaded(editor));
SkinLoaded.fireSkinLoaded(editor)();
panel = theme.panel = global$4.create({
style: 'visibility: hidden',
hasMenubar(editor) === false ? null : {
items: Menubar.createMenuButtons(editor)
Toolbar.createToolbars(editor, getToolbarSize(editor))
Sidebar.hasSidebar(editor) ? editAreaContainer(editor) : editArea('1 0 0 0')
UiContainer.setUiContainer(editor, panel);
if (getResize(editor) !== 'none') {
direction: getResize(editor),
onResizeStart: function () {
var elm = editor.getContentAreaContainer().firstChild;
if (getResize(editor) === 'both') {
Resize.resizeTo(editor, startSize.width + e.deltaX, startSize.height + e.deltaY);
Resize.resizeTo(editor, null, startSize.height + e.deltaY);
if (hasStatusbar(editor)) {
var linkHtml = '<a href="https://www.tiny.cloud/?utm_campaign=editor_referral&utm_medium=poweredby&utm_source=tinymce" rel="noopener" target="_blank" role="presentation" tabindex="-1">Tiny</a>';
var html = global$5.translate([
var brandingLabel = isBrandingEnabled(editor) ? {
Events.fireBeforeRenderUI(editor);
editor.on('SwitchMode', switchMode(panel));
panel.renderBefore(args.targetNode).reflow();
if (isReadOnly(editor)) {
editor.setMode('readonly');
DOM$2.setStyle(panel.getEl(), 'width', args.width);
editor.on('remove', function () {
A11y.addKeys(editor, panel);
ContextToolbars.addContextualToolbars(editor);
iframeContainer: panel.find('#iframe')[0].getEl(),
editorContainer: panel.getEl()
var Iframe = { render: render };
var global$9 = tinymce.util.Tools.resolve('tinymce.dom.DomQuery');
return 'mceu_' + count++;
create: function (name, attrs, children) {
var elm = domGlobals.document.createElement(name);
global$3.DOM.setAttribs(elm, attrs);
if (typeof children === 'string') {
elm.innerHTML = children;
global$2.each(children, function (child) {
createFragment: function (html) {
return global$3.DOM.createFragment(html);
getWindowSize: function () {
return global$3.DOM.getViewPort();
getSize: function (elm) {
if (elm.getBoundingClientRect) {
var rect = elm.getBoundingClientRect();
width = Math.max(rect.width || rect.right - rect.left, elm.offsetWidth);
height = Math.max(rect.height || rect.bottom - rect.bottom, elm.offsetHeight);
height = elm.offsetHeight;
getPos: function (elm, root) {
return global$3.DOM.getPos(elm, root || funcs.getContainer());
getContainer: function () {
return global$8.container ? global$8.container : domGlobals.document.body;
getViewPort: function (win) {
return global$3.DOM.getViewPort(win);
return domGlobals.document.getElementById(id);
addClass: function (elm, cls) {
return global$3.DOM.addClass(elm, cls);
removeClass: function (elm, cls) {
return global$3.DOM.removeClass(elm, cls);
hasClass: function (elm, cls) {
return global$3.DOM.hasClass(elm, cls);
toggleClass: function (elm, cls, state) {
return global$3.DOM.toggleClass(elm, cls, state);
css: function (elm, name, value) {
return global$3.DOM.setStyle(elm, name, value);
getRuntimeStyle: function (elm, name) {
return global$3.DOM.getStyle(elm, name, true);
on: function (target, name, callback, scope) {
return global$3.DOM.bind(target, name, callback, scope);
off: function (target, name, callback) {
return global$3.DOM.unbind(target, name, callback);
fire: function (target, name, args) {
return global$3.DOM.fire(target, name, args);
innerHtml: function (elm, html) {
global$3.DOM.setHTML(elm, html);
var isStatic = function (elm) {
return funcs.getRuntimeStyle(elm, 'position') === 'static';
var isFixed = function (ctrl) {
return ctrl.state.get('fixed');
function calculateRelativePosition(ctrl, targetElm, rel) {
var ctrlElm, pos, x, y, selfW, selfH, targetW, targetH, viewport, size;
viewport = getWindowViewPort();
pos = funcs.getPos(targetElm, UiContainer.getUiContainer(ctrl));
if (isFixed(ctrl) && isStatic(domGlobals.document.body)) {
size = funcs.getSize(ctrlElm);
size = funcs.getSize(targetElm);
rel = (rel || '').split('');
y += Math.round(targetH / 2);
x += Math.round(targetW / 2);
y -= Math.round(selfH / 2);
x -= Math.round(selfW / 2);
var getUiContainerViewPort = function (customUiContainer) {
w: customUiContainer.scrollWidth - 1,
h: customUiContainer.scrollHeight - 1
var getWindowViewPort = function () {
var win = domGlobals.window;
var x = Math.max(win.pageXOffset, domGlobals.document.body.scrollLeft, domGlobals.document.documentElement.scrollLeft);
var y = Math.max(win.pageYOffset, domGlobals.document.body.scrollTop, domGlobals.document.documentElement.scrollTop);
var w = win.innerWidth || domGlobals.document.documentElement.clientWidth;
var h = win.innerHeight || domGlobals.document.documentElement.clientHeight;
var getViewPortRect = function (ctrl) {
var customUiContainer = UiContainer.getUiContainer(ctrl);
return customUiContainer && !isFixed(ctrl) ? getUiContainerViewPort(customUiContainer) : getWindowViewPort();
testMoveRel: function (elm, rels) {
var viewPortRect = getViewPortRect(this);
for (var i = 0; i < rels.length; i++) {
var pos = calculateRelativePosition(this, elm, rels[i]);
if (pos.x > 0 && pos.x + pos.w < viewPortRect.w && pos.y > 0 && pos.y + pos.h < viewPortRect.h) {
if (pos.x > viewPortRect.x && pos.x + pos.w < viewPortRect.w + viewPortRect.x && pos.y > viewPortRect.y && pos.y + pos.h < viewPortRect.h + viewPortRect.y) {
moveRel: function (elm, rel) {
if (typeof rel !== 'string') {
rel = this.testMoveRel(elm, rel);
var pos = calculateRelativePosition(this, elm, rel);
return this.moveTo(pos.x, pos.y);
moveBy: function (dx, dy) {
var self = this, rect = self.layoutRect();
self.moveTo(rect.x + dx, rect.y + dy);
moveTo: function (x, y) {
function constrain(value, max, size) {
if (value + size > max) {
return value < 0 ? 0 : value;
if (self.settings.constrainToViewport) {
var viewPortRect = getViewPortRect(this);
var layoutRect = self.layoutRect();
x = constrain(x, viewPortRect.w + viewPortRect.x, layoutRect.w);
y = constrain(y, viewPortRect.h + viewPortRect.y, layoutRect.h);
var uiContainer = UiContainer.getUiContainer(self);
if (uiContainer && isStatic(uiContainer) && !isFixed(self)) {
x -= uiContainer.scrollLeft;
y -= uiContainer.scrollTop;
if (self.state.get('rendered')) {
var global$a = tinymce.util.Tools.resolve('tinymce.util.Class');
var global$b = tinymce.util.Tools.resolve('tinymce.util.EventDispatcher');
parseBox: function (value) {
if (typeof value === 'number') {
value = value.split(' ');
value[1] = value[2] = value[3] = value[0];
top: parseInt(value[0], radix) || 0,
right: parseInt(value[1], radix) || 0,
bottom: parseInt(value[2], radix) || 0,
left: parseInt(value[3], radix) || 0
measureBox: function (elm, prefix) {
function getStyle(name) {
var defaultView = elm.ownerDocument.defaultView;
var computedStyle = defaultView.getComputedStyle(elm, null);
name = name.replace(/[A-Z]/g, function (a) {
return computedStyle.getPropertyValue(name);
return elm.currentStyle[name];
var val = parseFloat(getStyle(name));
return isNaN(val) ? 0 : val;
top: getSide(prefix + 'TopWidth'),
right: getSide(prefix + 'RightWidth'),
bottom: getSide(prefix + 'BottomWidth'),
left: getSide(prefix + 'LeftWidth')
function ClassList(onchange) {
this.onchange = onchange || noop$1;
global$2.extend(ClassList.prototype, {
if (cls && !this.contains(cls)) {
this.cls._map[cls] = true;
if (this.contains(cls)) {
for (i = 0; i < this.cls.length; i++) {
if (this.cls[i] === cls) {
delete this.cls._map[cls];
toggle: function (cls, state) {
var curState = this.contains(cls);