mirror of
https://github.com/documize/community.git
synced 2025-07-24 07:39:43 +02:00
WIP vendored dep upgrades
This commit is contained in:
parent
5f59e95495
commit
6409ad0d63
190 changed files with 64265 additions and 109666 deletions
0
gui/public/tinymce/plugins/visualblocks/css/visualblocks.css
Executable file → Normal file
0
gui/public/tinymce/plugins/visualblocks/css/visualblocks.css
Executable file → Normal file
572
gui/public/tinymce/plugins/visualblocks/plugin.js
Executable file → Normal file
572
gui/public/tinymce/plugins/visualblocks/plugin.js
Executable file → Normal file
|
@ -1,459 +1,135 @@
|
|||
(function () {
|
||||
var visualblocks = (function () {
|
||||
'use strict';
|
||||
|
||||
var defs = {}; // id -> {dependencies, definition, instance (possibly undefined)}
|
||||
|
||||
// Used when there is no 'main' module.
|
||||
// The name is probably (hopefully) unique so minification removes for releases.
|
||||
var register_3795 = function (id) {
|
||||
var module = dem(id);
|
||||
var fragments = id.split('.');
|
||||
var target = Function('return this;')();
|
||||
for (var i = 0; i < fragments.length - 1; ++i) {
|
||||
if (target[fragments[i]] === undefined)
|
||||
target[fragments[i]] = {};
|
||||
target = target[fragments[i]];
|
||||
}
|
||||
target[fragments[fragments.length - 1]] = module;
|
||||
};
|
||||
|
||||
var instantiate = function (id) {
|
||||
var actual = defs[id];
|
||||
var dependencies = actual.deps;
|
||||
var definition = actual.defn;
|
||||
var len = dependencies.length;
|
||||
var instances = new Array(len);
|
||||
for (var i = 0; i < len; ++i)
|
||||
instances[i] = dem(dependencies[i]);
|
||||
var defResult = definition.apply(null, instances);
|
||||
if (defResult === undefined)
|
||||
throw 'module [' + id + '] returned undefined';
|
||||
actual.instance = defResult;
|
||||
};
|
||||
|
||||
var def = function (id, dependencies, definition) {
|
||||
if (typeof id !== 'string')
|
||||
throw 'module id must be a string';
|
||||
else if (dependencies === undefined)
|
||||
throw 'no dependencies for ' + id;
|
||||
else if (definition === undefined)
|
||||
throw 'no definition function for ' + id;
|
||||
defs[id] = {
|
||||
deps: dependencies,
|
||||
defn: definition,
|
||||
instance: undefined
|
||||
var Cell = function (initial) {
|
||||
var value = initial;
|
||||
var get = function () {
|
||||
return value;
|
||||
};
|
||||
var set = function (v) {
|
||||
value = v;
|
||||
};
|
||||
var clone = function () {
|
||||
return Cell(get());
|
||||
};
|
||||
return {
|
||||
get: get,
|
||||
set: set,
|
||||
clone: clone
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
var dem = function (id) {
|
||||
var actual = defs[id];
|
||||
if (actual === undefined)
|
||||
throw 'module [' + id + '] was undefined';
|
||||
else if (actual.instance === undefined)
|
||||
instantiate(id);
|
||||
return actual.instance;
|
||||
};
|
||||
var PluginManager = tinymce.util.Tools.resolve('tinymce.PluginManager');
|
||||
|
||||
var req = function (ids, callback) {
|
||||
var len = ids.length;
|
||||
var instances = new Array(len);
|
||||
for (var i = 0; i < len; ++i)
|
||||
instances[i] = dem(ids[i]);
|
||||
callback.apply(null, instances);
|
||||
};
|
||||
var fireVisualBlocks = function (editor, state) {
|
||||
editor.fire('VisualBlocks', { state: state });
|
||||
};
|
||||
var $_89exg7qsjcg89f24 = { fireVisualBlocks: fireVisualBlocks };
|
||||
|
||||
var ephox = {};
|
||||
var isEnabledByDefault = function (editor) {
|
||||
return editor.getParam('visualblocks_default_state', false);
|
||||
};
|
||||
var getContentCss = function (editor) {
|
||||
return editor.settings.visualblocks_content_css;
|
||||
};
|
||||
var $_fo3ncmqtjcg89f25 = {
|
||||
isEnabledByDefault: isEnabledByDefault,
|
||||
getContentCss: getContentCss
|
||||
};
|
||||
|
||||
ephox.bolt = {
|
||||
module: {
|
||||
api: {
|
||||
define: def,
|
||||
require: req,
|
||||
demand: dem
|
||||
}
|
||||
}
|
||||
};
|
||||
var DOMUtils = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils');
|
||||
|
||||
var define = def;
|
||||
var require = req;
|
||||
var demand = dem;
|
||||
// this helps with minification when using a lot of global references
|
||||
var defineGlobal = function (id, ref) {
|
||||
define(id, [], function () { return ref; });
|
||||
};
|
||||
/*jsc
|
||||
["tinymce.plugins.visualblocks.Plugin","ephox.katamari.api.Cell","tinymce.core.PluginManager","tinymce.plugins.visualblocks.api.Commands","tinymce.plugins.visualblocks.core.Bindings","tinymce.plugins.visualblocks.ui.Buttons","global!tinymce.util.Tools.resolve","tinymce.plugins.visualblocks.core.VisualBlocks","tinymce.plugins.visualblocks.api.Settings","tinymce.plugins.visualblocks.api.Events","tinymce.plugins.visualblocks.core.LoadCss","tinymce.core.dom.DOMUtils","tinymce.core.util.Tools"]
|
||||
jsc*/
|
||||
define(
|
||||
'ephox.katamari.api.Cell',
|
||||
var Tools = tinymce.util.Tools.resolve('tinymce.util.Tools');
|
||||
|
||||
[
|
||||
],
|
||||
|
||||
function () {
|
||||
var Cell = function (initial) {
|
||||
var value = initial;
|
||||
|
||||
var get = function () {
|
||||
return value;
|
||||
};
|
||||
|
||||
var set = function (v) {
|
||||
value = v;
|
||||
};
|
||||
|
||||
var clone = function () {
|
||||
return Cell(get());
|
||||
};
|
||||
|
||||
return {
|
||||
get: get,
|
||||
set: set,
|
||||
clone: clone
|
||||
};
|
||||
};
|
||||
|
||||
return Cell;
|
||||
}
|
||||
);
|
||||
|
||||
defineGlobal("global!tinymce.util.Tools.resolve", tinymce.util.Tools.resolve);
|
||||
/**
|
||||
* ResolveGlobal.js
|
||||
*
|
||||
* Released under LGPL License.
|
||||
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
|
||||
define(
|
||||
'tinymce.core.PluginManager',
|
||||
[
|
||||
'global!tinymce.util.Tools.resolve'
|
||||
],
|
||||
function (resolve) {
|
||||
return resolve('tinymce.PluginManager');
|
||||
}
|
||||
);
|
||||
|
||||
/**
|
||||
* Events.js
|
||||
*
|
||||
* Released under LGPL License.
|
||||
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
|
||||
define(
|
||||
'tinymce.plugins.visualblocks.api.Events',
|
||||
[
|
||||
],
|
||||
function () {
|
||||
var fireVisualBlocks = function (editor, state) {
|
||||
editor.fire('VisualBlocks', { state: state });
|
||||
};
|
||||
|
||||
return {
|
||||
fireVisualBlocks: fireVisualBlocks
|
||||
};
|
||||
}
|
||||
);
|
||||
/**
|
||||
* Settings.js
|
||||
*
|
||||
* Released under LGPL License.
|
||||
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
|
||||
define(
|
||||
'tinymce.plugins.visualblocks.api.Settings',
|
||||
[
|
||||
],
|
||||
function () {
|
||||
var isEnabledByDefault = function (editor) {
|
||||
return editor.getParam('visualblocks_default_state', false);
|
||||
};
|
||||
|
||||
var getContentCss = function (editor) {
|
||||
return editor.settings.visualblocks_content_css;
|
||||
};
|
||||
|
||||
return {
|
||||
isEnabledByDefault: isEnabledByDefault,
|
||||
getContentCss: getContentCss
|
||||
};
|
||||
}
|
||||
);
|
||||
/**
|
||||
* ResolveGlobal.js
|
||||
*
|
||||
* Released under LGPL License.
|
||||
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
|
||||
define(
|
||||
'tinymce.core.dom.DOMUtils',
|
||||
[
|
||||
'global!tinymce.util.Tools.resolve'
|
||||
],
|
||||
function (resolve) {
|
||||
return resolve('tinymce.dom.DOMUtils');
|
||||
}
|
||||
);
|
||||
|
||||
/**
|
||||
* ResolveGlobal.js
|
||||
*
|
||||
* Released under LGPL License.
|
||||
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
|
||||
define(
|
||||
'tinymce.core.util.Tools',
|
||||
[
|
||||
'global!tinymce.util.Tools.resolve'
|
||||
],
|
||||
function (resolve) {
|
||||
return resolve('tinymce.util.Tools');
|
||||
}
|
||||
);
|
||||
|
||||
/**
|
||||
* LoadCss.js
|
||||
*
|
||||
* Released under LGPL License.
|
||||
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
|
||||
define(
|
||||
'tinymce.plugins.visualblocks.core.LoadCss',
|
||||
[
|
||||
'tinymce.core.dom.DOMUtils',
|
||||
'tinymce.core.util.Tools'
|
||||
],
|
||||
function (DOMUtils, Tools) {
|
||||
var cssId = DOMUtils.DOM.uniqueId();
|
||||
|
||||
var load = function (doc, url) {
|
||||
var linkElements = Tools.toArray(doc.getElementsByTagName('link'));
|
||||
var matchingLinkElms = Tools.grep(linkElements, function (head) {
|
||||
return head.id === cssId;
|
||||
});
|
||||
|
||||
if (matchingLinkElms.length === 0) {
|
||||
var linkElm = DOMUtils.DOM.create('link', {
|
||||
id: cssId,
|
||||
rel: 'stylesheet',
|
||||
href: url
|
||||
});
|
||||
|
||||
doc.getElementsByTagName('head')[0].appendChild(linkElm);
|
||||
}
|
||||
};
|
||||
|
||||
return {
|
||||
load: load
|
||||
};
|
||||
}
|
||||
);
|
||||
/**
|
||||
* VisualBlocks.js
|
||||
*
|
||||
* Released under LGPL License.
|
||||
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
|
||||
define(
|
||||
'tinymce.plugins.visualblocks.core.VisualBlocks',
|
||||
[
|
||||
'tinymce.plugins.visualblocks.api.Events',
|
||||
'tinymce.plugins.visualblocks.api.Settings',
|
||||
'tinymce.plugins.visualblocks.core.LoadCss'
|
||||
],
|
||||
function (Events, Settings, LoadCss) {
|
||||
var toggleVisualBlocks = function (editor, pluginUrl, enabledState) {
|
||||
var dom = editor.dom;
|
||||
var contentCss = Settings.getContentCss(editor);
|
||||
|
||||
LoadCss.load(editor.getDoc(), contentCss ? contentCss : pluginUrl + '/css/visualblocks.css');
|
||||
dom.toggleClass(editor.getBody(), 'mce-visualblocks');
|
||||
enabledState.set(!enabledState.get());
|
||||
|
||||
Events.fireVisualBlocks(editor, enabledState.get());
|
||||
};
|
||||
|
||||
return {
|
||||
toggleVisualBlocks: toggleVisualBlocks
|
||||
};
|
||||
}
|
||||
);
|
||||
/**
|
||||
* Commands.js
|
||||
*
|
||||
* Released under LGPL License.
|
||||
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
|
||||
define(
|
||||
'tinymce.plugins.visualblocks.api.Commands',
|
||||
[
|
||||
'tinymce.plugins.visualblocks.core.VisualBlocks'
|
||||
],
|
||||
function (VisualBlocks) {
|
||||
var register = function (editor, pluginUrl, enabledState) {
|
||||
editor.addCommand('mceVisualBlocks', function () {
|
||||
VisualBlocks.toggleVisualBlocks(editor, pluginUrl, enabledState);
|
||||
});
|
||||
};
|
||||
|
||||
return {
|
||||
register: register
|
||||
};
|
||||
}
|
||||
);
|
||||
/**
|
||||
* Bindings.js
|
||||
*
|
||||
* Released under LGPL License.
|
||||
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
|
||||
define(
|
||||
'tinymce.plugins.visualblocks.core.Bindings',
|
||||
[
|
||||
'tinymce.plugins.visualblocks.api.Settings',
|
||||
'tinymce.plugins.visualblocks.core.VisualBlocks'
|
||||
],
|
||||
function (Settings, VisualBlocks) {
|
||||
var setup = function (editor, pluginUrl, enabledState) {
|
||||
// Prevents the visualblocks from being presented in the preview of formats when that is computed
|
||||
editor.on('PreviewFormats AfterPreviewFormats', function (e) {
|
||||
if (enabledState.get()) {
|
||||
editor.dom.toggleClass(editor.getBody(), 'mce-visualblocks', e.type === 'afterpreviewformats');
|
||||
}
|
||||
});
|
||||
|
||||
editor.on('init', function () {
|
||||
if (Settings.isEnabledByDefault(editor)) {
|
||||
VisualBlocks.toggleVisualBlocks(editor, pluginUrl, enabledState);
|
||||
}
|
||||
});
|
||||
|
||||
editor.on('remove', function () {
|
||||
editor.dom.removeClass(editor.getBody(), 'mce-visualblocks');
|
||||
});
|
||||
};
|
||||
|
||||
return {
|
||||
setup: setup
|
||||
};
|
||||
}
|
||||
);
|
||||
/**
|
||||
* Buttons.js
|
||||
*
|
||||
* Released under LGPL License.
|
||||
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
|
||||
define(
|
||||
'tinymce.plugins.visualblocks.ui.Buttons',
|
||||
[
|
||||
'tinymce.plugins.visualblocks.core.VisualBlocks'
|
||||
],
|
||||
function (VisualBlocks) {
|
||||
var toggleActiveState = function (editor, enabledState) {
|
||||
return function (e) {
|
||||
var ctrl = e.control;
|
||||
|
||||
ctrl.active(enabledState.get());
|
||||
|
||||
editor.on('VisualBlocks', function (e) {
|
||||
ctrl.active(e.state);
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
var register = function (editor, enabledState) {
|
||||
editor.addButton('visualblocks', {
|
||||
active: false,
|
||||
title: 'Show blocks',
|
||||
cmd: 'mceVisualBlocks',
|
||||
onPostRender: toggleActiveState(editor, enabledState)
|
||||
});
|
||||
|
||||
editor.addMenuItem('visualblocks', {
|
||||
text: 'Show blocks',
|
||||
cmd: 'mceVisualBlocks',
|
||||
onPostRender: toggleActiveState(editor, enabledState),
|
||||
selectable: true,
|
||||
context: 'view',
|
||||
prependToContext: true
|
||||
});
|
||||
};
|
||||
|
||||
return {
|
||||
register: register
|
||||
};
|
||||
}
|
||||
);
|
||||
/**
|
||||
* Plugin.js
|
||||
*
|
||||
* Released under LGPL License.
|
||||
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
|
||||
define(
|
||||
'tinymce.plugins.visualblocks.Plugin',
|
||||
[
|
||||
'ephox.katamari.api.Cell',
|
||||
'tinymce.core.PluginManager',
|
||||
'tinymce.plugins.visualblocks.api.Commands',
|
||||
'tinymce.plugins.visualblocks.core.Bindings',
|
||||
'tinymce.plugins.visualblocks.ui.Buttons'
|
||||
],
|
||||
function (Cell, PluginManager, Commands, Bindings, Buttons) {
|
||||
PluginManager.add('visualblocks', function (editor, pluginUrl) {
|
||||
var enabledState = Cell(false);
|
||||
|
||||
Commands.register(editor, pluginUrl, enabledState);
|
||||
Buttons.register(editor, enabledState);
|
||||
Bindings.setup(editor, pluginUrl, enabledState);
|
||||
var cssId = DOMUtils.DOM.uniqueId();
|
||||
var load = function (doc, url) {
|
||||
var linkElements = Tools.toArray(doc.getElementsByTagName('link'));
|
||||
var matchingLinkElms = Tools.grep(linkElements, function (head) {
|
||||
return head.id === cssId;
|
||||
});
|
||||
if (matchingLinkElms.length === 0) {
|
||||
var linkElm = DOMUtils.DOM.create('link', {
|
||||
id: cssId,
|
||||
rel: 'stylesheet',
|
||||
href: url
|
||||
});
|
||||
doc.getElementsByTagName('head')[0].appendChild(linkElm);
|
||||
}
|
||||
};
|
||||
var $_bmljwjqujcg89f2a = { load: load };
|
||||
|
||||
return function () { };
|
||||
}
|
||||
);
|
||||
dem('tinymce.plugins.visualblocks.Plugin')();
|
||||
})();
|
||||
var toggleVisualBlocks = function (editor, pluginUrl, enabledState) {
|
||||
var dom = editor.dom;
|
||||
var contentCss = $_fo3ncmqtjcg89f25.getContentCss(editor);
|
||||
$_bmljwjqujcg89f2a.load(editor.getDoc(), contentCss ? contentCss : pluginUrl + '/css/visualblocks.css');
|
||||
dom.toggleClass(editor.getBody(), 'mce-visualblocks');
|
||||
enabledState.set(!enabledState.get());
|
||||
$_89exg7qsjcg89f24.fireVisualBlocks(editor, enabledState.get());
|
||||
};
|
||||
var $_2xe1ikqrjcg89f22 = { toggleVisualBlocks: toggleVisualBlocks };
|
||||
|
||||
var register = function (editor, pluginUrl, enabledState) {
|
||||
editor.addCommand('mceVisualBlocks', function () {
|
||||
$_2xe1ikqrjcg89f22.toggleVisualBlocks(editor, pluginUrl, enabledState);
|
||||
});
|
||||
};
|
||||
var $_68h5i2qqjcg89f21 = { register: register };
|
||||
|
||||
var setup = function (editor, pluginUrl, enabledState) {
|
||||
editor.on('PreviewFormats AfterPreviewFormats', function (e) {
|
||||
if (enabledState.get()) {
|
||||
editor.dom.toggleClass(editor.getBody(), 'mce-visualblocks', e.type === 'afterpreviewformats');
|
||||
}
|
||||
});
|
||||
editor.on('init', function () {
|
||||
if ($_fo3ncmqtjcg89f25.isEnabledByDefault(editor)) {
|
||||
$_2xe1ikqrjcg89f22.toggleVisualBlocks(editor, pluginUrl, enabledState);
|
||||
}
|
||||
});
|
||||
editor.on('remove', function () {
|
||||
editor.dom.removeClass(editor.getBody(), 'mce-visualblocks');
|
||||
});
|
||||
};
|
||||
var $_9zds94qxjcg89f2d = { setup: setup };
|
||||
|
||||
var toggleActiveState = function (editor, enabledState) {
|
||||
return function (e) {
|
||||
var ctrl = e.control;
|
||||
ctrl.active(enabledState.get());
|
||||
editor.on('VisualBlocks', function (e) {
|
||||
ctrl.active(e.state);
|
||||
});
|
||||
};
|
||||
};
|
||||
var register$1 = function (editor, enabledState) {
|
||||
editor.addButton('visualblocks', {
|
||||
active: false,
|
||||
title: 'Show blocks',
|
||||
cmd: 'mceVisualBlocks',
|
||||
onPostRender: toggleActiveState(editor, enabledState)
|
||||
});
|
||||
editor.addMenuItem('visualblocks', {
|
||||
text: 'Show blocks',
|
||||
cmd: 'mceVisualBlocks',
|
||||
onPostRender: toggleActiveState(editor, enabledState),
|
||||
selectable: true,
|
||||
context: 'view',
|
||||
prependToContext: true
|
||||
});
|
||||
};
|
||||
var $_5jyjn1qyjcg89f2e = { register: register$1 };
|
||||
|
||||
PluginManager.add('visualblocks', function (editor, pluginUrl) {
|
||||
var enabledState = Cell(false);
|
||||
$_68h5i2qqjcg89f21.register(editor, pluginUrl, enabledState);
|
||||
$_5jyjn1qyjcg89f2e.register(editor, enabledState);
|
||||
$_9zds94qxjcg89f2d.setup(editor, pluginUrl, enabledState);
|
||||
});
|
||||
var Plugin = function () {
|
||||
};
|
||||
|
||||
return Plugin;
|
||||
|
||||
}());
|
||||
})()
|
||||
|
|
2
gui/public/tinymce/plugins/visualblocks/plugin.min.js
vendored
Executable file → Normal file
2
gui/public/tinymce/plugins/visualblocks/plugin.min.js
vendored
Executable file → Normal file
|
@ -1 +1 @@
|
|||
!function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i<g;++i)h[i]=d(e[i]);var j=f.apply(null,h);if(void 0===j)throw"module ["+b+"] returned undefined";c.instance=j},c=function(b,c,d){if("string"!=typeof b)throw"module id must be a string";if(void 0===c)throw"no dependencies for "+b;if(void 0===d)throw"no definition function for "+b;a[b]={deps:c,defn:d,instance:void 0}},d=function(c){var d=a[c];if(void 0===d)throw"module ["+c+"] was undefined";return void 0===d.instance&&b(c),d.instance},e=function(a,b){for(var c=a.length,e=new Array(c),f=0;f<c;++f)e[f]=d(a[f]);b.apply(null,e)},f={};f.bolt={module:{api:{define:c,require:e,demand:d}}};var g=c,h=function(a,b){g(a,[],function(){return b})};g("1",[],function(){var a=function(b){var c=b,d=function(){return c},e=function(a){c=a},f=function(){return a(d())};return{get:d,set:e,clone:f}};return a}),h("6",tinymce.util.Tools.resolve),g("2",["6"],function(a){return a("tinymce.PluginManager")}),g("9",[],function(){var a=function(a,b){a.fire("VisualBlocks",{state:b})};return{fireVisualBlocks:a}}),g("8",[],function(){var a=function(a){return a.getParam("visualblocks_default_state",!1)},b=function(a){return a.settings.visualblocks_content_css};return{isEnabledByDefault:a,getContentCss:b}}),g("b",["6"],function(a){return a("tinymce.dom.DOMUtils")}),g("c",["6"],function(a){return a("tinymce.util.Tools")}),g("a",["b","c"],function(a,b){var c=a.DOM.uniqueId(),d=function(d,e){var f=b.toArray(d.getElementsByTagName("link")),g=b.grep(f,function(a){return a.id===c});if(0===g.length){var h=a.DOM.create("link",{id:c,rel:"stylesheet",href:e});d.getElementsByTagName("head")[0].appendChild(h)}};return{load:d}}),g("7",["9","8","a"],function(a,b,c){var d=function(d,e,f){var g=d.dom,h=b.getContentCss(d);c.load(d.getDoc(),h?h:e+"/css/visualblocks.css"),g.toggleClass(d.getBody(),"mce-visualblocks"),f.set(!f.get()),a.fireVisualBlocks(d,f.get())};return{toggleVisualBlocks:d}}),g("3",["7"],function(a){var b=function(b,c,d){b.addCommand("mceVisualBlocks",function(){a.toggleVisualBlocks(b,c,d)})};return{register:b}}),g("4",["8","7"],function(a,b){var c=function(c,d,e){c.on("PreviewFormats AfterPreviewFormats",function(a){e.get()&&c.dom.toggleClass(c.getBody(),"mce-visualblocks","afterpreviewformats"===a.type)}),c.on("init",function(){a.isEnabledByDefault(c)&&b.toggleVisualBlocks(c,d,e)}),c.on("remove",function(){c.dom.removeClass(c.getBody(),"mce-visualblocks")})};return{setup:c}}),g("5",["7"],function(a){var b=function(a,b){return function(c){var d=c.control;d.active(b.get()),a.on("VisualBlocks",function(a){d.active(a.state)})}},c=function(a,c){a.addButton("visualblocks",{active:!1,title:"Show blocks",cmd:"mceVisualBlocks",onPostRender:b(a,c)}),a.addMenuItem("visualblocks",{text:"Show blocks",cmd:"mceVisualBlocks",onPostRender:b(a,c),selectable:!0,context:"view",prependToContext:!0})};return{register:c}}),g("0",["1","2","3","4","5"],function(a,b,c,d,e){return b.add("visualblocks",function(b,f){var g=a(!1);c.register(b,f,g),e.register(b,g),d.setup(b,f,g)}),function(){}}),d("0")()}();
|
||||
!function(){"use strict";var e=function(t){var n=t,o=function(){return n};return{get:o,set:function(e){n=e},clone:function(){return e(o())}}},t=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=function(e,t){e.fire("VisualBlocks",{state:t})},o=function(e){return e.getParam("visualblocks_default_state",!1)},s=function(e){return e.settings.visualblocks_content_css},i=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),c=tinymce.util.Tools.resolve("tinymce.util.Tools"),l=i.DOM.uniqueId(),u=function(e,t){var n=c.toArray(e.getElementsByTagName("link"));if(0===c.grep(n,function(e){return e.id===l}).length){var o=i.DOM.create("link",{id:l,rel:"stylesheet",href:t});e.getElementsByTagName("head")[0].appendChild(o)}},a=function(e,t,o){var i=e.dom,c=s(e);u(e.getDoc(),c||t+"/css/visualblocks.css"),i.toggleClass(e.getBody(),"mce-visualblocks"),o.set(!o.get()),n(e,o.get())},r=function(e,t,n){e.addCommand("mceVisualBlocks",function(){a(e,t,n)})},m=function(e,t,n){e.on("PreviewFormats AfterPreviewFormats",function(t){n.get()&&e.dom.toggleClass(e.getBody(),"mce-visualblocks","afterpreviewformats"===t.type)}),e.on("init",function(){o(e)&&a(e,t,n)}),e.on("remove",function(){e.dom.removeClass(e.getBody(),"mce-visualblocks")})},f=function(e,t){return function(n){var o=n.control;o.active(t.get()),e.on("VisualBlocks",function(e){o.active(e.state)})}},d=function(e,t){e.addButton("visualblocks",{active:!1,title:"Show blocks",cmd:"mceVisualBlocks",onPostRender:f(e,t)}),e.addMenuItem("visualblocks",{text:"Show blocks",cmd:"mceVisualBlocks",onPostRender:f(e,t),selectable:!0,context:"view",prependToContext:!0})};t.add("visualblocks",function(t,n){var o=e(!1);r(t,n,o),d(t,o),m(t,n,o)})}();
|
Loading…
Add table
Add a link
Reference in a new issue