bedrock_sass 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/assets/_vendor/tinymce/plugins/advlist/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/advlist/plugin.js +428 -0
- data/assets/_vendor/tinymce/plugins/advlist/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/anchor/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/anchor/plugin.js +338 -0
- data/assets/_vendor/tinymce/plugins/anchor/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/autolink/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/autolink/plugin.js +404 -0
- data/assets/_vendor/tinymce/plugins/autolink/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/autoresize/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/autoresize/plugin.js +451 -0
- data/assets/_vendor/tinymce/plugins/autoresize/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/autosave/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/autosave/plugin.js +608 -0
- data/assets/_vendor/tinymce/plugins/autosave/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/bbcode/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/bbcode/plugin.js +264 -0
- data/assets/_vendor/tinymce/plugins/bbcode/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/charmap/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/charmap/plugin.js +850 -0
- data/assets/_vendor/tinymce/plugins/charmap/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/code/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/code/plugin.js +338 -0
- data/assets/_vendor/tinymce/plugins/code/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/codesample/css/prism.css +138 -0
- data/assets/_vendor/tinymce/plugins/codesample/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/codesample/plugin.js +1582 -0
- data/assets/_vendor/tinymce/plugins/codesample/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/colorpicker/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/colorpicker/plugin.js +272 -0
- data/assets/_vendor/tinymce/plugins/colorpicker/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/contextmenu/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/contextmenu/plugin.js +496 -0
- data/assets/_vendor/tinymce/plugins/contextmenu/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/directionality/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/directionality/plugin.js +270 -0
- data/assets/_vendor/tinymce/plugins/directionality/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/emoticons/img/smiley-cool.gif +0 -0
- data/assets/_vendor/tinymce/plugins/emoticons/img/smiley-cry.gif +0 -0
- data/assets/_vendor/tinymce/plugins/emoticons/img/smiley-embarassed.gif +0 -0
- data/assets/_vendor/tinymce/plugins/emoticons/img/smiley-foot-in-mouth.gif +0 -0
- data/assets/_vendor/tinymce/plugins/emoticons/img/smiley-frown.gif +0 -0
- data/assets/_vendor/tinymce/plugins/emoticons/img/smiley-innocent.gif +0 -0
- data/assets/_vendor/tinymce/plugins/emoticons/img/smiley-kiss.gif +0 -0
- data/assets/_vendor/tinymce/plugins/emoticons/img/smiley-laughing.gif +0 -0
- data/assets/_vendor/tinymce/plugins/emoticons/img/smiley-money-mouth.gif +0 -0
- data/assets/_vendor/tinymce/plugins/emoticons/img/smiley-sealed.gif +0 -0
- data/assets/_vendor/tinymce/plugins/emoticons/img/smiley-smile.gif +0 -0
- data/assets/_vendor/tinymce/plugins/emoticons/img/smiley-surprised.gif +0 -0
- data/assets/_vendor/tinymce/plugins/emoticons/img/smiley-tongue-out.gif +0 -0
- data/assets/_vendor/tinymce/plugins/emoticons/img/smiley-undecided.gif +0 -0
- data/assets/_vendor/tinymce/plugins/emoticons/img/smiley-wink.gif +0 -0
- data/assets/_vendor/tinymce/plugins/emoticons/img/smiley-yell.gif +0 -0
- data/assets/_vendor/tinymce/plugins/emoticons/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/emoticons/plugin.js +256 -0
- data/assets/_vendor/tinymce/plugins/emoticons/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/fullpage/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/fullpage/plugin.js +962 -0
- data/assets/_vendor/tinymce/plugins/fullpage/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/fullscreen/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/fullscreen/plugin.js +455 -0
- data/assets/_vendor/tinymce/plugins/fullscreen/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/help/img/logo.png +0 -0
- data/assets/_vendor/tinymce/plugins/help/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/help/plugin.js +1527 -0
- data/assets/_vendor/tinymce/plugins/help/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/hr/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/hr/plugin.js +195 -0
- data/assets/_vendor/tinymce/plugins/hr/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/image/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/image/plugin.js +1572 -0
- data/assets/_vendor/tinymce/plugins/image/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/imagetools/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/imagetools/plugin.js +4444 -0
- data/assets/_vendor/tinymce/plugins/imagetools/plugin.min.js +2 -0
- data/assets/_vendor/tinymce/plugins/importcss/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/importcss/plugin.js +577 -0
- data/assets/_vendor/tinymce/plugins/importcss/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/insertdatetime/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/insertdatetime/plugin.js +482 -0
- data/assets/_vendor/tinymce/plugins/insertdatetime/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/legacyoutput/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/legacyoutput/plugin.js +395 -0
- data/assets/_vendor/tinymce/plugins/legacyoutput/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/link/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/link/plugin.js +1231 -0
- data/assets/_vendor/tinymce/plugins/link/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/lists/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/lists/plugin.js +1985 -0
- data/assets/_vendor/tinymce/plugins/lists/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/media/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/media/plugin.js +2026 -0
- data/assets/_vendor/tinymce/plugins/media/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/nonbreaking/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/nonbreaking/plugin.js +313 -0
- data/assets/_vendor/tinymce/plugins/nonbreaking/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/noneditable/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/noneditable/plugin.js +316 -0
- data/assets/_vendor/tinymce/plugins/noneditable/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/pagebreak/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/pagebreak/plugin.js +354 -0
- data/assets/_vendor/tinymce/plugins/pagebreak/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/paste/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/paste/plugin.js +2935 -0
- data/assets/_vendor/tinymce/plugins/paste/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/preview/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/preview/plugin.js +410 -0
- data/assets/_vendor/tinymce/plugins/preview/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/print/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/print/plugin.js +194 -0
- data/assets/_vendor/tinymce/plugins/print/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/save/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/save/plugin.js +370 -0
- data/assets/_vendor/tinymce/plugins/save/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/searchreplace/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/searchreplace/plugin.js +977 -0
- data/assets/_vendor/tinymce/plugins/searchreplace/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/spellchecker/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/spellchecker/plugin.js +1419 -0
- data/assets/_vendor/tinymce/plugins/spellchecker/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/tabfocus/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/tabfocus/plugin.js +419 -0
- data/assets/_vendor/tinymce/plugins/tabfocus/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/table/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/table/plugin.js +15527 -0
- data/assets/_vendor/tinymce/plugins/table/plugin.min.js +5 -0
- data/assets/_vendor/tinymce/plugins/template/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/template/plugin.js +807 -0
- data/assets/_vendor/tinymce/plugins/template/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/textcolor/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/textcolor/plugin.js +619 -0
- data/assets/_vendor/tinymce/plugins/textcolor/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/textpattern/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/textpattern/plugin.js +718 -0
- data/assets/_vendor/tinymce/plugins/textpattern/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/toc/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/toc/plugin.js +559 -0
- data/assets/_vendor/tinymce/plugins/toc/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/visualblocks/css/visualblocks.css +154 -0
- data/assets/_vendor/tinymce/plugins/visualblocks/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/visualblocks/plugin.js +459 -0
- data/assets/_vendor/tinymce/plugins/visualblocks/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/visualchars/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/visualchars/plugin.js +1325 -0
- data/assets/_vendor/tinymce/plugins/visualchars/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/plugins/wordcount/index.js +7 -0
- data/assets/_vendor/tinymce/plugins/wordcount/plugin.js +735 -0
- data/assets/_vendor/tinymce/plugins/wordcount/plugin.min.js +1 -0
- data/assets/_vendor/tinymce/skins/lightgray/content.inline.min.css +1 -0
- data/assets/_vendor/tinymce/skins/lightgray/content.min.css +1 -0
- data/assets/_vendor/tinymce/skins/lightgray/content.mobile.min.css +1 -0
- data/assets/_vendor/tinymce/skins/lightgray/fonts/tinymce-mobile.woff +0 -0
- data/assets/_vendor/tinymce/skins/lightgray/fonts/tinymce-small.eot +0 -0
- data/assets/_vendor/tinymce/skins/lightgray/fonts/tinymce-small.svg +63 -0
- data/assets/_vendor/tinymce/skins/lightgray/fonts/tinymce-small.ttf +0 -0
- data/assets/_vendor/tinymce/skins/lightgray/fonts/tinymce-small.woff +0 -0
- data/assets/_vendor/tinymce/skins/lightgray/fonts/tinymce.eot +0 -0
- data/assets/_vendor/tinymce/skins/lightgray/fonts/tinymce.svg +131 -0
- data/assets/_vendor/tinymce/skins/lightgray/fonts/tinymce.ttf +0 -0
- data/assets/_vendor/tinymce/skins/lightgray/fonts/tinymce.woff +0 -0
- data/assets/_vendor/tinymce/skins/lightgray/img/anchor.gif +0 -0
- data/assets/_vendor/tinymce/skins/lightgray/img/loader.gif +0 -0
- data/assets/_vendor/tinymce/skins/lightgray/img/object.gif +0 -0
- data/assets/_vendor/tinymce/skins/lightgray/img/trans.gif +0 -0
- data/assets/_vendor/tinymce/skins/lightgray/skin.min.css +1 -0
- data/assets/_vendor/tinymce/skins/lightgray/skin.mobile.min.css +2 -0
- data/assets/_vendor/tinymce/themes/inlite/index.js +7 -0
- data/assets/_vendor/tinymce/themes/inlite/theme.js +18787 -0
- data/assets/_vendor/tinymce/themes/inlite/theme.min.js +5 -0
- data/assets/_vendor/tinymce/themes/mobile/index.js +7 -0
- data/assets/_vendor/tinymce/themes/mobile/theme.js +23384 -0
- data/assets/_vendor/tinymce/themes/mobile/theme.min.js +8 -0
- data/assets/_vendor/tinymce/themes/modern/index.js +7 -0
- data/assets/_vendor/tinymce/themes/modern/theme.js +18311 -0
- data/assets/_vendor/tinymce/themes/modern/theme.min.js +5 -0
- data/assets/_vendor/tinymce/tinymce.js +44399 -0
- data/assets/bedrock/js/bedrock.js +16587 -6193
- data/assets/bedrock/scss/_bedrock-components.scss +16 -0
- data/assets/bedrock/scss/_bedrock-settings.scss +15 -0
- data/assets/bedrock/scss/components/attachments-grid.scss +138 -0
- data/assets/bedrock/scss/components/dropzone-upload.scss +158 -0
- data/assets/bedrock/scss/components/global.scss +16 -8
- data/assets/bedrock/scss/components/helper-classes.scss +59 -0
- data/assets/bedrock/scss/components/inline-edit-box.scss +80 -0
- data/assets/bedrock/scss/components/login-box.scss +48 -0
- data/assets/bedrock/scss/components/no-content.scss +31 -0
- data/assets/bedrock/scss/components/off-canvas-menu.scss +1 -1
- data/assets/bedrock/scss/components/page-content.scss +51 -0
- data/assets/bedrock/scss/components/reveal-panel.scss +89 -0
- data/assets/bedrock/scss/components/select-box.scss +332 -0
- data/assets/bedrock/scss/components/tiny-mce-editor.scss +14 -7
- data/lib/bedrock_sass.rb +6 -0
- data/lib/bedrock_sass/engine.rb +8 -0
- data/lib/bedrock_sass/version.rb +1 -1
- data/lib/tasks/before_assets_precompile.rake +11 -0
- metadata +188 -2
@@ -0,0 +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")}),h("c",setInterval),g("d",["6"],function(a){return a("tinymce.util.LocalStorage")}),g("a",["6"],function(a){return a("tinymce.util.Tools")}),g("e",[],function(){var a=function(a){return a.fire("RestoreDraft")},b=function(a){return a.fire("StoreDraft")},c=function(a){return a.fire("RemoveDraft")};return{fireRestoreDraft:a,fireStoreDraft:b,fireRemoveDraft:c}}),h("f",document),g("g",[],function(){var a=function(a,b){var c={s:1e3,m:6e4};return a=/^(\d+)([ms]?)$/.exec(""+(a||b)),(a[2]?c[a[2]]:1)*parseInt(a,10)};return{parse:a}}),g("b",["f","g"],function(a,b){var c=function(a){return a.getParam("autosave_ask_before_unload",!0)},d=function(b){var c=b.getParam("autosave_prefix","tinymce-autosave-{path}{query}{hash}-{id}-");return c=c.replace(/\{path\}/g,a.location.pathname),c=c.replace(/\{query\}/g,a.location.search),c=c.replace(/\{hash\}/g,a.location.hash),c=c.replace(/\{id\}/g,b.id)},e=function(a){return a.getParam("autosave_restore_when_empty",!1)},f=function(a){return b.parse(a.settings.autosave_interval,"30s")},g=function(a){return b.parse(a.settings.autosave_retention,"20m")};return{shouldAskBeforeUnload:c,getAutoSavePrefix:d,shouldRestoreWhenEmpty:e,getAutoSaveInterval:f,getAutoSaveRetention:g}}),g("7",["c","d","a","e","b"],function(a,b,c,d,e){var f=function(a,b){var d=a.settings.forced_root_block;return b=c.trim("undefined"==typeof b?a.getBody().innerHTML:b),""===b||new RegExp("^<"+d+"[^>]*>((\xa0| |[ \t]|<br[^>]*>)+?|)</"+d+">|<br>$","i").test(b)},g=function(a){var c=parseInt(b.getItem(e.getAutoSavePrefix(a)+"time"),10)||0;return!((new Date).getTime()-c>e.getAutoSaveRetention(a))||(h(a,!1),!1)},h=function(a,c){var f=e.getAutoSavePrefix(a);b.removeItem(f+"draft"),b.removeItem(f+"time"),c!==!1&&d.fireRemoveDraft(a)},i=function(a){var c=e.getAutoSavePrefix(a);!f(a)&&a.isDirty()&&(b.setItem(c+"draft",a.getContent({format:"raw",no_events:!0})),b.setItem(c+"time",(new Date).getTime()),d.fireStoreDraft(a))},j=function(a){var c=e.getAutoSavePrefix(a);g(a)&&(a.setContent(b.getItem(c+"draft"),{format:"raw"}),d.fireRestoreDraft(a))},k=function(b,c){var d=e.getAutoSaveInterval(b);c.get()||(a(function(){b.removed||i(b)},d),c.set(!0))},l=function(a){a.undoManager.transact(function(){j(a),h(a)}),a.focus()};return{isEmpty:f,hasDraft:g,removeDraft:h,storeDraft:i,restoreDraft:j,startStoreDraft:k,restoreLastDraft:l}}),g("3",["7"],function(a){var b=function(a,b){return function(){var c=Array.prototype.slice.call(arguments);return a.apply(null,[b].concat(c))}},c=function(c){return{hasDraft:b(a.hasDraft,c),storeDraft:b(a.storeDraft,c),restoreDraft:b(a.restoreDraft,c),removeDraft:b(a.removeDraft,c),isEmpty:b(a.isEmpty,c)}};return{get:c}}),h("8",window),g("9",["6"],function(a){return a("tinymce.EditorManager")}),g("4",["8","9","a","b"],function(a,b,c,d){b._beforeUnloadHandler=function(){var a;return c.each(b.get(),function(b){b.plugins.autosave&&b.plugins.autosave.storeDraft(),!a&&b.isDirty()&&d.shouldAskBeforeUnload(b)&&(a=b.translate("You have unsaved changes are you sure you want to navigate away?"))}),a};var e=function(c){a.onbeforeunload=b._beforeUnloadHandler};return{setup:e}}),g("5",["7"],function(a){var b=function(b,c){return function(d){var e=d.control;e.disabled(!a.hasDraft(b)),b.on("StoreDraft RestoreDraft RemoveDraft",function(){e.disabled(!a.hasDraft(b))}),a.startStoreDraft(b,c)}},c=function(c,d){c.addButton("restoredraft",{title:"Restore last draft",onclick:function(){a.restoreLastDraft(c)},onPostRender:b(c,d)}),c.addMenuItem("restoredraft",{text:"Restore last draft",onclick:function(){a.restoreLastDraft(c)},onPostRender:b(c,d),context:"file"})};return{register:c}}),g("0",["1","2","3","4","5"],function(a,b,c,d,e){return b.add("autosave",function(b){var f=a(!1);return d.setup(b),e.register(b,f),c.get(b)}),function(){}}),d("0")()}();
|
@@ -0,0 +1,264 @@
|
|
1
|
+
(function () {
|
2
|
+
|
3
|
+
var defs = {}; // id -> {dependencies, definition, instance (possibly undefined)}
|
4
|
+
|
5
|
+
// Used when there is no 'main' module.
|
6
|
+
// The name is probably (hopefully) unique so minification removes for releases.
|
7
|
+
var register_3795 = function (id) {
|
8
|
+
var module = dem(id);
|
9
|
+
var fragments = id.split('.');
|
10
|
+
var target = Function('return this;')();
|
11
|
+
for (var i = 0; i < fragments.length - 1; ++i) {
|
12
|
+
if (target[fragments[i]] === undefined)
|
13
|
+
target[fragments[i]] = {};
|
14
|
+
target = target[fragments[i]];
|
15
|
+
}
|
16
|
+
target[fragments[fragments.length - 1]] = module;
|
17
|
+
};
|
18
|
+
|
19
|
+
var instantiate = function (id) {
|
20
|
+
var actual = defs[id];
|
21
|
+
var dependencies = actual.deps;
|
22
|
+
var definition = actual.defn;
|
23
|
+
var len = dependencies.length;
|
24
|
+
var instances = new Array(len);
|
25
|
+
for (var i = 0; i < len; ++i)
|
26
|
+
instances[i] = dem(dependencies[i]);
|
27
|
+
var defResult = definition.apply(null, instances);
|
28
|
+
if (defResult === undefined)
|
29
|
+
throw 'module [' + id + '] returned undefined';
|
30
|
+
actual.instance = defResult;
|
31
|
+
};
|
32
|
+
|
33
|
+
var def = function (id, dependencies, definition) {
|
34
|
+
if (typeof id !== 'string')
|
35
|
+
throw 'module id must be a string';
|
36
|
+
else if (dependencies === undefined)
|
37
|
+
throw 'no dependencies for ' + id;
|
38
|
+
else if (definition === undefined)
|
39
|
+
throw 'no definition function for ' + id;
|
40
|
+
defs[id] = {
|
41
|
+
deps: dependencies,
|
42
|
+
defn: definition,
|
43
|
+
instance: undefined
|
44
|
+
};
|
45
|
+
};
|
46
|
+
|
47
|
+
var dem = function (id) {
|
48
|
+
var actual = defs[id];
|
49
|
+
if (actual === undefined)
|
50
|
+
throw 'module [' + id + '] was undefined';
|
51
|
+
else if (actual.instance === undefined)
|
52
|
+
instantiate(id);
|
53
|
+
return actual.instance;
|
54
|
+
};
|
55
|
+
|
56
|
+
var req = function (ids, callback) {
|
57
|
+
var len = ids.length;
|
58
|
+
var instances = new Array(len);
|
59
|
+
for (var i = 0; i < len; ++i)
|
60
|
+
instances[i] = dem(ids[i]);
|
61
|
+
callback.apply(null, instances);
|
62
|
+
};
|
63
|
+
|
64
|
+
var ephox = {};
|
65
|
+
|
66
|
+
ephox.bolt = {
|
67
|
+
module: {
|
68
|
+
api: {
|
69
|
+
define: def,
|
70
|
+
require: req,
|
71
|
+
demand: dem
|
72
|
+
}
|
73
|
+
}
|
74
|
+
};
|
75
|
+
|
76
|
+
var define = def;
|
77
|
+
var require = req;
|
78
|
+
var demand = dem;
|
79
|
+
// this helps with minification when using a lot of global references
|
80
|
+
var defineGlobal = function (id, ref) {
|
81
|
+
define(id, [], function () { return ref; });
|
82
|
+
};
|
83
|
+
/*jsc
|
84
|
+
["tinymce.plugins.bbcode.Plugin","tinymce.core.PluginManager","tinymce.plugins.bbcode.core.Convert","global!tinymce.util.Tools.resolve","tinymce.core.util.Tools"]
|
85
|
+
jsc*/
|
86
|
+
defineGlobal("global!tinymce.util.Tools.resolve", tinymce.util.Tools.resolve);
|
87
|
+
/**
|
88
|
+
* ResolveGlobal.js
|
89
|
+
*
|
90
|
+
* Released under LGPL License.
|
91
|
+
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
92
|
+
*
|
93
|
+
* License: http://www.tinymce.com/license
|
94
|
+
* Contributing: http://www.tinymce.com/contributing
|
95
|
+
*/
|
96
|
+
|
97
|
+
define(
|
98
|
+
'tinymce.core.PluginManager',
|
99
|
+
[
|
100
|
+
'global!tinymce.util.Tools.resolve'
|
101
|
+
],
|
102
|
+
function (resolve) {
|
103
|
+
return resolve('tinymce.PluginManager');
|
104
|
+
}
|
105
|
+
);
|
106
|
+
|
107
|
+
/**
|
108
|
+
* ResolveGlobal.js
|
109
|
+
*
|
110
|
+
* Released under LGPL License.
|
111
|
+
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
112
|
+
*
|
113
|
+
* License: http://www.tinymce.com/license
|
114
|
+
* Contributing: http://www.tinymce.com/contributing
|
115
|
+
*/
|
116
|
+
|
117
|
+
define(
|
118
|
+
'tinymce.core.util.Tools',
|
119
|
+
[
|
120
|
+
'global!tinymce.util.Tools.resolve'
|
121
|
+
],
|
122
|
+
function (resolve) {
|
123
|
+
return resolve('tinymce.util.Tools');
|
124
|
+
}
|
125
|
+
);
|
126
|
+
|
127
|
+
/**
|
128
|
+
* Convert.js
|
129
|
+
*
|
130
|
+
* Released under LGPL License.
|
131
|
+
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
132
|
+
*
|
133
|
+
* License: http://www.tinymce.com/license
|
134
|
+
* Contributing: http://www.tinymce.com/contributing
|
135
|
+
*/
|
136
|
+
|
137
|
+
define(
|
138
|
+
'tinymce.plugins.bbcode.core.Convert',
|
139
|
+
[
|
140
|
+
'tinymce.core.util.Tools'
|
141
|
+
],
|
142
|
+
function (Tools) {
|
143
|
+
var html2bbcode = function (s) {
|
144
|
+
s = Tools.trim(s);
|
145
|
+
|
146
|
+
var rep = function (re, str) {
|
147
|
+
s = s.replace(re, str);
|
148
|
+
};
|
149
|
+
|
150
|
+
// example: <strong> to [b]
|
151
|
+
rep(/<a.*?href=\"(.*?)\".*?>(.*?)<\/a>/gi, "[url=$1]$2[/url]");
|
152
|
+
rep(/<font.*?color=\"(.*?)\".*?class=\"codeStyle\".*?>(.*?)<\/font>/gi, "[code][color=$1]$2[/color][/code]");
|
153
|
+
rep(/<font.*?color=\"(.*?)\".*?class=\"quoteStyle\".*?>(.*?)<\/font>/gi, "[quote][color=$1]$2[/color][/quote]");
|
154
|
+
rep(/<font.*?class=\"codeStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi, "[code][color=$1]$2[/color][/code]");
|
155
|
+
rep(/<font.*?class=\"quoteStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi, "[quote][color=$1]$2[/color][/quote]");
|
156
|
+
rep(/<span style=\"color: ?(.*?);\">(.*?)<\/span>/gi, "[color=$1]$2[/color]");
|
157
|
+
rep(/<font.*?color=\"(.*?)\".*?>(.*?)<\/font>/gi, "[color=$1]$2[/color]");
|
158
|
+
rep(/<span style=\"font-size:(.*?);\">(.*?)<\/span>/gi, "[size=$1]$2[/size]");
|
159
|
+
rep(/<font>(.*?)<\/font>/gi, "$1");
|
160
|
+
rep(/<img.*?src=\"(.*?)\".*?\/>/gi, "[img]$1[/img]");
|
161
|
+
rep(/<span class=\"codeStyle\">(.*?)<\/span>/gi, "[code]$1[/code]");
|
162
|
+
rep(/<span class=\"quoteStyle\">(.*?)<\/span>/gi, "[quote]$1[/quote]");
|
163
|
+
rep(/<strong class=\"codeStyle\">(.*?)<\/strong>/gi, "[code][b]$1[/b][/code]");
|
164
|
+
rep(/<strong class=\"quoteStyle\">(.*?)<\/strong>/gi, "[quote][b]$1[/b][/quote]");
|
165
|
+
rep(/<em class=\"codeStyle\">(.*?)<\/em>/gi, "[code][i]$1[/i][/code]");
|
166
|
+
rep(/<em class=\"quoteStyle\">(.*?)<\/em>/gi, "[quote][i]$1[/i][/quote]");
|
167
|
+
rep(/<u class=\"codeStyle\">(.*?)<\/u>/gi, "[code][u]$1[/u][/code]");
|
168
|
+
rep(/<u class=\"quoteStyle\">(.*?)<\/u>/gi, "[quote][u]$1[/u][/quote]");
|
169
|
+
rep(/<\/(strong|b)>/gi, "[/b]");
|
170
|
+
rep(/<(strong|b)>/gi, "[b]");
|
171
|
+
rep(/<\/(em|i)>/gi, "[/i]");
|
172
|
+
rep(/<(em|i)>/gi, "[i]");
|
173
|
+
rep(/<\/u>/gi, "[/u]");
|
174
|
+
rep(/<span style=\"text-decoration: ?underline;\">(.*?)<\/span>/gi, "[u]$1[/u]");
|
175
|
+
rep(/<u>/gi, "[u]");
|
176
|
+
rep(/<blockquote[^>]*>/gi, "[quote]");
|
177
|
+
rep(/<\/blockquote>/gi, "[/quote]");
|
178
|
+
rep(/<br \/>/gi, "\n");
|
179
|
+
rep(/<br\/>/gi, "\n");
|
180
|
+
rep(/<br>/gi, "\n");
|
181
|
+
rep(/<p>/gi, "");
|
182
|
+
rep(/<\/p>/gi, "\n");
|
183
|
+
rep(/ |\u00a0/gi, " ");
|
184
|
+
rep(/"/gi, "\"");
|
185
|
+
rep(/</gi, "<");
|
186
|
+
rep(/>/gi, ">");
|
187
|
+
rep(/&/gi, "&");
|
188
|
+
|
189
|
+
return s;
|
190
|
+
};
|
191
|
+
|
192
|
+
var bbcode2html = function (s) {
|
193
|
+
s = Tools.trim(s);
|
194
|
+
|
195
|
+
var rep = function (re, str) {
|
196
|
+
s = s.replace(re, str);
|
197
|
+
};
|
198
|
+
|
199
|
+
// example: [b] to <strong>
|
200
|
+
rep(/\n/gi, "<br />");
|
201
|
+
rep(/\[b\]/gi, "<strong>");
|
202
|
+
rep(/\[\/b\]/gi, "</strong>");
|
203
|
+
rep(/\[i\]/gi, "<em>");
|
204
|
+
rep(/\[\/i\]/gi, "</em>");
|
205
|
+
rep(/\[u\]/gi, "<u>");
|
206
|
+
rep(/\[\/u\]/gi, "</u>");
|
207
|
+
rep(/\[url=([^\]]+)\](.*?)\[\/url\]/gi, "<a href=\"$1\">$2</a>");
|
208
|
+
rep(/\[url\](.*?)\[\/url\]/gi, "<a href=\"$1\">$1</a>");
|
209
|
+
rep(/\[img\](.*?)\[\/img\]/gi, "<img src=\"$1\" />");
|
210
|
+
rep(/\[color=(.*?)\](.*?)\[\/color\]/gi, "<font color=\"$1\">$2</font>");
|
211
|
+
rep(/\[code\](.*?)\[\/code\]/gi, "<span class=\"codeStyle\">$1</span> ");
|
212
|
+
rep(/\[quote.*?\](.*?)\[\/quote\]/gi, "<span class=\"quoteStyle\">$1</span> ");
|
213
|
+
|
214
|
+
return s;
|
215
|
+
};
|
216
|
+
|
217
|
+
return {
|
218
|
+
html2bbcode: html2bbcode,
|
219
|
+
bbcode2html: bbcode2html
|
220
|
+
};
|
221
|
+
}
|
222
|
+
);
|
223
|
+
/**
|
224
|
+
* Plugin.js
|
225
|
+
*
|
226
|
+
* Released under LGPL License.
|
227
|
+
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
228
|
+
*
|
229
|
+
* License: http://www.tinymce.com/license
|
230
|
+
* Contributing: http://www.tinymce.com/contributing
|
231
|
+
*/
|
232
|
+
|
233
|
+
define(
|
234
|
+
'tinymce.plugins.bbcode.Plugin',
|
235
|
+
[
|
236
|
+
'tinymce.core.PluginManager',
|
237
|
+
'tinymce.plugins.bbcode.core.Convert'
|
238
|
+
],
|
239
|
+
function (PluginManager, Convert) {
|
240
|
+
PluginManager.add('bbcode', function () {
|
241
|
+
return {
|
242
|
+
init: function (editor) {
|
243
|
+
editor.on('beforeSetContent', function (e) {
|
244
|
+
e.content = Convert.bbcode2html(e.content);
|
245
|
+
});
|
246
|
+
|
247
|
+
editor.on('postProcess', function (e) {
|
248
|
+
if (e.set) {
|
249
|
+
e.content = Convert.bbcode2html(e.content);
|
250
|
+
}
|
251
|
+
|
252
|
+
if (e.get) {
|
253
|
+
e.content = Convert.html2bbcode(e.content);
|
254
|
+
}
|
255
|
+
});
|
256
|
+
}
|
257
|
+
};
|
258
|
+
});
|
259
|
+
|
260
|
+
return function () { };
|
261
|
+
}
|
262
|
+
);
|
263
|
+
dem('tinymce.plugins.bbcode.Plugin')();
|
264
|
+
})();
|
@@ -0,0 +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})};h("3",tinymce.util.Tools.resolve),g("1",["3"],function(a){return a("tinymce.PluginManager")}),g("4",["3"],function(a){return a("tinymce.util.Tools")}),g("2",["4"],function(a){var b=function(b){b=a.trim(b);var c=function(a,c){b=b.replace(a,c)};return c(/<a.*?href=\"(.*?)\".*?>(.*?)<\/a>/gi,"[url=$1]$2[/url]"),c(/<font.*?color=\"(.*?)\".*?class=\"codeStyle\".*?>(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]"),c(/<font.*?color=\"(.*?)\".*?class=\"quoteStyle\".*?>(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]"),c(/<font.*?class=\"codeStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]"),c(/<font.*?class=\"quoteStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]"),c(/<span style=\"color: ?(.*?);\">(.*?)<\/span>/gi,"[color=$1]$2[/color]"),c(/<font.*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[color=$1]$2[/color]"),c(/<span style=\"font-size:(.*?);\">(.*?)<\/span>/gi,"[size=$1]$2[/size]"),c(/<font>(.*?)<\/font>/gi,"$1"),c(/<img.*?src=\"(.*?)\".*?\/>/gi,"[img]$1[/img]"),c(/<span class=\"codeStyle\">(.*?)<\/span>/gi,"[code]$1[/code]"),c(/<span class=\"quoteStyle\">(.*?)<\/span>/gi,"[quote]$1[/quote]"),c(/<strong class=\"codeStyle\">(.*?)<\/strong>/gi,"[code][b]$1[/b][/code]"),c(/<strong class=\"quoteStyle\">(.*?)<\/strong>/gi,"[quote][b]$1[/b][/quote]"),c(/<em class=\"codeStyle\">(.*?)<\/em>/gi,"[code][i]$1[/i][/code]"),c(/<em class=\"quoteStyle\">(.*?)<\/em>/gi,"[quote][i]$1[/i][/quote]"),c(/<u class=\"codeStyle\">(.*?)<\/u>/gi,"[code][u]$1[/u][/code]"),c(/<u class=\"quoteStyle\">(.*?)<\/u>/gi,"[quote][u]$1[/u][/quote]"),c(/<\/(strong|b)>/gi,"[/b]"),c(/<(strong|b)>/gi,"[b]"),c(/<\/(em|i)>/gi,"[/i]"),c(/<(em|i)>/gi,"[i]"),c(/<\/u>/gi,"[/u]"),c(/<span style=\"text-decoration: ?underline;\">(.*?)<\/span>/gi,"[u]$1[/u]"),c(/<u>/gi,"[u]"),c(/<blockquote[^>]*>/gi,"[quote]"),c(/<\/blockquote>/gi,"[/quote]"),c(/<br \/>/gi,"\n"),c(/<br\/>/gi,"\n"),c(/<br>/gi,"\n"),c(/<p>/gi,""),c(/<\/p>/gi,"\n"),c(/ |\u00a0/gi," "),c(/"/gi,'"'),c(/</gi,"<"),c(/>/gi,">"),c(/&/gi,"&"),b},c=function(b){b=a.trim(b);var c=function(a,c){b=b.replace(a,c)};return c(/\n/gi,"<br />"),c(/\[b\]/gi,"<strong>"),c(/\[\/b\]/gi,"</strong>"),c(/\[i\]/gi,"<em>"),c(/\[\/i\]/gi,"</em>"),c(/\[u\]/gi,"<u>"),c(/\[\/u\]/gi,"</u>"),c(/\[url=([^\]]+)\](.*?)\[\/url\]/gi,'<a href="$1">$2</a>'),c(/\[url\](.*?)\[\/url\]/gi,'<a href="$1">$1</a>'),c(/\[img\](.*?)\[\/img\]/gi,'<img src="$1" />'),c(/\[color=(.*?)\](.*?)\[\/color\]/gi,'<font color="$1">$2</font>'),c(/\[code\](.*?)\[\/code\]/gi,'<span class="codeStyle">$1</span> '),c(/\[quote.*?\](.*?)\[\/quote\]/gi,'<span class="quoteStyle">$1</span> '),b};return{html2bbcode:b,bbcode2html:c}}),g("0",["1","2"],function(a,b){return a.add("bbcode",function(){return{init:function(a){a.on("beforeSetContent",function(a){a.content=b.bbcode2html(a.content)}),a.on("postProcess",function(a){a.set&&(a.content=b.bbcode2html(a.content)),a.get&&(a.content=b.html2bbcode(a.content))})}}}),function(){}}),d("0")()}();
|
@@ -0,0 +1,850 @@
|
|
1
|
+
(function () {
|
2
|
+
|
3
|
+
var defs = {}; // id -> {dependencies, definition, instance (possibly undefined)}
|
4
|
+
|
5
|
+
// Used when there is no 'main' module.
|
6
|
+
// The name is probably (hopefully) unique so minification removes for releases.
|
7
|
+
var register_3795 = function (id) {
|
8
|
+
var module = dem(id);
|
9
|
+
var fragments = id.split('.');
|
10
|
+
var target = Function('return this;')();
|
11
|
+
for (var i = 0; i < fragments.length - 1; ++i) {
|
12
|
+
if (target[fragments[i]] === undefined)
|
13
|
+
target[fragments[i]] = {};
|
14
|
+
target = target[fragments[i]];
|
15
|
+
}
|
16
|
+
target[fragments[fragments.length - 1]] = module;
|
17
|
+
};
|
18
|
+
|
19
|
+
var instantiate = function (id) {
|
20
|
+
var actual = defs[id];
|
21
|
+
var dependencies = actual.deps;
|
22
|
+
var definition = actual.defn;
|
23
|
+
var len = dependencies.length;
|
24
|
+
var instances = new Array(len);
|
25
|
+
for (var i = 0; i < len; ++i)
|
26
|
+
instances[i] = dem(dependencies[i]);
|
27
|
+
var defResult = definition.apply(null, instances);
|
28
|
+
if (defResult === undefined)
|
29
|
+
throw 'module [' + id + '] returned undefined';
|
30
|
+
actual.instance = defResult;
|
31
|
+
};
|
32
|
+
|
33
|
+
var def = function (id, dependencies, definition) {
|
34
|
+
if (typeof id !== 'string')
|
35
|
+
throw 'module id must be a string';
|
36
|
+
else if (dependencies === undefined)
|
37
|
+
throw 'no dependencies for ' + id;
|
38
|
+
else if (definition === undefined)
|
39
|
+
throw 'no definition function for ' + id;
|
40
|
+
defs[id] = {
|
41
|
+
deps: dependencies,
|
42
|
+
defn: definition,
|
43
|
+
instance: undefined
|
44
|
+
};
|
45
|
+
};
|
46
|
+
|
47
|
+
var dem = function (id) {
|
48
|
+
var actual = defs[id];
|
49
|
+
if (actual === undefined)
|
50
|
+
throw 'module [' + id + '] was undefined';
|
51
|
+
else if (actual.instance === undefined)
|
52
|
+
instantiate(id);
|
53
|
+
return actual.instance;
|
54
|
+
};
|
55
|
+
|
56
|
+
var req = function (ids, callback) {
|
57
|
+
var len = ids.length;
|
58
|
+
var instances = new Array(len);
|
59
|
+
for (var i = 0; i < len; ++i)
|
60
|
+
instances[i] = dem(ids[i]);
|
61
|
+
callback.apply(null, instances);
|
62
|
+
};
|
63
|
+
|
64
|
+
var ephox = {};
|
65
|
+
|
66
|
+
ephox.bolt = {
|
67
|
+
module: {
|
68
|
+
api: {
|
69
|
+
define: def,
|
70
|
+
require: req,
|
71
|
+
demand: dem
|
72
|
+
}
|
73
|
+
}
|
74
|
+
};
|
75
|
+
|
76
|
+
var define = def;
|
77
|
+
var require = req;
|
78
|
+
var demand = dem;
|
79
|
+
// this helps with minification when using a lot of global references
|
80
|
+
var defineGlobal = function (id, ref) {
|
81
|
+
define(id, [], function () { return ref; });
|
82
|
+
};
|
83
|
+
/*jsc
|
84
|
+
["tinymce.plugins.charmap.Plugin","tinymce.core.PluginManager","tinymce.plugins.charmap.api.Api","tinymce.plugins.charmap.api.Commands","tinymce.plugins.charmap.ui.Buttons","global!tinymce.util.Tools.resolve","tinymce.plugins.charmap.core.Actions","tinymce.plugins.charmap.core.CharMap","tinymce.plugins.charmap.ui.Dialog","tinymce.plugins.charmap.api.Events","tinymce.core.util.Tools","tinymce.plugins.charmap.api.Settings","tinymce.plugins.charmap.ui.GridHtml"]
|
85
|
+
jsc*/
|
86
|
+
defineGlobal("global!tinymce.util.Tools.resolve", tinymce.util.Tools.resolve);
|
87
|
+
/**
|
88
|
+
* ResolveGlobal.js
|
89
|
+
*
|
90
|
+
* Released under LGPL License.
|
91
|
+
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
92
|
+
*
|
93
|
+
* License: http://www.tinymce.com/license
|
94
|
+
* Contributing: http://www.tinymce.com/contributing
|
95
|
+
*/
|
96
|
+
|
97
|
+
define(
|
98
|
+
'tinymce.core.PluginManager',
|
99
|
+
[
|
100
|
+
'global!tinymce.util.Tools.resolve'
|
101
|
+
],
|
102
|
+
function (resolve) {
|
103
|
+
return resolve('tinymce.PluginManager');
|
104
|
+
}
|
105
|
+
);
|
106
|
+
|
107
|
+
/**
|
108
|
+
* Events.js
|
109
|
+
*
|
110
|
+
* Released under LGPL License.
|
111
|
+
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
112
|
+
*
|
113
|
+
* License: http://www.tinymce.com/license
|
114
|
+
* Contributing: http://www.tinymce.com/contributing
|
115
|
+
*/
|
116
|
+
|
117
|
+
define(
|
118
|
+
'tinymce.plugins.charmap.api.Events',
|
119
|
+
[
|
120
|
+
],
|
121
|
+
function () {
|
122
|
+
var fireInsertCustomChar = function (editor, chr) {
|
123
|
+
return editor.fire('insertCustomChar', { chr: chr });
|
124
|
+
};
|
125
|
+
|
126
|
+
return {
|
127
|
+
fireInsertCustomChar: fireInsertCustomChar
|
128
|
+
};
|
129
|
+
}
|
130
|
+
);
|
131
|
+
|
132
|
+
/**
|
133
|
+
* Actions.js
|
134
|
+
*
|
135
|
+
* Released under LGPL License.
|
136
|
+
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
137
|
+
*
|
138
|
+
* License: http://www.tinymce.com/license
|
139
|
+
* Contributing: http://www.tinymce.com/contributing
|
140
|
+
*/
|
141
|
+
|
142
|
+
define(
|
143
|
+
'tinymce.plugins.charmap.core.Actions',
|
144
|
+
[
|
145
|
+
'tinymce.plugins.charmap.api.Events'
|
146
|
+
],
|
147
|
+
function (Events) {
|
148
|
+
var insertChar = function (editor, chr) {
|
149
|
+
var evtChr = Events.fireInsertCustomChar(editor, chr).chr;
|
150
|
+
editor.execCommand('mceInsertContent', false, evtChr);
|
151
|
+
};
|
152
|
+
|
153
|
+
return {
|
154
|
+
insertChar: insertChar
|
155
|
+
};
|
156
|
+
}
|
157
|
+
);
|
158
|
+
/**
|
159
|
+
* ResolveGlobal.js
|
160
|
+
*
|
161
|
+
* Released under LGPL License.
|
162
|
+
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
163
|
+
*
|
164
|
+
* License: http://www.tinymce.com/license
|
165
|
+
* Contributing: http://www.tinymce.com/contributing
|
166
|
+
*/
|
167
|
+
|
168
|
+
define(
|
169
|
+
'tinymce.core.util.Tools',
|
170
|
+
[
|
171
|
+
'global!tinymce.util.Tools.resolve'
|
172
|
+
],
|
173
|
+
function (resolve) {
|
174
|
+
return resolve('tinymce.util.Tools');
|
175
|
+
}
|
176
|
+
);
|
177
|
+
|
178
|
+
/**
|
179
|
+
* Settings.js
|
180
|
+
*
|
181
|
+
* Released under LGPL License.
|
182
|
+
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
183
|
+
*
|
184
|
+
* License: http://www.tinymce.com/license
|
185
|
+
* Contributing: http://www.tinymce.com/contributing
|
186
|
+
*/
|
187
|
+
|
188
|
+
define(
|
189
|
+
'tinymce.plugins.charmap.api.Settings',
|
190
|
+
[
|
191
|
+
],
|
192
|
+
function () {
|
193
|
+
var getCharMap = function (editor) {
|
194
|
+
return editor.settings.charmap;
|
195
|
+
};
|
196
|
+
|
197
|
+
var getCharMapAppend = function (editor) {
|
198
|
+
return editor.settings.charmap_append;
|
199
|
+
};
|
200
|
+
|
201
|
+
return {
|
202
|
+
getCharMap: getCharMap,
|
203
|
+
getCharMapAppend: getCharMapAppend
|
204
|
+
};
|
205
|
+
}
|
206
|
+
);
|
207
|
+
/**
|
208
|
+
* CharMap.js
|
209
|
+
*
|
210
|
+
* Released under LGPL License.
|
211
|
+
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
212
|
+
*
|
213
|
+
* License: http://www.tinymce.com/license
|
214
|
+
* Contributing: http://www.tinymce.com/contributing
|
215
|
+
*/
|
216
|
+
|
217
|
+
define(
|
218
|
+
'tinymce.plugins.charmap.core.CharMap',
|
219
|
+
[
|
220
|
+
'tinymce.core.util.Tools',
|
221
|
+
'tinymce.plugins.charmap.api.Settings'
|
222
|
+
],
|
223
|
+
function (Tools, Settings) {
|
224
|
+
var isArray = Tools.isArray;
|
225
|
+
|
226
|
+
var getDefaultCharMap = function () {
|
227
|
+
return [
|
228
|
+
['160', 'no-break space'],
|
229
|
+
['173', 'soft hyphen'],
|
230
|
+
['34', 'quotation mark'],
|
231
|
+
// finance
|
232
|
+
['162', 'cent sign'],
|
233
|
+
['8364', 'euro sign'],
|
234
|
+
['163', 'pound sign'],
|
235
|
+
['165', 'yen sign'],
|
236
|
+
// signs
|
237
|
+
['169', 'copyright sign'],
|
238
|
+
['174', 'registered sign'],
|
239
|
+
['8482', 'trade mark sign'],
|
240
|
+
['8240', 'per mille sign'],
|
241
|
+
['181', 'micro sign'],
|
242
|
+
['183', 'middle dot'],
|
243
|
+
['8226', 'bullet'],
|
244
|
+
['8230', 'three dot leader'],
|
245
|
+
['8242', 'minutes / feet'],
|
246
|
+
['8243', 'seconds / inches'],
|
247
|
+
['167', 'section sign'],
|
248
|
+
['182', 'paragraph sign'],
|
249
|
+
['223', 'sharp s / ess-zed'],
|
250
|
+
// quotations
|
251
|
+
['8249', 'single left-pointing angle quotation mark'],
|
252
|
+
['8250', 'single right-pointing angle quotation mark'],
|
253
|
+
['171', 'left pointing guillemet'],
|
254
|
+
['187', 'right pointing guillemet'],
|
255
|
+
['8216', 'left single quotation mark'],
|
256
|
+
['8217', 'right single quotation mark'],
|
257
|
+
['8220', 'left double quotation mark'],
|
258
|
+
['8221', 'right double quotation mark'],
|
259
|
+
['8218', 'single low-9 quotation mark'],
|
260
|
+
['8222', 'double low-9 quotation mark'],
|
261
|
+
['60', 'less-than sign'],
|
262
|
+
['62', 'greater-than sign'],
|
263
|
+
['8804', 'less-than or equal to'],
|
264
|
+
['8805', 'greater-than or equal to'],
|
265
|
+
['8211', 'en dash'],
|
266
|
+
['8212', 'em dash'],
|
267
|
+
['175', 'macron'],
|
268
|
+
['8254', 'overline'],
|
269
|
+
['164', 'currency sign'],
|
270
|
+
['166', 'broken bar'],
|
271
|
+
['168', 'diaeresis'],
|
272
|
+
['161', 'inverted exclamation mark'],
|
273
|
+
['191', 'turned question mark'],
|
274
|
+
['710', 'circumflex accent'],
|
275
|
+
['732', 'small tilde'],
|
276
|
+
['176', 'degree sign'],
|
277
|
+
['8722', 'minus sign'],
|
278
|
+
['177', 'plus-minus sign'],
|
279
|
+
['247', 'division sign'],
|
280
|
+
['8260', 'fraction slash'],
|
281
|
+
['215', 'multiplication sign'],
|
282
|
+
['185', 'superscript one'],
|
283
|
+
['178', 'superscript two'],
|
284
|
+
['179', 'superscript three'],
|
285
|
+
['188', 'fraction one quarter'],
|
286
|
+
['189', 'fraction one half'],
|
287
|
+
['190', 'fraction three quarters'],
|
288
|
+
// math / logical
|
289
|
+
['402', 'function / florin'],
|
290
|
+
['8747', 'integral'],
|
291
|
+
['8721', 'n-ary sumation'],
|
292
|
+
['8734', 'infinity'],
|
293
|
+
['8730', 'square root'],
|
294
|
+
['8764', 'similar to'],
|
295
|
+
['8773', 'approximately equal to'],
|
296
|
+
['8776', 'almost equal to'],
|
297
|
+
['8800', 'not equal to'],
|
298
|
+
['8801', 'identical to'],
|
299
|
+
['8712', 'element of'],
|
300
|
+
['8713', 'not an element of'],
|
301
|
+
['8715', 'contains as member'],
|
302
|
+
['8719', 'n-ary product'],
|
303
|
+
['8743', 'logical and'],
|
304
|
+
['8744', 'logical or'],
|
305
|
+
['172', 'not sign'],
|
306
|
+
['8745', 'intersection'],
|
307
|
+
['8746', 'union'],
|
308
|
+
['8706', 'partial differential'],
|
309
|
+
['8704', 'for all'],
|
310
|
+
['8707', 'there exists'],
|
311
|
+
['8709', 'diameter'],
|
312
|
+
['8711', 'backward difference'],
|
313
|
+
['8727', 'asterisk operator'],
|
314
|
+
['8733', 'proportional to'],
|
315
|
+
['8736', 'angle'],
|
316
|
+
// undefined
|
317
|
+
['180', 'acute accent'],
|
318
|
+
['184', 'cedilla'],
|
319
|
+
['170', 'feminine ordinal indicator'],
|
320
|
+
['186', 'masculine ordinal indicator'],
|
321
|
+
['8224', 'dagger'],
|
322
|
+
['8225', 'double dagger'],
|
323
|
+
// alphabetical special chars
|
324
|
+
['192', 'A - grave'],
|
325
|
+
['193', 'A - acute'],
|
326
|
+
['194', 'A - circumflex'],
|
327
|
+
['195', 'A - tilde'],
|
328
|
+
['196', 'A - diaeresis'],
|
329
|
+
['197', 'A - ring above'],
|
330
|
+
['256', 'A - macron'],
|
331
|
+
['198', 'ligature AE'],
|
332
|
+
['199', 'C - cedilla'],
|
333
|
+
['200', 'E - grave'],
|
334
|
+
['201', 'E - acute'],
|
335
|
+
['202', 'E - circumflex'],
|
336
|
+
['203', 'E - diaeresis'],
|
337
|
+
['274', 'E - macron'],
|
338
|
+
['204', 'I - grave'],
|
339
|
+
['205', 'I - acute'],
|
340
|
+
['206', 'I - circumflex'],
|
341
|
+
['207', 'I - diaeresis'],
|
342
|
+
['298', 'I - macron'],
|
343
|
+
['208', 'ETH'],
|
344
|
+
['209', 'N - tilde'],
|
345
|
+
['210', 'O - grave'],
|
346
|
+
['211', 'O - acute'],
|
347
|
+
['212', 'O - circumflex'],
|
348
|
+
['213', 'O - tilde'],
|
349
|
+
['214', 'O - diaeresis'],
|
350
|
+
['216', 'O - slash'],
|
351
|
+
['332', 'O - macron'],
|
352
|
+
['338', 'ligature OE'],
|
353
|
+
['352', 'S - caron'],
|
354
|
+
['217', 'U - grave'],
|
355
|
+
['218', 'U - acute'],
|
356
|
+
['219', 'U - circumflex'],
|
357
|
+
['220', 'U - diaeresis'],
|
358
|
+
['362', 'U - macron'],
|
359
|
+
['221', 'Y - acute'],
|
360
|
+
['376', 'Y - diaeresis'],
|
361
|
+
['562', 'Y - macron'],
|
362
|
+
['222', 'THORN'],
|
363
|
+
['224', 'a - grave'],
|
364
|
+
['225', 'a - acute'],
|
365
|
+
['226', 'a - circumflex'],
|
366
|
+
['227', 'a - tilde'],
|
367
|
+
['228', 'a - diaeresis'],
|
368
|
+
['229', 'a - ring above'],
|
369
|
+
['257', 'a - macron'],
|
370
|
+
['230', 'ligature ae'],
|
371
|
+
['231', 'c - cedilla'],
|
372
|
+
['232', 'e - grave'],
|
373
|
+
['233', 'e - acute'],
|
374
|
+
['234', 'e - circumflex'],
|
375
|
+
['235', 'e - diaeresis'],
|
376
|
+
['275', 'e - macron'],
|
377
|
+
['236', 'i - grave'],
|
378
|
+
['237', 'i - acute'],
|
379
|
+
['238', 'i - circumflex'],
|
380
|
+
['239', 'i - diaeresis'],
|
381
|
+
['299', 'i - macron'],
|
382
|
+
['240', 'eth'],
|
383
|
+
['241', 'n - tilde'],
|
384
|
+
['242', 'o - grave'],
|
385
|
+
['243', 'o - acute'],
|
386
|
+
['244', 'o - circumflex'],
|
387
|
+
['245', 'o - tilde'],
|
388
|
+
['246', 'o - diaeresis'],
|
389
|
+
['248', 'o slash'],
|
390
|
+
['333', 'o macron'],
|
391
|
+
['339', 'ligature oe'],
|
392
|
+
['353', 's - caron'],
|
393
|
+
['249', 'u - grave'],
|
394
|
+
['250', 'u - acute'],
|
395
|
+
['251', 'u - circumflex'],
|
396
|
+
['252', 'u - diaeresis'],
|
397
|
+
['363', 'u - macron'],
|
398
|
+
['253', 'y - acute'],
|
399
|
+
['254', 'thorn'],
|
400
|
+
['255', 'y - diaeresis'],
|
401
|
+
['563', 'y - macron'],
|
402
|
+
['913', 'Alpha'],
|
403
|
+
['914', 'Beta'],
|
404
|
+
['915', 'Gamma'],
|
405
|
+
['916', 'Delta'],
|
406
|
+
['917', 'Epsilon'],
|
407
|
+
['918', 'Zeta'],
|
408
|
+
['919', 'Eta'],
|
409
|
+
['920', 'Theta'],
|
410
|
+
['921', 'Iota'],
|
411
|
+
['922', 'Kappa'],
|
412
|
+
['923', 'Lambda'],
|
413
|
+
['924', 'Mu'],
|
414
|
+
['925', 'Nu'],
|
415
|
+
['926', 'Xi'],
|
416
|
+
['927', 'Omicron'],
|
417
|
+
['928', 'Pi'],
|
418
|
+
['929', 'Rho'],
|
419
|
+
['931', 'Sigma'],
|
420
|
+
['932', 'Tau'],
|
421
|
+
['933', 'Upsilon'],
|
422
|
+
['934', 'Phi'],
|
423
|
+
['935', 'Chi'],
|
424
|
+
['936', 'Psi'],
|
425
|
+
['937', 'Omega'],
|
426
|
+
['945', 'alpha'],
|
427
|
+
['946', 'beta'],
|
428
|
+
['947', 'gamma'],
|
429
|
+
['948', 'delta'],
|
430
|
+
['949', 'epsilon'],
|
431
|
+
['950', 'zeta'],
|
432
|
+
['951', 'eta'],
|
433
|
+
['952', 'theta'],
|
434
|
+
['953', 'iota'],
|
435
|
+
['954', 'kappa'],
|
436
|
+
['955', 'lambda'],
|
437
|
+
['956', 'mu'],
|
438
|
+
['957', 'nu'],
|
439
|
+
['958', 'xi'],
|
440
|
+
['959', 'omicron'],
|
441
|
+
['960', 'pi'],
|
442
|
+
['961', 'rho'],
|
443
|
+
['962', 'final sigma'],
|
444
|
+
['963', 'sigma'],
|
445
|
+
['964', 'tau'],
|
446
|
+
['965', 'upsilon'],
|
447
|
+
['966', 'phi'],
|
448
|
+
['967', 'chi'],
|
449
|
+
['968', 'psi'],
|
450
|
+
['969', 'omega'],
|
451
|
+
// symbols
|
452
|
+
['8501', 'alef symbol'],
|
453
|
+
['982', 'pi symbol'],
|
454
|
+
['8476', 'real part symbol'],
|
455
|
+
['978', 'upsilon - hook symbol'],
|
456
|
+
['8472', 'Weierstrass p'],
|
457
|
+
['8465', 'imaginary part'],
|
458
|
+
// arrows
|
459
|
+
['8592', 'leftwards arrow'],
|
460
|
+
['8593', 'upwards arrow'],
|
461
|
+
['8594', 'rightwards arrow'],
|
462
|
+
['8595', 'downwards arrow'],
|
463
|
+
['8596', 'left right arrow'],
|
464
|
+
['8629', 'carriage return'],
|
465
|
+
['8656', 'leftwards double arrow'],
|
466
|
+
['8657', 'upwards double arrow'],
|
467
|
+
['8658', 'rightwards double arrow'],
|
468
|
+
['8659', 'downwards double arrow'],
|
469
|
+
['8660', 'left right double arrow'],
|
470
|
+
['8756', 'therefore'],
|
471
|
+
['8834', 'subset of'],
|
472
|
+
['8835', 'superset of'],
|
473
|
+
['8836', 'not a subset of'],
|
474
|
+
['8838', 'subset of or equal to'],
|
475
|
+
['8839', 'superset of or equal to'],
|
476
|
+
['8853', 'circled plus'],
|
477
|
+
['8855', 'circled times'],
|
478
|
+
['8869', 'perpendicular'],
|
479
|
+
['8901', 'dot operator'],
|
480
|
+
['8968', 'left ceiling'],
|
481
|
+
['8969', 'right ceiling'],
|
482
|
+
['8970', 'left floor'],
|
483
|
+
['8971', 'right floor'],
|
484
|
+
['9001', 'left-pointing angle bracket'],
|
485
|
+
['9002', 'right-pointing angle bracket'],
|
486
|
+
['9674', 'lozenge'],
|
487
|
+
['9824', 'black spade suit'],
|
488
|
+
['9827', 'black club suit'],
|
489
|
+
['9829', 'black heart suit'],
|
490
|
+
['9830', 'black diamond suit'],
|
491
|
+
['8194', 'en space'],
|
492
|
+
['8195', 'em space'],
|
493
|
+
['8201', 'thin space'],
|
494
|
+
['8204', 'zero width non-joiner'],
|
495
|
+
['8205', 'zero width joiner'],
|
496
|
+
['8206', 'left-to-right mark'],
|
497
|
+
['8207', 'right-to-left mark']
|
498
|
+
];
|
499
|
+
};
|
500
|
+
|
501
|
+
var charmapFilter = function (charmap) {
|
502
|
+
return Tools.grep(charmap, function (item) {
|
503
|
+
return isArray(item) && item.length === 2;
|
504
|
+
});
|
505
|
+
};
|
506
|
+
|
507
|
+
var getCharsFromSetting = function (settingValue) {
|
508
|
+
if (isArray(settingValue)) {
|
509
|
+
return [].concat(charmapFilter(settingValue));
|
510
|
+
}
|
511
|
+
|
512
|
+
if (typeof settingValue === "function") {
|
513
|
+
return settingValue();
|
514
|
+
}
|
515
|
+
|
516
|
+
return [];
|
517
|
+
};
|
518
|
+
|
519
|
+
var extendCharMap = function (editor, charmap) {
|
520
|
+
var userCharMap = Settings.getCharMap(editor);
|
521
|
+
if (userCharMap) {
|
522
|
+
charmap = getCharsFromSetting(userCharMap);
|
523
|
+
}
|
524
|
+
|
525
|
+
var userCharMapAppend = Settings.getCharMapAppend(editor);
|
526
|
+
if (userCharMapAppend) {
|
527
|
+
return [].concat(charmap).concat(getCharsFromSetting(userCharMapAppend));
|
528
|
+
}
|
529
|
+
|
530
|
+
return charmap;
|
531
|
+
};
|
532
|
+
|
533
|
+
var getCharMap = function (editor) {
|
534
|
+
return extendCharMap(editor, getDefaultCharMap());
|
535
|
+
};
|
536
|
+
|
537
|
+
return {
|
538
|
+
getCharMap: getCharMap
|
539
|
+
};
|
540
|
+
}
|
541
|
+
);
|
542
|
+
/**
|
543
|
+
* Api.js
|
544
|
+
*
|
545
|
+
* Released under LGPL License.
|
546
|
+
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
547
|
+
*
|
548
|
+
* License: http://www.tinymce.com/license
|
549
|
+
* Contributing: http://www.tinymce.com/contributing
|
550
|
+
*/
|
551
|
+
|
552
|
+
define(
|
553
|
+
'tinymce.plugins.charmap.api.Api',
|
554
|
+
[
|
555
|
+
'tinymce.plugins.charmap.core.Actions',
|
556
|
+
'tinymce.plugins.charmap.core.CharMap'
|
557
|
+
],
|
558
|
+
function (Actions, CharMap) {
|
559
|
+
var get = function (editor) {
|
560
|
+
var getCharMap = function () {
|
561
|
+
return CharMap.getCharMap(editor);
|
562
|
+
};
|
563
|
+
|
564
|
+
var insertChar = function (chr) {
|
565
|
+
Actions.insertChar(editor, chr);
|
566
|
+
};
|
567
|
+
|
568
|
+
return {
|
569
|
+
getCharMap: getCharMap,
|
570
|
+
insertChar: insertChar
|
571
|
+
};
|
572
|
+
};
|
573
|
+
|
574
|
+
return {
|
575
|
+
get: get
|
576
|
+
};
|
577
|
+
}
|
578
|
+
);
|
579
|
+
|
580
|
+
|
581
|
+
/**
|
582
|
+
* GridHtml.js
|
583
|
+
*
|
584
|
+
* Released under LGPL License.
|
585
|
+
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
586
|
+
*
|
587
|
+
* License: http://www.tinymce.com/license
|
588
|
+
* Contributing: http://www.tinymce.com/contributing
|
589
|
+
*/
|
590
|
+
|
591
|
+
define(
|
592
|
+
'tinymce.plugins.charmap.ui.GridHtml',
|
593
|
+
[
|
594
|
+
],
|
595
|
+
function () {
|
596
|
+
var getHtml = function (charmap) {
|
597
|
+
var gridHtml, x, y;
|
598
|
+
var width = Math.min(charmap.length, 25);
|
599
|
+
var height = Math.ceil(charmap.length / width);
|
600
|
+
|
601
|
+
gridHtml = '<table role="presentation" cellspacing="0" class="mce-charmap"><tbody>';
|
602
|
+
|
603
|
+
for (y = 0; y < height; y++) {
|
604
|
+
gridHtml += '<tr>';
|
605
|
+
|
606
|
+
for (x = 0; x < width; x++) {
|
607
|
+
var index = y * width + x;
|
608
|
+
if (index < charmap.length) {
|
609
|
+
var chr = charmap[index];
|
610
|
+
var charCode = parseInt(chr[0], 10);
|
611
|
+
var chrText = chr ? String.fromCharCode(charCode) : ' ';
|
612
|
+
|
613
|
+
gridHtml += (
|
614
|
+
'<td title="' + chr[1] + '">' +
|
615
|
+
'<div tabindex="-1" title="' + chr[1] + '" role="button" data-chr="' + charCode + '">' +
|
616
|
+
chrText +
|
617
|
+
'</div>' +
|
618
|
+
'</td>'
|
619
|
+
);
|
620
|
+
} else {
|
621
|
+
gridHtml += '<td />';
|
622
|
+
}
|
623
|
+
}
|
624
|
+
|
625
|
+
gridHtml += '</tr>';
|
626
|
+
}
|
627
|
+
|
628
|
+
gridHtml += '</tbody></table>';
|
629
|
+
|
630
|
+
return gridHtml;
|
631
|
+
};
|
632
|
+
|
633
|
+
return {
|
634
|
+
getHtml: getHtml
|
635
|
+
};
|
636
|
+
}
|
637
|
+
);
|
638
|
+
/**
|
639
|
+
* Dialog.js
|
640
|
+
*
|
641
|
+
* Released under LGPL License.
|
642
|
+
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
643
|
+
*
|
644
|
+
* License: http://www.tinymce.com/license
|
645
|
+
* Contributing: http://www.tinymce.com/contributing
|
646
|
+
*/
|
647
|
+
|
648
|
+
define(
|
649
|
+
'tinymce.plugins.charmap.ui.Dialog',
|
650
|
+
[
|
651
|
+
'tinymce.plugins.charmap.core.Actions',
|
652
|
+
'tinymce.plugins.charmap.core.CharMap',
|
653
|
+
'tinymce.plugins.charmap.ui.GridHtml'
|
654
|
+
],
|
655
|
+
function (Actions, CharMap, GridHtml) {
|
656
|
+
var getParentTd = function (elm) {
|
657
|
+
while (elm) {
|
658
|
+
if (elm.nodeName === 'TD') {
|
659
|
+
return elm;
|
660
|
+
}
|
661
|
+
|
662
|
+
elm = elm.parentNode;
|
663
|
+
}
|
664
|
+
};
|
665
|
+
|
666
|
+
var open = function (editor) {
|
667
|
+
var win;
|
668
|
+
|
669
|
+
var charMapPanel = {
|
670
|
+
type: 'container',
|
671
|
+
html: GridHtml.getHtml(CharMap.getCharMap(editor)),
|
672
|
+
onclick: function (e) {
|
673
|
+
var target = e.target;
|
674
|
+
|
675
|
+
if (/^(TD|DIV)$/.test(target.nodeName)) {
|
676
|
+
var charDiv = getParentTd(target).firstChild;
|
677
|
+
if (charDiv && charDiv.hasAttribute('data-chr')) {
|
678
|
+
var charCodeString = charDiv.getAttribute('data-chr');
|
679
|
+
var charCode = parseInt(charCodeString, 10);
|
680
|
+
|
681
|
+
if (!isNaN(charCode)) {
|
682
|
+
Actions.insertChar(editor, String.fromCharCode(charCode));
|
683
|
+
}
|
684
|
+
|
685
|
+
if (!e.ctrlKey) {
|
686
|
+
win.close();
|
687
|
+
}
|
688
|
+
}
|
689
|
+
}
|
690
|
+
},
|
691
|
+
onmouseover: function (e) {
|
692
|
+
var td = getParentTd(e.target);
|
693
|
+
|
694
|
+
if (td && td.firstChild) {
|
695
|
+
win.find('#preview').text(td.firstChild.firstChild.data);
|
696
|
+
win.find('#previewTitle').text(td.title);
|
697
|
+
} else {
|
698
|
+
win.find('#preview').text(' ');
|
699
|
+
win.find('#previewTitle').text(' ');
|
700
|
+
}
|
701
|
+
}
|
702
|
+
};
|
703
|
+
|
704
|
+
win = editor.windowManager.open({
|
705
|
+
title: "Special character",
|
706
|
+
spacing: 10,
|
707
|
+
padding: 10,
|
708
|
+
items: [
|
709
|
+
charMapPanel,
|
710
|
+
{
|
711
|
+
type: 'container',
|
712
|
+
layout: 'flex',
|
713
|
+
direction: 'column',
|
714
|
+
align: 'center',
|
715
|
+
spacing: 5,
|
716
|
+
minWidth: 160,
|
717
|
+
minHeight: 160,
|
718
|
+
items: [
|
719
|
+
{
|
720
|
+
type: 'label',
|
721
|
+
name: 'preview',
|
722
|
+
text: ' ',
|
723
|
+
style: 'font-size: 40px; text-align: center',
|
724
|
+
border: 1,
|
725
|
+
minWidth: 140,
|
726
|
+
minHeight: 80
|
727
|
+
},
|
728
|
+
{
|
729
|
+
type: 'spacer',
|
730
|
+
minHeight: 20
|
731
|
+
},
|
732
|
+
{
|
733
|
+
type: 'label',
|
734
|
+
name: 'previewTitle',
|
735
|
+
text: ' ',
|
736
|
+
style: 'white-space: pre-wrap;',
|
737
|
+
border: 1,
|
738
|
+
minWidth: 140
|
739
|
+
}
|
740
|
+
]
|
741
|
+
}
|
742
|
+
],
|
743
|
+
buttons: [
|
744
|
+
{
|
745
|
+
text: "Close", onclick: function () {
|
746
|
+
win.close();
|
747
|
+
}
|
748
|
+
}
|
749
|
+
]
|
750
|
+
});
|
751
|
+
};
|
752
|
+
|
753
|
+
return {
|
754
|
+
open: open
|
755
|
+
};
|
756
|
+
}
|
757
|
+
);
|
758
|
+
/**
|
759
|
+
* Commands.js
|
760
|
+
*
|
761
|
+
* Released under LGPL License.
|
762
|
+
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
763
|
+
*
|
764
|
+
* License: http://www.tinymce.com/license
|
765
|
+
* Contributing: http://www.tinymce.com/contributing
|
766
|
+
*/
|
767
|
+
|
768
|
+
define(
|
769
|
+
'tinymce.plugins.charmap.api.Commands',
|
770
|
+
[
|
771
|
+
'tinymce.plugins.charmap.ui.Dialog'
|
772
|
+
],
|
773
|
+
function (Dialog) {
|
774
|
+
var register = function (editor) {
|
775
|
+
editor.addCommand('mceShowCharmap', function () {
|
776
|
+
Dialog.open(editor);
|
777
|
+
});
|
778
|
+
};
|
779
|
+
|
780
|
+
return {
|
781
|
+
register: register
|
782
|
+
};
|
783
|
+
}
|
784
|
+
);
|
785
|
+
/**
|
786
|
+
* Buttons.js
|
787
|
+
*
|
788
|
+
* Released under LGPL License.
|
789
|
+
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
790
|
+
*
|
791
|
+
* License: http://www.tinymce.com/license
|
792
|
+
* Contributing: http://www.tinymce.com/contributing
|
793
|
+
*/
|
794
|
+
|
795
|
+
define(
|
796
|
+
'tinymce.plugins.charmap.ui.Buttons',
|
797
|
+
[
|
798
|
+
],
|
799
|
+
function () {
|
800
|
+
var register = function (editor) {
|
801
|
+
editor.addButton('charmap', {
|
802
|
+
icon: 'charmap',
|
803
|
+
tooltip: 'Special character',
|
804
|
+
cmd: 'mceShowCharmap'
|
805
|
+
});
|
806
|
+
|
807
|
+
editor.addMenuItem('charmap', {
|
808
|
+
icon: 'charmap',
|
809
|
+
text: 'Special character',
|
810
|
+
cmd: 'mceShowCharmap',
|
811
|
+
context: 'insert'
|
812
|
+
});
|
813
|
+
};
|
814
|
+
|
815
|
+
return {
|
816
|
+
register: register
|
817
|
+
};
|
818
|
+
}
|
819
|
+
);
|
820
|
+
/**
|
821
|
+
* Plugin.js
|
822
|
+
*
|
823
|
+
* Released under LGPL License.
|
824
|
+
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
825
|
+
*
|
826
|
+
* License: http://www.tinymce.com/license
|
827
|
+
* Contributing: http://www.tinymce.com/contributing
|
828
|
+
*/
|
829
|
+
|
830
|
+
define(
|
831
|
+
'tinymce.plugins.charmap.Plugin',
|
832
|
+
[
|
833
|
+
'tinymce.core.PluginManager',
|
834
|
+
'tinymce.plugins.charmap.api.Api',
|
835
|
+
'tinymce.plugins.charmap.api.Commands',
|
836
|
+
'tinymce.plugins.charmap.ui.Buttons'
|
837
|
+
],
|
838
|
+
function (PluginManager, Api, Commands, Buttons) {
|
839
|
+
PluginManager.add('charmap', function (editor) {
|
840
|
+
Commands.register(editor);
|
841
|
+
Buttons.register(editor);
|
842
|
+
|
843
|
+
return Api.get(editor);
|
844
|
+
});
|
845
|
+
|
846
|
+
return function () { };
|
847
|
+
}
|
848
|
+
);
|
849
|
+
dem('tinymce.plugins.charmap.Plugin')();
|
850
|
+
})();
|