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.
Files changed (198) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/assets/_vendor/tinymce/plugins/advlist/index.js +7 -0
  4. data/assets/_vendor/tinymce/plugins/advlist/plugin.js +428 -0
  5. data/assets/_vendor/tinymce/plugins/advlist/plugin.min.js +1 -0
  6. data/assets/_vendor/tinymce/plugins/anchor/index.js +7 -0
  7. data/assets/_vendor/tinymce/plugins/anchor/plugin.js +338 -0
  8. data/assets/_vendor/tinymce/plugins/anchor/plugin.min.js +1 -0
  9. data/assets/_vendor/tinymce/plugins/autolink/index.js +7 -0
  10. data/assets/_vendor/tinymce/plugins/autolink/plugin.js +404 -0
  11. data/assets/_vendor/tinymce/plugins/autolink/plugin.min.js +1 -0
  12. data/assets/_vendor/tinymce/plugins/autoresize/index.js +7 -0
  13. data/assets/_vendor/tinymce/plugins/autoresize/plugin.js +451 -0
  14. data/assets/_vendor/tinymce/plugins/autoresize/plugin.min.js +1 -0
  15. data/assets/_vendor/tinymce/plugins/autosave/index.js +7 -0
  16. data/assets/_vendor/tinymce/plugins/autosave/plugin.js +608 -0
  17. data/assets/_vendor/tinymce/plugins/autosave/plugin.min.js +1 -0
  18. data/assets/_vendor/tinymce/plugins/bbcode/index.js +7 -0
  19. data/assets/_vendor/tinymce/plugins/bbcode/plugin.js +264 -0
  20. data/assets/_vendor/tinymce/plugins/bbcode/plugin.min.js +1 -0
  21. data/assets/_vendor/tinymce/plugins/charmap/index.js +7 -0
  22. data/assets/_vendor/tinymce/plugins/charmap/plugin.js +850 -0
  23. data/assets/_vendor/tinymce/plugins/charmap/plugin.min.js +1 -0
  24. data/assets/_vendor/tinymce/plugins/code/index.js +7 -0
  25. data/assets/_vendor/tinymce/plugins/code/plugin.js +338 -0
  26. data/assets/_vendor/tinymce/plugins/code/plugin.min.js +1 -0
  27. data/assets/_vendor/tinymce/plugins/codesample/css/prism.css +138 -0
  28. data/assets/_vendor/tinymce/plugins/codesample/index.js +7 -0
  29. data/assets/_vendor/tinymce/plugins/codesample/plugin.js +1582 -0
  30. data/assets/_vendor/tinymce/plugins/codesample/plugin.min.js +1 -0
  31. data/assets/_vendor/tinymce/plugins/colorpicker/index.js +7 -0
  32. data/assets/_vendor/tinymce/plugins/colorpicker/plugin.js +272 -0
  33. data/assets/_vendor/tinymce/plugins/colorpicker/plugin.min.js +1 -0
  34. data/assets/_vendor/tinymce/plugins/contextmenu/index.js +7 -0
  35. data/assets/_vendor/tinymce/plugins/contextmenu/plugin.js +496 -0
  36. data/assets/_vendor/tinymce/plugins/contextmenu/plugin.min.js +1 -0
  37. data/assets/_vendor/tinymce/plugins/directionality/index.js +7 -0
  38. data/assets/_vendor/tinymce/plugins/directionality/plugin.js +270 -0
  39. data/assets/_vendor/tinymce/plugins/directionality/plugin.min.js +1 -0
  40. data/assets/_vendor/tinymce/plugins/emoticons/img/smiley-cool.gif +0 -0
  41. data/assets/_vendor/tinymce/plugins/emoticons/img/smiley-cry.gif +0 -0
  42. data/assets/_vendor/tinymce/plugins/emoticons/img/smiley-embarassed.gif +0 -0
  43. data/assets/_vendor/tinymce/plugins/emoticons/img/smiley-foot-in-mouth.gif +0 -0
  44. data/assets/_vendor/tinymce/plugins/emoticons/img/smiley-frown.gif +0 -0
  45. data/assets/_vendor/tinymce/plugins/emoticons/img/smiley-innocent.gif +0 -0
  46. data/assets/_vendor/tinymce/plugins/emoticons/img/smiley-kiss.gif +0 -0
  47. data/assets/_vendor/tinymce/plugins/emoticons/img/smiley-laughing.gif +0 -0
  48. data/assets/_vendor/tinymce/plugins/emoticons/img/smiley-money-mouth.gif +0 -0
  49. data/assets/_vendor/tinymce/plugins/emoticons/img/smiley-sealed.gif +0 -0
  50. data/assets/_vendor/tinymce/plugins/emoticons/img/smiley-smile.gif +0 -0
  51. data/assets/_vendor/tinymce/plugins/emoticons/img/smiley-surprised.gif +0 -0
  52. data/assets/_vendor/tinymce/plugins/emoticons/img/smiley-tongue-out.gif +0 -0
  53. data/assets/_vendor/tinymce/plugins/emoticons/img/smiley-undecided.gif +0 -0
  54. data/assets/_vendor/tinymce/plugins/emoticons/img/smiley-wink.gif +0 -0
  55. data/assets/_vendor/tinymce/plugins/emoticons/img/smiley-yell.gif +0 -0
  56. data/assets/_vendor/tinymce/plugins/emoticons/index.js +7 -0
  57. data/assets/_vendor/tinymce/plugins/emoticons/plugin.js +256 -0
  58. data/assets/_vendor/tinymce/plugins/emoticons/plugin.min.js +1 -0
  59. data/assets/_vendor/tinymce/plugins/fullpage/index.js +7 -0
  60. data/assets/_vendor/tinymce/plugins/fullpage/plugin.js +962 -0
  61. data/assets/_vendor/tinymce/plugins/fullpage/plugin.min.js +1 -0
  62. data/assets/_vendor/tinymce/plugins/fullscreen/index.js +7 -0
  63. data/assets/_vendor/tinymce/plugins/fullscreen/plugin.js +455 -0
  64. data/assets/_vendor/tinymce/plugins/fullscreen/plugin.min.js +1 -0
  65. data/assets/_vendor/tinymce/plugins/help/img/logo.png +0 -0
  66. data/assets/_vendor/tinymce/plugins/help/index.js +7 -0
  67. data/assets/_vendor/tinymce/plugins/help/plugin.js +1527 -0
  68. data/assets/_vendor/tinymce/plugins/help/plugin.min.js +1 -0
  69. data/assets/_vendor/tinymce/plugins/hr/index.js +7 -0
  70. data/assets/_vendor/tinymce/plugins/hr/plugin.js +195 -0
  71. data/assets/_vendor/tinymce/plugins/hr/plugin.min.js +1 -0
  72. data/assets/_vendor/tinymce/plugins/image/index.js +7 -0
  73. data/assets/_vendor/tinymce/plugins/image/plugin.js +1572 -0
  74. data/assets/_vendor/tinymce/plugins/image/plugin.min.js +1 -0
  75. data/assets/_vendor/tinymce/plugins/imagetools/index.js +7 -0
  76. data/assets/_vendor/tinymce/plugins/imagetools/plugin.js +4444 -0
  77. data/assets/_vendor/tinymce/plugins/imagetools/plugin.min.js +2 -0
  78. data/assets/_vendor/tinymce/plugins/importcss/index.js +7 -0
  79. data/assets/_vendor/tinymce/plugins/importcss/plugin.js +577 -0
  80. data/assets/_vendor/tinymce/plugins/importcss/plugin.min.js +1 -0
  81. data/assets/_vendor/tinymce/plugins/insertdatetime/index.js +7 -0
  82. data/assets/_vendor/tinymce/plugins/insertdatetime/plugin.js +482 -0
  83. data/assets/_vendor/tinymce/plugins/insertdatetime/plugin.min.js +1 -0
  84. data/assets/_vendor/tinymce/plugins/legacyoutput/index.js +7 -0
  85. data/assets/_vendor/tinymce/plugins/legacyoutput/plugin.js +395 -0
  86. data/assets/_vendor/tinymce/plugins/legacyoutput/plugin.min.js +1 -0
  87. data/assets/_vendor/tinymce/plugins/link/index.js +7 -0
  88. data/assets/_vendor/tinymce/plugins/link/plugin.js +1231 -0
  89. data/assets/_vendor/tinymce/plugins/link/plugin.min.js +1 -0
  90. data/assets/_vendor/tinymce/plugins/lists/index.js +7 -0
  91. data/assets/_vendor/tinymce/plugins/lists/plugin.js +1985 -0
  92. data/assets/_vendor/tinymce/plugins/lists/plugin.min.js +1 -0
  93. data/assets/_vendor/tinymce/plugins/media/index.js +7 -0
  94. data/assets/_vendor/tinymce/plugins/media/plugin.js +2026 -0
  95. data/assets/_vendor/tinymce/plugins/media/plugin.min.js +1 -0
  96. data/assets/_vendor/tinymce/plugins/nonbreaking/index.js +7 -0
  97. data/assets/_vendor/tinymce/plugins/nonbreaking/plugin.js +313 -0
  98. data/assets/_vendor/tinymce/plugins/nonbreaking/plugin.min.js +1 -0
  99. data/assets/_vendor/tinymce/plugins/noneditable/index.js +7 -0
  100. data/assets/_vendor/tinymce/plugins/noneditable/plugin.js +316 -0
  101. data/assets/_vendor/tinymce/plugins/noneditable/plugin.min.js +1 -0
  102. data/assets/_vendor/tinymce/plugins/pagebreak/index.js +7 -0
  103. data/assets/_vendor/tinymce/plugins/pagebreak/plugin.js +354 -0
  104. data/assets/_vendor/tinymce/plugins/pagebreak/plugin.min.js +1 -0
  105. data/assets/_vendor/tinymce/plugins/paste/index.js +7 -0
  106. data/assets/_vendor/tinymce/plugins/paste/plugin.js +2935 -0
  107. data/assets/_vendor/tinymce/plugins/paste/plugin.min.js +1 -0
  108. data/assets/_vendor/tinymce/plugins/preview/index.js +7 -0
  109. data/assets/_vendor/tinymce/plugins/preview/plugin.js +410 -0
  110. data/assets/_vendor/tinymce/plugins/preview/plugin.min.js +1 -0
  111. data/assets/_vendor/tinymce/plugins/print/index.js +7 -0
  112. data/assets/_vendor/tinymce/plugins/print/plugin.js +194 -0
  113. data/assets/_vendor/tinymce/plugins/print/plugin.min.js +1 -0
  114. data/assets/_vendor/tinymce/plugins/save/index.js +7 -0
  115. data/assets/_vendor/tinymce/plugins/save/plugin.js +370 -0
  116. data/assets/_vendor/tinymce/plugins/save/plugin.min.js +1 -0
  117. data/assets/_vendor/tinymce/plugins/searchreplace/index.js +7 -0
  118. data/assets/_vendor/tinymce/plugins/searchreplace/plugin.js +977 -0
  119. data/assets/_vendor/tinymce/plugins/searchreplace/plugin.min.js +1 -0
  120. data/assets/_vendor/tinymce/plugins/spellchecker/index.js +7 -0
  121. data/assets/_vendor/tinymce/plugins/spellchecker/plugin.js +1419 -0
  122. data/assets/_vendor/tinymce/plugins/spellchecker/plugin.min.js +1 -0
  123. data/assets/_vendor/tinymce/plugins/tabfocus/index.js +7 -0
  124. data/assets/_vendor/tinymce/plugins/tabfocus/plugin.js +419 -0
  125. data/assets/_vendor/tinymce/plugins/tabfocus/plugin.min.js +1 -0
  126. data/assets/_vendor/tinymce/plugins/table/index.js +7 -0
  127. data/assets/_vendor/tinymce/plugins/table/plugin.js +15527 -0
  128. data/assets/_vendor/tinymce/plugins/table/plugin.min.js +5 -0
  129. data/assets/_vendor/tinymce/plugins/template/index.js +7 -0
  130. data/assets/_vendor/tinymce/plugins/template/plugin.js +807 -0
  131. data/assets/_vendor/tinymce/plugins/template/plugin.min.js +1 -0
  132. data/assets/_vendor/tinymce/plugins/textcolor/index.js +7 -0
  133. data/assets/_vendor/tinymce/plugins/textcolor/plugin.js +619 -0
  134. data/assets/_vendor/tinymce/plugins/textcolor/plugin.min.js +1 -0
  135. data/assets/_vendor/tinymce/plugins/textpattern/index.js +7 -0
  136. data/assets/_vendor/tinymce/plugins/textpattern/plugin.js +718 -0
  137. data/assets/_vendor/tinymce/plugins/textpattern/plugin.min.js +1 -0
  138. data/assets/_vendor/tinymce/plugins/toc/index.js +7 -0
  139. data/assets/_vendor/tinymce/plugins/toc/plugin.js +559 -0
  140. data/assets/_vendor/tinymce/plugins/toc/plugin.min.js +1 -0
  141. data/assets/_vendor/tinymce/plugins/visualblocks/css/visualblocks.css +154 -0
  142. data/assets/_vendor/tinymce/plugins/visualblocks/index.js +7 -0
  143. data/assets/_vendor/tinymce/plugins/visualblocks/plugin.js +459 -0
  144. data/assets/_vendor/tinymce/plugins/visualblocks/plugin.min.js +1 -0
  145. data/assets/_vendor/tinymce/plugins/visualchars/index.js +7 -0
  146. data/assets/_vendor/tinymce/plugins/visualchars/plugin.js +1325 -0
  147. data/assets/_vendor/tinymce/plugins/visualchars/plugin.min.js +1 -0
  148. data/assets/_vendor/tinymce/plugins/wordcount/index.js +7 -0
  149. data/assets/_vendor/tinymce/plugins/wordcount/plugin.js +735 -0
  150. data/assets/_vendor/tinymce/plugins/wordcount/plugin.min.js +1 -0
  151. data/assets/_vendor/tinymce/skins/lightgray/content.inline.min.css +1 -0
  152. data/assets/_vendor/tinymce/skins/lightgray/content.min.css +1 -0
  153. data/assets/_vendor/tinymce/skins/lightgray/content.mobile.min.css +1 -0
  154. data/assets/_vendor/tinymce/skins/lightgray/fonts/tinymce-mobile.woff +0 -0
  155. data/assets/_vendor/tinymce/skins/lightgray/fonts/tinymce-small.eot +0 -0
  156. data/assets/_vendor/tinymce/skins/lightgray/fonts/tinymce-small.svg +63 -0
  157. data/assets/_vendor/tinymce/skins/lightgray/fonts/tinymce-small.ttf +0 -0
  158. data/assets/_vendor/tinymce/skins/lightgray/fonts/tinymce-small.woff +0 -0
  159. data/assets/_vendor/tinymce/skins/lightgray/fonts/tinymce.eot +0 -0
  160. data/assets/_vendor/tinymce/skins/lightgray/fonts/tinymce.svg +131 -0
  161. data/assets/_vendor/tinymce/skins/lightgray/fonts/tinymce.ttf +0 -0
  162. data/assets/_vendor/tinymce/skins/lightgray/fonts/tinymce.woff +0 -0
  163. data/assets/_vendor/tinymce/skins/lightgray/img/anchor.gif +0 -0
  164. data/assets/_vendor/tinymce/skins/lightgray/img/loader.gif +0 -0
  165. data/assets/_vendor/tinymce/skins/lightgray/img/object.gif +0 -0
  166. data/assets/_vendor/tinymce/skins/lightgray/img/trans.gif +0 -0
  167. data/assets/_vendor/tinymce/skins/lightgray/skin.min.css +1 -0
  168. data/assets/_vendor/tinymce/skins/lightgray/skin.mobile.min.css +2 -0
  169. data/assets/_vendor/tinymce/themes/inlite/index.js +7 -0
  170. data/assets/_vendor/tinymce/themes/inlite/theme.js +18787 -0
  171. data/assets/_vendor/tinymce/themes/inlite/theme.min.js +5 -0
  172. data/assets/_vendor/tinymce/themes/mobile/index.js +7 -0
  173. data/assets/_vendor/tinymce/themes/mobile/theme.js +23384 -0
  174. data/assets/_vendor/tinymce/themes/mobile/theme.min.js +8 -0
  175. data/assets/_vendor/tinymce/themes/modern/index.js +7 -0
  176. data/assets/_vendor/tinymce/themes/modern/theme.js +18311 -0
  177. data/assets/_vendor/tinymce/themes/modern/theme.min.js +5 -0
  178. data/assets/_vendor/tinymce/tinymce.js +44399 -0
  179. data/assets/bedrock/js/bedrock.js +16587 -6193
  180. data/assets/bedrock/scss/_bedrock-components.scss +16 -0
  181. data/assets/bedrock/scss/_bedrock-settings.scss +15 -0
  182. data/assets/bedrock/scss/components/attachments-grid.scss +138 -0
  183. data/assets/bedrock/scss/components/dropzone-upload.scss +158 -0
  184. data/assets/bedrock/scss/components/global.scss +16 -8
  185. data/assets/bedrock/scss/components/helper-classes.scss +59 -0
  186. data/assets/bedrock/scss/components/inline-edit-box.scss +80 -0
  187. data/assets/bedrock/scss/components/login-box.scss +48 -0
  188. data/assets/bedrock/scss/components/no-content.scss +31 -0
  189. data/assets/bedrock/scss/components/off-canvas-menu.scss +1 -1
  190. data/assets/bedrock/scss/components/page-content.scss +51 -0
  191. data/assets/bedrock/scss/components/reveal-panel.scss +89 -0
  192. data/assets/bedrock/scss/components/select-box.scss +332 -0
  193. data/assets/bedrock/scss/components/tiny-mce-editor.scss +14 -7
  194. data/lib/bedrock_sass.rb +6 -0
  195. data/lib/bedrock_sass/engine.rb +8 -0
  196. data/lib/bedrock_sass/version.rb +1 -1
  197. data/lib/tasks/before_assets_precompile.rake +11 -0
  198. 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")}),g("3",[],function(){var a=function(a){return{isFullscreen:function(){return null!==a.get()}}};return{get:a}}),h("8",document),h("9",window),g("a",["6"],function(a){return a("tinymce.dom.DOMUtils")}),g("b",[],function(){var a=function(a,b){a.fire("FullscreenStateChanged",{state:b})};return{fireFullscreenStateChanged:a}}),g("7",["8","9","a","b"],function(a,b,c,d){var e=c.DOM,f=function(){var c,d,e=b,f=a,g=f.body;return g.offsetWidth&&(c=g.offsetWidth,d=g.offsetHeight),e.innerWidth&&e.innerHeight&&(c=e.innerWidth,d=e.innerHeight),{w:c,h:d}},g=function(){var a=e.getViewPort();return{x:a.x,y:a.y}},h=function(a){b.scrollTo(a.x,a.y)},i=function(c,i){var j,k,l,m,n=a.body,o=a.documentElement,p=i.get(),q=function(){e.setStyle(l,"height",f().h-(k.clientHeight-l.clientHeight))},r=function(){e.unbind(b,"resize",q)};if(k=c.getContainer(),j=k.style,l=c.getContentAreaContainer().firstChild,m=l.style,p)m.width=p.iframeWidth,m.height=p.iframeHeight,p.containerWidth&&(j.width=p.containerWidth),p.containerHeight&&(j.height=p.containerHeight),e.removeClass(n,"mce-fullscreen"),e.removeClass(o,"mce-fullscreen"),e.removeClass(k,"mce-fullscreen"),h(p.scrollPos),e.unbind(b,"resize",p.resizeHandler),c.off("remove",p.removeHandler),i.set(null),d.fireFullscreenStateChanged(c,!1);else{var s={scrollPos:g(),containerWidth:j.width,containerHeight:j.height,iframeWidth:m.width,iframeHeight:m.height,resizeHandler:q,removeHandler:r};m.width=m.height="100%",j.width=j.height="",e.addClass(n,"mce-fullscreen"),e.addClass(o,"mce-fullscreen"),e.addClass(k,"mce-fullscreen"),e.bind(b,"resize",q),c.on("remove",r),q(),i.set(s),d.fireFullscreenStateChanged(c,!0)}};return{toggleFullscreen:i}}),g("4",["7"],function(a){var b=function(b,c){b.addCommand("mceFullScreen",function(){a.toggleFullscreen(b,c)})};return{register:b}}),g("5",[],function(){var a=function(a){return function(b){var c=b.control;a.on("FullscreenStateChanged",function(a){c.active(a.state)})}},b=function(b){b.addMenuItem("fullscreen",{text:"Fullscreen",shortcut:"Ctrl+Shift+F",selectable:!0,cmd:"mceFullScreen",onPostRender:a(b),context:"view"}),b.addButton("fullscreen",{active:!1,tooltip:"Fullscreen",cmd:"mceFullScreen",onPostRender:a(b)})};return{register:b}}),g("0",["1","2","3","4","5"],function(a,b,c,d,e){return b.add("fullscreen",function(b){var f=a(null);return d.register(b,f),e.register(b),b.addShortcut("Ctrl+Shift+F","","mceFullScreen"),c.get(f)}),function(){}}),d("0")()}();
@@ -0,0 +1,7 @@
1
+ // Exports the "help" plugin for usage with module loaders
2
+ // Usage:
3
+ // CommonJS:
4
+ // require('tinymce/plugins/help')
5
+ // ES2015:
6
+ // import 'tinymce/plugins/help'
7
+ require('./plugin.js');
@@ -0,0 +1,1527 @@
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.help.Plugin","tinymce.core.PluginManager","tinymce.plugins.help.api.Commands","tinymce.plugins.help.ui.Buttons","tinymce.plugins.help.ui.Dialog","global!tinymce.util.Tools.resolve","tinymce.core.EditorManager","tinymce.plugins.help.ui.KeyboardShortcutsTab","tinymce.plugins.help.ui.PluginsTab","tinymce.plugins.help.ui.ButtonsRow","ephox.katamari.api.Arr","tinymce.core.util.I18n","tinymce.plugins.help.data.KeyboardShortcuts","ephox.katamari.api.Fun","ephox.katamari.api.Obj","ephox.katamari.api.Strings","tinymce.plugins.help.data.PluginUrls","ephox.katamari.api.Option","global!Array","global!Error","global!String","tinymce.core.Env","global!Object","ephox.katamari.str.StrAppend","ephox.katamari.str.StringParts"]
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.EditorManager',
119
+ [
120
+ 'global!tinymce.util.Tools.resolve'
121
+ ],
122
+ function (resolve) {
123
+ return resolve('tinymce.EditorManager');
124
+ }
125
+ );
126
+
127
+ defineGlobal("global!Array", Array);
128
+ defineGlobal("global!Error", Error);
129
+ define(
130
+ 'ephox.katamari.api.Fun',
131
+
132
+ [
133
+ 'global!Array',
134
+ 'global!Error'
135
+ ],
136
+
137
+ function (Array, Error) {
138
+
139
+ var noop = function () { };
140
+
141
+ var noarg = function (f) {
142
+ return function () {
143
+ return f();
144
+ };
145
+ };
146
+
147
+ var compose = function (fa, fb) {
148
+ return function () {
149
+ return fa(fb.apply(null, arguments));
150
+ };
151
+ };
152
+
153
+ var constant = function (value) {
154
+ return function () {
155
+ return value;
156
+ };
157
+ };
158
+
159
+ var identity = function (x) {
160
+ return x;
161
+ };
162
+
163
+ var tripleEquals = function(a, b) {
164
+ return a === b;
165
+ };
166
+
167
+ // Don't use array slice(arguments), makes the whole function unoptimisable on Chrome
168
+ var curry = function (f) {
169
+ // equivalent to arguments.slice(1)
170
+ // starting at 1 because 0 is the f, makes things tricky.
171
+ // Pay attention to what variable is where, and the -1 magic.
172
+ // thankfully, we have tests for this.
173
+ var args = new Array(arguments.length - 1);
174
+ for (var i = 1; i < arguments.length; i++) args[i-1] = arguments[i];
175
+
176
+ return function () {
177
+ var newArgs = new Array(arguments.length);
178
+ for (var j = 0; j < newArgs.length; j++) newArgs[j] = arguments[j];
179
+
180
+ var all = args.concat(newArgs);
181
+ return f.apply(null, all);
182
+ };
183
+ };
184
+
185
+ var not = function (f) {
186
+ return function () {
187
+ return !f.apply(null, arguments);
188
+ };
189
+ };
190
+
191
+ var die = function (msg) {
192
+ return function () {
193
+ throw new Error(msg);
194
+ };
195
+ };
196
+
197
+ var apply = function (f) {
198
+ return f();
199
+ };
200
+
201
+ var call = function(f) {
202
+ f();
203
+ };
204
+
205
+ var never = constant(false);
206
+ var always = constant(true);
207
+
208
+
209
+ return {
210
+ noop: noop,
211
+ noarg: noarg,
212
+ compose: compose,
213
+ constant: constant,
214
+ identity: identity,
215
+ tripleEquals: tripleEquals,
216
+ curry: curry,
217
+ not: not,
218
+ die: die,
219
+ apply: apply,
220
+ call: call,
221
+ never: never,
222
+ always: always
223
+ };
224
+ }
225
+ );
226
+
227
+ defineGlobal("global!Object", Object);
228
+ define(
229
+ 'ephox.katamari.api.Option',
230
+
231
+ [
232
+ 'ephox.katamari.api.Fun',
233
+ 'global!Object'
234
+ ],
235
+
236
+ function (Fun, Object) {
237
+
238
+ var never = Fun.never;
239
+ var always = Fun.always;
240
+
241
+ /**
242
+ Option objects support the following methods:
243
+
244
+ fold :: this Option a -> ((() -> b, a -> b)) -> Option b
245
+
246
+ is :: this Option a -> a -> Boolean
247
+
248
+ isSome :: this Option a -> () -> Boolean
249
+
250
+ isNone :: this Option a -> () -> Boolean
251
+
252
+ getOr :: this Option a -> a -> a
253
+
254
+ getOrThunk :: this Option a -> (() -> a) -> a
255
+
256
+ getOrDie :: this Option a -> String -> a
257
+
258
+ or :: this Option a -> Option a -> Option a
259
+ - if some: return self
260
+ - if none: return opt
261
+
262
+ orThunk :: this Option a -> (() -> Option a) -> Option a
263
+ - Same as "or", but uses a thunk instead of a value
264
+
265
+ map :: this Option a -> (a -> b) -> Option b
266
+ - "fmap" operation on the Option Functor.
267
+ - same as 'each'
268
+
269
+ ap :: this Option a -> Option (a -> b) -> Option b
270
+ - "apply" operation on the Option Apply/Applicative.
271
+ - Equivalent to <*> in Haskell/PureScript.
272
+
273
+ each :: this Option a -> (a -> b) -> undefined
274
+ - similar to 'map', but doesn't return a value.
275
+ - intended for clarity when performing side effects.
276
+
277
+ bind :: this Option a -> (a -> Option b) -> Option b
278
+ - "bind"/"flatMap" operation on the Option Bind/Monad.
279
+ - Equivalent to >>= in Haskell/PureScript; flatMap in Scala.
280
+
281
+ flatten :: {this Option (Option a))} -> () -> Option a
282
+ - "flatten"/"join" operation on the Option Monad.
283
+
284
+ exists :: this Option a -> (a -> Boolean) -> Boolean
285
+
286
+ forall :: this Option a -> (a -> Boolean) -> Boolean
287
+
288
+ filter :: this Option a -> (a -> Boolean) -> Option a
289
+
290
+ equals :: this Option a -> Option a -> Boolean
291
+
292
+ equals_ :: this Option a -> (Option a, a -> Boolean) -> Boolean
293
+
294
+ toArray :: this Option a -> () -> [a]
295
+
296
+ */
297
+
298
+ var none = function () { return NONE; };
299
+
300
+ var NONE = (function () {
301
+ var eq = function (o) {
302
+ return o.isNone();
303
+ };
304
+
305
+ // inlined from peanut, maybe a micro-optimisation?
306
+ var call = function (thunk) { return thunk(); };
307
+ var id = function (n) { return n; };
308
+ var noop = function () { };
309
+
310
+ var me = {
311
+ fold: function (n, s) { return n(); },
312
+ is: never,
313
+ isSome: never,
314
+ isNone: always,
315
+ getOr: id,
316
+ getOrThunk: call,
317
+ getOrDie: function (msg) {
318
+ throw new Error(msg || 'error: getOrDie called on none.');
319
+ },
320
+ or: id,
321
+ orThunk: call,
322
+ map: none,
323
+ ap: none,
324
+ each: noop,
325
+ bind: none,
326
+ flatten: none,
327
+ exists: never,
328
+ forall: always,
329
+ filter: none,
330
+ equals: eq,
331
+ equals_: eq,
332
+ toArray: function () { return []; },
333
+ toString: Fun.constant("none()")
334
+ };
335
+ if (Object.freeze) Object.freeze(me);
336
+ return me;
337
+ })();
338
+
339
+
340
+ /** some :: a -> Option a */
341
+ var some = function (a) {
342
+
343
+ // inlined from peanut, maybe a micro-optimisation?
344
+ var constant_a = function () { return a; };
345
+
346
+ var self = function () {
347
+ // can't Fun.constant this one
348
+ return me;
349
+ };
350
+
351
+ var map = function (f) {
352
+ return some(f(a));
353
+ };
354
+
355
+ var bind = function (f) {
356
+ return f(a);
357
+ };
358
+
359
+ var me = {
360
+ fold: function (n, s) { return s(a); },
361
+ is: function (v) { return a === v; },
362
+ isSome: always,
363
+ isNone: never,
364
+ getOr: constant_a,
365
+ getOrThunk: constant_a,
366
+ getOrDie: constant_a,
367
+ or: self,
368
+ orThunk: self,
369
+ map: map,
370
+ ap: function (optfab) {
371
+ return optfab.fold(none, function(fab) {
372
+ return some(fab(a));
373
+ });
374
+ },
375
+ each: function (f) {
376
+ f(a);
377
+ },
378
+ bind: bind,
379
+ flatten: constant_a,
380
+ exists: bind,
381
+ forall: bind,
382
+ filter: function (f) {
383
+ return f(a) ? me : NONE;
384
+ },
385
+ equals: function (o) {
386
+ return o.is(a);
387
+ },
388
+ equals_: function (o, elementEq) {
389
+ return o.fold(
390
+ never,
391
+ function (b) { return elementEq(a, b); }
392
+ );
393
+ },
394
+ toArray: function () {
395
+ return [a];
396
+ },
397
+ toString: function () {
398
+ return 'some(' + a + ')';
399
+ }
400
+ };
401
+ return me;
402
+ };
403
+
404
+ /** from :: undefined|null|a -> Option a */
405
+ var from = function (value) {
406
+ return value === null || value === undefined ? NONE : some(value);
407
+ };
408
+
409
+ return {
410
+ some: some,
411
+ none: none,
412
+ from: from
413
+ };
414
+ }
415
+ );
416
+
417
+ defineGlobal("global!String", String);
418
+ define(
419
+ 'ephox.katamari.api.Arr',
420
+
421
+ [
422
+ 'ephox.katamari.api.Option',
423
+ 'global!Array',
424
+ 'global!Error',
425
+ 'global!String'
426
+ ],
427
+
428
+ function (Option, Array, Error, String) {
429
+ // Use the native Array.indexOf if it is available (IE9+) otherwise fall back to manual iteration
430
+ // https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf
431
+ var rawIndexOf = (function () {
432
+ var pIndexOf = Array.prototype.indexOf;
433
+
434
+ var fastIndex = function (xs, x) { return pIndexOf.call(xs, x); };
435
+
436
+ var slowIndex = function(xs, x) { return slowIndexOf(xs, x); };
437
+
438
+ return pIndexOf === undefined ? slowIndex : fastIndex;
439
+ })();
440
+
441
+ var indexOf = function (xs, x) {
442
+ // The rawIndexOf method does not wrap up in an option. This is for performance reasons.
443
+ var r = rawIndexOf(xs, x);
444
+ return r === -1 ? Option.none() : Option.some(r);
445
+ };
446
+
447
+ var contains = function (xs, x) {
448
+ return rawIndexOf(xs, x) > -1;
449
+ };
450
+
451
+ // Using findIndex is likely less optimal in Chrome (dynamic return type instead of bool)
452
+ // but if we need that micro-optimisation we can inline it later.
453
+ var exists = function (xs, pred) {
454
+ return findIndex(xs, pred).isSome();
455
+ };
456
+
457
+ var range = function (num, f) {
458
+ var r = [];
459
+ for (var i = 0; i < num; i++) {
460
+ r.push(f(i));
461
+ }
462
+ return r;
463
+ };
464
+
465
+ // It's a total micro optimisation, but these do make some difference.
466
+ // Particularly for browsers other than Chrome.
467
+ // - length caching
468
+ // http://jsperf.com/browser-diet-jquery-each-vs-for-loop/69
469
+ // - not using push
470
+ // http://jsperf.com/array-direct-assignment-vs-push/2
471
+
472
+ var chunk = function (array, size) {
473
+ var r = [];
474
+ for (var i = 0; i < array.length; i += size) {
475
+ var s = array.slice(i, i + size);
476
+ r.push(s);
477
+ }
478
+ return r;
479
+ };
480
+
481
+ var map = function(xs, f) {
482
+ // pre-allocating array size when it's guaranteed to be known
483
+ // http://jsperf.com/push-allocated-vs-dynamic/22
484
+ var len = xs.length;
485
+ var r = new Array(len);
486
+ for (var i = 0; i < len; i++) {
487
+ var x = xs[i];
488
+ r[i] = f(x, i, xs);
489
+ }
490
+ return r;
491
+ };
492
+
493
+ // Unwound implementing other functions in terms of each.
494
+ // The code size is roughly the same, and it should allow for better optimisation.
495
+ var each = function(xs, f) {
496
+ for (var i = 0, len = xs.length; i < len; i++) {
497
+ var x = xs[i];
498
+ f(x, i, xs);
499
+ }
500
+ };
501
+
502
+ var eachr = function (xs, f) {
503
+ for (var i = xs.length - 1; i >= 0; i--) {
504
+ var x = xs[i];
505
+ f(x, i, xs);
506
+ }
507
+ };
508
+
509
+ var partition = function(xs, pred) {
510
+ var pass = [];
511
+ var fail = [];
512
+ for (var i = 0, len = xs.length; i < len; i++) {
513
+ var x = xs[i];
514
+ var arr = pred(x, i, xs) ? pass : fail;
515
+ arr.push(x);
516
+ }
517
+ return { pass: pass, fail: fail };
518
+ };
519
+
520
+ var filter = function(xs, pred) {
521
+ var r = [];
522
+ for (var i = 0, len = xs.length; i < len; i++) {
523
+ var x = xs[i];
524
+ if (pred(x, i, xs)) {
525
+ r.push(x);
526
+ }
527
+ }
528
+ return r;
529
+ };
530
+
531
+ /*
532
+ * Groups an array into contiguous arrays of like elements. Whether an element is like or not depends on f.
533
+ *
534
+ * f is a function that derives a value from an element - e.g. true or false, or a string.
535
+ * Elements are like if this function generates the same value for them (according to ===).
536
+ *
537
+ *
538
+ * Order of the elements is preserved. Arr.flatten() on the result will return the original list, as with Haskell groupBy function.
539
+ * For a good explanation, see the group function (which is a special case of groupBy)
540
+ * http://hackage.haskell.org/package/base-4.7.0.0/docs/Data-List.html#v:group
541
+ */
542
+ var groupBy = function (xs, f) {
543
+ if (xs.length === 0) {
544
+ return [];
545
+ } else {
546
+ var wasType = f(xs[0]); // initial case for matching
547
+ var r = [];
548
+ var group = [];
549
+
550
+ for (var i = 0, len = xs.length; i < len; i++) {
551
+ var x = xs[i];
552
+ var type = f(x);
553
+ if (type !== wasType) {
554
+ r.push(group);
555
+ group = [];
556
+ }
557
+ wasType = type;
558
+ group.push(x);
559
+ }
560
+ if (group.length !== 0) {
561
+ r.push(group);
562
+ }
563
+ return r;
564
+ }
565
+ };
566
+
567
+ var foldr = function (xs, f, acc) {
568
+ eachr(xs, function (x) {
569
+ acc = f(acc, x);
570
+ });
571
+ return acc;
572
+ };
573
+
574
+ var foldl = function (xs, f, acc) {
575
+ each(xs, function (x) {
576
+ acc = f(acc, x);
577
+ });
578
+ return acc;
579
+ };
580
+
581
+ var find = function (xs, pred) {
582
+ for (var i = 0, len = xs.length; i < len; i++) {
583
+ var x = xs[i];
584
+ if (pred(x, i, xs)) {
585
+ return Option.some(x);
586
+ }
587
+ }
588
+ return Option.none();
589
+ };
590
+
591
+ var findIndex = function (xs, pred) {
592
+ for (var i = 0, len = xs.length; i < len; i++) {
593
+ var x = xs[i];
594
+ if (pred(x, i, xs)) {
595
+ return Option.some(i);
596
+ }
597
+ }
598
+
599
+ return Option.none();
600
+ };
601
+
602
+ var slowIndexOf = function (xs, x) {
603
+ for (var i = 0, len = xs.length; i < len; ++i) {
604
+ if (xs[i] === x) {
605
+ return i;
606
+ }
607
+ }
608
+
609
+ return -1;
610
+ };
611
+
612
+ var push = Array.prototype.push;
613
+ var flatten = function (xs) {
614
+ // Note, this is possible because push supports multiple arguments:
615
+ // http://jsperf.com/concat-push/6
616
+ // Note that in the past, concat() would silently work (very slowly) for array-like objects.
617
+ // With this change it will throw an error.
618
+ var r = [];
619
+ for (var i = 0, len = xs.length; i < len; ++i) {
620
+ // Ensure that each value is an array itself
621
+ if (! Array.prototype.isPrototypeOf(xs[i])) throw new Error('Arr.flatten item ' + i + ' was not an array, input: ' + xs);
622
+ push.apply(r, xs[i]);
623
+ }
624
+ return r;
625
+ };
626
+
627
+ var bind = function (xs, f) {
628
+ var output = map(xs, f);
629
+ return flatten(output);
630
+ };
631
+
632
+ var forall = function (xs, pred) {
633
+ for (var i = 0, len = xs.length; i < len; ++i) {
634
+ var x = xs[i];
635
+ if (pred(x, i, xs) !== true) {
636
+ return false;
637
+ }
638
+ }
639
+ return true;
640
+ };
641
+
642
+ var equal = function (a1, a2) {
643
+ return a1.length === a2.length && forall(a1, function (x, i) {
644
+ return x === a2[i];
645
+ });
646
+ };
647
+
648
+ var slice = Array.prototype.slice;
649
+ var reverse = function (xs) {
650
+ var r = slice.call(xs, 0);
651
+ r.reverse();
652
+ return r;
653
+ };
654
+
655
+ var difference = function (a1, a2) {
656
+ return filter(a1, function (x) {
657
+ return !contains(a2, x);
658
+ });
659
+ };
660
+
661
+ var mapToObject = function(xs, f) {
662
+ var r = {};
663
+ for (var i = 0, len = xs.length; i < len; i++) {
664
+ var x = xs[i];
665
+ r[String(x)] = f(x, i);
666
+ }
667
+ return r;
668
+ };
669
+
670
+ var pure = function(x) {
671
+ return [x];
672
+ };
673
+
674
+ var sort = function (xs, comparator) {
675
+ var copy = slice.call(xs, 0);
676
+ copy.sort(comparator);
677
+ return copy;
678
+ };
679
+
680
+ var head = function (xs) {
681
+ return xs.length === 0 ? Option.none() : Option.some(xs[0]);
682
+ };
683
+
684
+ var last = function (xs) {
685
+ return xs.length === 0 ? Option.none() : Option.some(xs[xs.length - 1]);
686
+ };
687
+
688
+ return {
689
+ map: map,
690
+ each: each,
691
+ eachr: eachr,
692
+ partition: partition,
693
+ filter: filter,
694
+ groupBy: groupBy,
695
+ indexOf: indexOf,
696
+ foldr: foldr,
697
+ foldl: foldl,
698
+ find: find,
699
+ findIndex: findIndex,
700
+ flatten: flatten,
701
+ bind: bind,
702
+ forall: forall,
703
+ exists: exists,
704
+ contains: contains,
705
+ equal: equal,
706
+ reverse: reverse,
707
+ chunk: chunk,
708
+ difference: difference,
709
+ mapToObject: mapToObject,
710
+ pure: pure,
711
+ sort: sort,
712
+ range: range,
713
+ head: head,
714
+ last: last
715
+ };
716
+ }
717
+ );
718
+ /**
719
+ * ResolveGlobal.js
720
+ *
721
+ * Released under LGPL License.
722
+ * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
723
+ *
724
+ * License: http://www.tinymce.com/license
725
+ * Contributing: http://www.tinymce.com/contributing
726
+ */
727
+
728
+ define(
729
+ 'tinymce.core.util.I18n',
730
+ [
731
+ 'global!tinymce.util.Tools.resolve'
732
+ ],
733
+ function (resolve) {
734
+ return resolve('tinymce.util.I18n');
735
+ }
736
+ );
737
+
738
+ /**
739
+ * ResolveGlobal.js
740
+ *
741
+ * Released under LGPL License.
742
+ * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
743
+ *
744
+ * License: http://www.tinymce.com/license
745
+ * Contributing: http://www.tinymce.com/contributing
746
+ */
747
+
748
+ define(
749
+ 'tinymce.core.Env',
750
+ [
751
+ 'global!tinymce.util.Tools.resolve'
752
+ ],
753
+ function (resolve) {
754
+ return resolve('tinymce.Env');
755
+ }
756
+ );
757
+
758
+ /**
759
+ * KeyboardShortcuts.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.help.data.KeyboardShortcuts',
770
+ [
771
+ 'tinymce.core.Env'
772
+ ],
773
+ function (Env) {
774
+ var meta = Env.mac ? '\u2318' : 'Ctrl';
775
+ var access = Env.mac ? 'Ctrl + Alt' : 'Shift + Alt';
776
+
777
+ var shortcuts = [
778
+ { shortcut: meta + ' + B', action: 'Bold' },
779
+ { shortcut: meta + ' + I', action: 'Italic' },
780
+ { shortcut: meta + ' + U', action: 'Underline' },
781
+ { shortcut: meta + ' + A', action: 'Select all' },
782
+ { shortcut: meta + ' + Y or ' + meta + ' + Shift + Z', action: 'Redo' },
783
+ { shortcut: meta + ' + Z', action: 'Undo' },
784
+ { shortcut: access + ' + 1', action: 'Header 1' },
785
+ { shortcut: access + ' + 2', action: 'Header 2' },
786
+ { shortcut: access + ' + 3', action: 'Header 3' },
787
+ { shortcut: access + ' + 4', action: 'Header 4' },
788
+ { shortcut: access + ' + 5', action: 'Header 5' },
789
+ { shortcut: access + ' + 6', action: 'Header 6' },
790
+ { shortcut: access + ' + 7', action: 'Paragraph' },
791
+ { shortcut: access + ' + 8', action: 'Div' },
792
+ { shortcut: access + ' + 9', action: 'Address' },
793
+ { shortcut: 'Alt + F9', action: 'Focus to menubar' },
794
+ { shortcut: 'Alt + F10', action: 'Focus to toolbar' },
795
+ { shortcut: 'Alt + F11', action: 'Focus to element path' },
796
+ {
797
+ shortcut: 'Ctrl + Shift + P > Ctrl + Shift + P',
798
+ action: 'Focus to contextual toolbar'
799
+ },
800
+ { shortcut: meta + ' + K', action: 'Insert link (if link plugin activated)' },
801
+ { shortcut: meta + ' + S', action: 'Save (if save plugin activated)' },
802
+ { shortcut: meta + ' + F', action: 'Find (if searchreplace plugin activated)' }
803
+ ];
804
+
805
+ return {
806
+ shortcuts: shortcuts
807
+ };
808
+ });
809
+
810
+ /**
811
+ * KeyboardShortcutsTab.js
812
+ *
813
+ * Released under LGPL License.
814
+ * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
815
+ *
816
+ * License: http://www.tinymce.com/license
817
+ * Contributing: http://www.tinymce.com/contributing
818
+ */
819
+
820
+ define(
821
+ 'tinymce.plugins.help.ui.KeyboardShortcutsTab',
822
+ [
823
+ 'ephox.katamari.api.Arr',
824
+ 'tinymce.core.util.I18n',
825
+ 'tinymce.plugins.help.data.KeyboardShortcuts'
826
+ ],
827
+ function (Arr, I18n, KeyboardShortcuts) {
828
+ var makeTab = function () {
829
+ var makeAriaLabel = function (shortcut) {
830
+ return 'aria-label="Action: ' + shortcut.action + ', Shortcut: ' + shortcut.shortcut.replace(/Ctrl/g, 'Control') + '"';
831
+ };
832
+ var shortcutLisString = Arr.map(KeyboardShortcuts.shortcuts, function (shortcut) {
833
+ return '<tr data-mce-tabstop="1" tabindex="-1" ' + makeAriaLabel(shortcut) + '>' +
834
+ '<td>' + I18n.translate(shortcut.action) + '</td>' +
835
+ '<td>' + shortcut.shortcut + '</td>' +
836
+ '</tr>';
837
+ }).join('');
838
+
839
+ return {
840
+ title: 'Handy Shortcuts',
841
+ type: 'container',
842
+ style: 'overflow-y: auto; overflow-x: hidden; max-height: 250px',
843
+ items: [
844
+ {
845
+ type: 'container',
846
+ html: '<div>' +
847
+ '<table class="mce-table-striped">' +
848
+ '<thead>' +
849
+ '<th>' + I18n.translate('Action') + '</th>' +
850
+ '<th>' + I18n.translate('Shortcut') + '</th>' +
851
+ '</thead>' +
852
+ shortcutLisString +
853
+ '</table>' +
854
+ '</div>'
855
+ }
856
+ ]
857
+ };
858
+ };
859
+
860
+ return {
861
+ makeTab: makeTab
862
+ };
863
+ });
864
+
865
+ define(
866
+ 'ephox.katamari.api.Obj',
867
+
868
+ [
869
+ 'ephox.katamari.api.Option',
870
+ 'global!Object'
871
+ ],
872
+
873
+ function (Option, Object) {
874
+ // There are many variations of Object iteration that are faster than the 'for-in' style:
875
+ // http://jsperf.com/object-keys-iteration/107
876
+ //
877
+ // Use the native keys if it is available (IE9+), otherwise fall back to manually filtering
878
+ var keys = (function () {
879
+ var fastKeys = Object.keys;
880
+
881
+ // This technically means that 'each' and 'find' on IE8 iterate through the object twice.
882
+ // This code doesn't run on IE8 much, so it's an acceptable tradeoff.
883
+ // If it becomes a problem we can always duplicate the feature detection inside each and find as well.
884
+ var slowKeys = function (o) {
885
+ var r = [];
886
+ for (var i in o) {
887
+ if (o.hasOwnProperty(i)) {
888
+ r.push(i);
889
+ }
890
+ }
891
+ return r;
892
+ };
893
+
894
+ return fastKeys === undefined ? slowKeys : fastKeys;
895
+ })();
896
+
897
+
898
+ var each = function (obj, f) {
899
+ var props = keys(obj);
900
+ for (var k = 0, len = props.length; k < len; k++) {
901
+ var i = props[k];
902
+ var x = obj[i];
903
+ f(x, i, obj);
904
+ }
905
+ };
906
+
907
+ /** objectMap :: (JsObj(k, v), (v, k, JsObj(k, v) -> x)) -> JsObj(k, x) */
908
+ var objectMap = function (obj, f) {
909
+ return tupleMap(obj, function (x, i, obj) {
910
+ return {
911
+ k: i,
912
+ v: f(x, i, obj)
913
+ };
914
+ });
915
+ };
916
+
917
+ /** tupleMap :: (JsObj(k, v), (v, k, JsObj(k, v) -> { k: x, v: y })) -> JsObj(x, y) */
918
+ var tupleMap = function (obj, f) {
919
+ var r = {};
920
+ each(obj, function (x, i) {
921
+ var tuple = f(x, i, obj);
922
+ r[tuple.k] = tuple.v;
923
+ });
924
+ return r;
925
+ };
926
+
927
+ /** bifilter :: (JsObj(k, v), (v, k -> Bool)) -> { t: JsObj(k, v), f: JsObj(k, v) } */
928
+ var bifilter = function (obj, pred) {
929
+ var t = {};
930
+ var f = {};
931
+ each(obj, function(x, i) {
932
+ var branch = pred(x, i) ? t : f;
933
+ branch[i] = x;
934
+ });
935
+ return {
936
+ t: t,
937
+ f: f
938
+ };
939
+ };
940
+
941
+ /** mapToArray :: (JsObj(k, v), (v, k -> a)) -> [a] */
942
+ var mapToArray = function (obj, f) {
943
+ var r = [];
944
+ each(obj, function(value, name) {
945
+ r.push(f(value, name));
946
+ });
947
+ return r;
948
+ };
949
+
950
+ /** find :: (JsObj(k, v), (v, k, JsObj(k, v) -> Bool)) -> Option v */
951
+ var find = function (obj, pred) {
952
+ var props = keys(obj);
953
+ for (var k = 0, len = props.length; k < len; k++) {
954
+ var i = props[k];
955
+ var x = obj[i];
956
+ if (pred(x, i, obj)) {
957
+ return Option.some(x);
958
+ }
959
+ }
960
+ return Option.none();
961
+ };
962
+
963
+ /** values :: JsObj(k, v) -> [v] */
964
+ var values = function (obj) {
965
+ return mapToArray(obj, function (v) {
966
+ return v;
967
+ });
968
+ };
969
+
970
+ var size = function (obj) {
971
+ return values(obj).length;
972
+ };
973
+
974
+ return {
975
+ bifilter: bifilter,
976
+ each: each,
977
+ map: objectMap,
978
+ mapToArray: mapToArray,
979
+ tupleMap: tupleMap,
980
+ find: find,
981
+ keys: keys,
982
+ values: values,
983
+ size: size
984
+ };
985
+ }
986
+ );
987
+ define(
988
+ 'ephox.katamari.str.StrAppend',
989
+
990
+ [
991
+
992
+ ],
993
+
994
+ function () {
995
+ var addToStart = function (str, prefix) {
996
+ return prefix + str;
997
+ };
998
+
999
+ var addToEnd = function (str, suffix) {
1000
+ return str + suffix;
1001
+ };
1002
+
1003
+ var removeFromStart = function (str, numChars) {
1004
+ return str.substring(numChars);
1005
+ };
1006
+
1007
+ var removeFromEnd = function (str, numChars) {
1008
+ return str.substring(0, str.length - numChars);
1009
+ };
1010
+
1011
+ return {
1012
+ addToStart: addToStart,
1013
+ addToEnd: addToEnd,
1014
+ removeFromStart: removeFromStart,
1015
+ removeFromEnd: removeFromEnd
1016
+ };
1017
+ }
1018
+ );
1019
+ define(
1020
+ 'ephox.katamari.str.StringParts',
1021
+
1022
+ [
1023
+ 'ephox.katamari.api.Option',
1024
+ 'global!Error'
1025
+ ],
1026
+
1027
+ function (Option, Error) {
1028
+ /** Return the first 'count' letters from 'str'.
1029
+ - * e.g. first("abcde", 2) === "ab"
1030
+ - */
1031
+ var first = function(str, count) {
1032
+ return str.substr(0, count);
1033
+ };
1034
+
1035
+ /** Return the last 'count' letters from 'str'.
1036
+ * e.g. last("abcde", 2) === "de"
1037
+ */
1038
+ var last = function(str, count) {
1039
+ return str.substr(str.length - count, str.length);
1040
+ };
1041
+
1042
+ var head = function(str) {
1043
+ return str === '' ? Option.none() : Option.some(str.substr(0, 1));
1044
+ };
1045
+
1046
+ var tail = function(str) {
1047
+ return str === '' ? Option.none() : Option.some(str.substring(1));
1048
+ };
1049
+
1050
+ return {
1051
+ first: first,
1052
+ last: last,
1053
+ head: head,
1054
+ tail: tail
1055
+ };
1056
+ }
1057
+ );
1058
+ define(
1059
+ 'ephox.katamari.api.Strings',
1060
+
1061
+ [
1062
+ 'ephox.katamari.str.StrAppend',
1063
+ 'ephox.katamari.str.StringParts',
1064
+ 'global!Error'
1065
+ ],
1066
+
1067
+ function (StrAppend, StringParts, Error) {
1068
+ var checkRange = function(str, substr, start) {
1069
+ if (substr === '') return true;
1070
+ if (str.length < substr.length) return false;
1071
+ var x = str.substr(start, start + substr.length);
1072
+ return x === substr;
1073
+ };
1074
+
1075
+ /** Given a string and object, perform template-replacements on the string, as specified by the object.
1076
+ * Any template fields of the form ${name} are replaced by the string or number specified as obj["name"]
1077
+ * Based on Douglas Crockford's 'supplant' method for template-replace of strings. Uses different template format.
1078
+ */
1079
+ var supplant = function(str, obj) {
1080
+ var isStringOrNumber = function(a) {
1081
+ var t = typeof a;
1082
+ return t === 'string' || t === 'number';
1083
+ };
1084
+
1085
+ return str.replace(/\${([^{}]*)}/g,
1086
+ function (a, b) {
1087
+ var value = obj[b];
1088
+ return isStringOrNumber(value) ? value : a;
1089
+ }
1090
+ );
1091
+ };
1092
+
1093
+ var removeLeading = function (str, prefix) {
1094
+ return startsWith(str, prefix) ? StrAppend.removeFromStart(str, prefix.length) : str;
1095
+ };
1096
+
1097
+ var removeTrailing = function (str, prefix) {
1098
+ return endsWith(str, prefix) ? StrAppend.removeFromEnd(str, prefix.length) : str;
1099
+ };
1100
+
1101
+ var ensureLeading = function (str, prefix) {
1102
+ return startsWith(str, prefix) ? str : StrAppend.addToStart(str, prefix);
1103
+ };
1104
+
1105
+ var ensureTrailing = function (str, prefix) {
1106
+ return endsWith(str, prefix) ? str : StrAppend.addToEnd(str, prefix);
1107
+ };
1108
+
1109
+ var contains = function(str, substr) {
1110
+ return str.indexOf(substr) !== -1;
1111
+ };
1112
+
1113
+ var capitalize = function(str) {
1114
+ return StringParts.head(str).bind(function (head) {
1115
+ return StringParts.tail(str).map(function (tail) {
1116
+ return head.toUpperCase() + tail;
1117
+ });
1118
+ }).getOr(str);
1119
+ };
1120
+
1121
+ /** Does 'str' start with 'prefix'?
1122
+ * Note: all strings start with the empty string.
1123
+ * More formally, for all strings x, startsWith(x, "").
1124
+ * This is so that for all strings x and y, startsWith(y + x, y)
1125
+ */
1126
+ var startsWith = function(str, prefix) {
1127
+ return checkRange(str, prefix, 0);
1128
+ };
1129
+
1130
+ /** Does 'str' end with 'suffix'?
1131
+ * Note: all strings end with the empty string.
1132
+ * More formally, for all strings x, endsWith(x, "").
1133
+ * This is so that for all strings x and y, endsWith(x + y, y)
1134
+ */
1135
+ var endsWith = function(str, suffix) {
1136
+ return checkRange(str, suffix, str.length - suffix.length);
1137
+ };
1138
+
1139
+
1140
+ /** removes all leading and trailing spaces */
1141
+ var trim = function(str) {
1142
+ return str.replace(/^\s+|\s+$/g, '');
1143
+ };
1144
+
1145
+ var lTrim = function(str) {
1146
+ return str.replace(/^\s+/g, '');
1147
+ };
1148
+
1149
+ var rTrim = function(str) {
1150
+ return str.replace(/\s+$/g, '');
1151
+ };
1152
+
1153
+ return {
1154
+ supplant: supplant,
1155
+ startsWith: startsWith,
1156
+ removeLeading: removeLeading,
1157
+ removeTrailing: removeTrailing,
1158
+ ensureLeading: ensureLeading,
1159
+ ensureTrailing: ensureTrailing,
1160
+ endsWith: endsWith,
1161
+ contains: contains,
1162
+ trim: trim,
1163
+ lTrim: lTrim,
1164
+ rTrim: rTrim,
1165
+ capitalize: capitalize
1166
+ };
1167
+ }
1168
+ );
1169
+
1170
+ /**
1171
+ * PluginUrls.js
1172
+ *
1173
+ * Released under LGPL License.
1174
+ * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
1175
+ *
1176
+ * License: http://www.tinymce.com/license
1177
+ * Contributing: http://www.tinymce.com/contributing
1178
+ */
1179
+
1180
+ define(
1181
+ 'tinymce.plugins.help.data.PluginUrls',
1182
+ [
1183
+ ],
1184
+ function () {
1185
+ var urls = [
1186
+ { key: 'advlist', name: 'Advanced List' },
1187
+ { key: 'anchor', name: 'Anchor' },
1188
+ { key: 'autolink', name: 'Autolink' },
1189
+ { key: 'autoresize', name: 'Autoresize' },
1190
+ { key: 'autosave', name: 'Autosave' },
1191
+ { key: 'bbcode', name: 'BBCode' },
1192
+ { key: 'charmap', name: 'Character Map' },
1193
+ { key: 'code', name: 'Code' },
1194
+ { key: 'codesample', name: 'Code Sample' },
1195
+ { key: 'colorpicker', name: 'Color Picker' },
1196
+ { key: 'compat3x', name: '3.x Compatibility' },
1197
+ { key: 'contextmenu', name: 'Context Menu' },
1198
+ { key: 'directionality', name: 'Directionality' },
1199
+ { key: 'emoticons', name: 'Emoticons' },
1200
+ { key: 'fullpage', name: 'Full Page' },
1201
+ { key: 'fullscreen', name: 'Full Screen' },
1202
+ { key: 'help', name: 'Help' },
1203
+ { key: 'hr', name: 'Horizontal Rule' },
1204
+ { key: 'image', name: 'Image' },
1205
+ { key: 'imagetools', name: 'Image Tools' },
1206
+ { key: 'importcss', name: 'Import CSS' },
1207
+ { key: 'insertdatetime', name: 'Insert Date/Time' },
1208
+ { key: 'legacyoutput', name: 'Legacy Output' },
1209
+ { key: 'link', name: 'Link' },
1210
+ { key: 'lists', name: 'Lists' },
1211
+ { key: 'media', name: 'Media' },
1212
+ { key: 'nonbreaking', name: 'Nonbreaking' },
1213
+ { key: 'noneditable', name: 'Noneditable' },
1214
+ { key: 'pagebreak', name: 'Page Break' },
1215
+ { key: 'paste', name: 'Paste' },
1216
+ { key: 'preview', name: 'Preview' },
1217
+ { key: 'print', name: 'Print' },
1218
+ { key: 'save', name: 'Save' },
1219
+ { key: 'searchreplace', name: 'Search and Replace' },
1220
+ { key: 'spellchecker', name: 'Spell Checker' },
1221
+ { key: 'tabfocus', name: 'Tab Focus' },
1222
+ { key: 'table', name: 'Table' },
1223
+ { key: 'template', name: 'Template' },
1224
+ { key: 'textcolor', name: 'Text Color' },
1225
+ { key: 'textpattern', name: 'Text Pattern' },
1226
+ { key: 'toc', name: 'Table of Contents' },
1227
+ { key: 'visualblocks', name: 'Visual Blocks' },
1228
+ { key: 'visualchars', name: 'Visual Characters' },
1229
+ { key: 'wordcount', name: 'Word Count' }
1230
+ ];
1231
+
1232
+ return {
1233
+ urls: urls
1234
+ };
1235
+ });
1236
+
1237
+ /**
1238
+ * PluginsTab.js
1239
+ *
1240
+ * Released under LGPL License.
1241
+ * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
1242
+ *
1243
+ * License: http://www.tinymce.com/license
1244
+ * Contributing: http://www.tinymce.com/contributing
1245
+ */
1246
+
1247
+ define(
1248
+ 'tinymce.plugins.help.ui.PluginsTab',
1249
+ [
1250
+ 'ephox.katamari.api.Arr',
1251
+ 'ephox.katamari.api.Fun',
1252
+ 'ephox.katamari.api.Obj',
1253
+ 'ephox.katamari.api.Strings',
1254
+ 'tinymce.core.EditorManager',
1255
+ 'tinymce.core.util.I18n',
1256
+ 'tinymce.plugins.help.data.PluginUrls'
1257
+ ],
1258
+ function (Arr, Fun, Obj, Strings, tinymce, I18n, PluginUrls) {
1259
+ var makeLink = Fun.curry(Strings.supplant, '<a href="${url}" target="_blank" rel="noopener">${name}</a>');
1260
+
1261
+ var maybeUrlize = function (editor, key) {
1262
+ return Arr.find(PluginUrls.urls, function (x) {
1263
+ return x.key === key;
1264
+ }).fold(function () {
1265
+ var getMetadata = editor.plugins[key].getMetadata;
1266
+ return typeof getMetadata === 'function' ? makeLink(getMetadata()) : key;
1267
+ }, function (x) {
1268
+ return makeLink({ name: x.name, url: 'https://www.tinymce.com/docs/plugins/' + x.key });
1269
+ });
1270
+ };
1271
+
1272
+ var getPluginKeys = function (editor) {
1273
+ var keys = Obj.keys(editor.plugins);
1274
+ return editor.settings.forced_plugins === undefined ?
1275
+ keys :
1276
+ Arr.filter(keys, Fun.not(Fun.curry(Arr.contains, editor.settings.forced_plugins)));
1277
+ };
1278
+
1279
+ var pluginLister = function (editor) {
1280
+ var pluginKeys = getPluginKeys(editor);
1281
+ var pluginLis = Arr.map(pluginKeys, function (key) {
1282
+ return '<li>' + maybeUrlize(editor, key) + '</li>';
1283
+ });
1284
+ var count = pluginLis.length;
1285
+ var pluginsString = pluginLis.join('');
1286
+
1287
+ return '<p><b>' + I18n.translate(['Plugins installed ({0}):', count ]) + '</b></p>' +
1288
+ '<ul>' + pluginsString + '</ul>';
1289
+ };
1290
+
1291
+ var installedPlugins = function (editor) {
1292
+ return {
1293
+ type: 'container',
1294
+ html: '<div style="overflow-y: auto; overflow-x: hidden; max-height: 230px; height: 230px;" data-mce-tabstop="1" tabindex="-1">' +
1295
+ pluginLister(editor) +
1296
+ '</div>',
1297
+ flex: 1
1298
+ };
1299
+ };
1300
+
1301
+ var availablePlugins = function () {
1302
+ return {
1303
+ type: 'container',
1304
+ html: '<div style="padding: 10px; background: #e3e7f4; height: 100%;" data-mce-tabstop="1" tabindex="-1">' +
1305
+ '<p><b>' + I18n.translate('Premium plugins:') + '</b></p>' +
1306
+ '<ul>' +
1307
+ '<li>PowerPaste</li>' +
1308
+ '<li>Spell Checker Pro</li>' +
1309
+ '<li>Accessibility Checker</li>' +
1310
+ '<li>Advanced Code Editor</li>' +
1311
+ '<li>Enhanced Media Embed</li>' +
1312
+ '<li>Link Checker</li>' +
1313
+ '</ul><br />' +
1314
+ '<p style="float: right;"><a href="https://www.tinymce.com/pricing/?utm_campaign=editor_referral&utm_medium=help_dialog&utm_source=tinymce" target="_blank">' + I18n.translate('Learn more...') + '</a></p>' +
1315
+ '</div>',
1316
+ flex: 1
1317
+ };
1318
+ };
1319
+
1320
+ var makeTab = function (editor) {
1321
+ return {
1322
+ title: 'Plugins',
1323
+ type: 'container',
1324
+ style: 'overflow-y: auto; overflow-x: hidden;',
1325
+ layout: 'flex',
1326
+ padding: 10,
1327
+ spacing: 10,
1328
+ items: [
1329
+ installedPlugins(editor),
1330
+ availablePlugins()
1331
+ ]
1332
+ };
1333
+ };
1334
+
1335
+ return {
1336
+ makeTab: makeTab
1337
+ };
1338
+ }
1339
+ );
1340
+
1341
+ /**
1342
+ * ButtonsRow.js
1343
+ *
1344
+ * Released under LGPL License.
1345
+ * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
1346
+ *
1347
+ * License: http://www.tinymce.com/license
1348
+ * Contributing: http://www.tinymce.com/contributing
1349
+ */
1350
+
1351
+ define(
1352
+ 'tinymce.plugins.help.ui.ButtonsRow',
1353
+ [
1354
+ 'tinymce.core.EditorManager',
1355
+ 'tinymce.core.util.I18n'
1356
+ ],
1357
+ function (EditorManager, I18n) {
1358
+ var getVersion = function (major, minor) {
1359
+ return major.indexOf('@') === 0 ? 'X.X.X' : major + '.' + minor;
1360
+ };
1361
+
1362
+ var makeRow = function () {
1363
+ var version = getVersion(EditorManager.majorVersion, EditorManager.minorVersion);
1364
+ var changeLogLink = '<a href="https://www.tinymce.com/docs/changelog/?utm_campaign=editor_referral&utm_medium=help_dialog&utm_source=tinymce" target="_blank">TinyMCE ' + version + '</a>';
1365
+
1366
+ return [
1367
+ {
1368
+ type: 'label',
1369
+ html: I18n.translate(['You are using {0}', changeLogLink])
1370
+ },
1371
+ {
1372
+ type: 'spacer',
1373
+ flex: 1
1374
+ },
1375
+ {
1376
+ text: 'Close',
1377
+ onclick: function () {
1378
+ this.parent().parent().close();
1379
+ }
1380
+ }
1381
+ ];
1382
+ };
1383
+
1384
+ return {
1385
+ makeRow: makeRow
1386
+ };
1387
+ }
1388
+ );
1389
+
1390
+ /**
1391
+ * Dialog.js
1392
+ *
1393
+ * Released under LGPL License.
1394
+ * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
1395
+ *
1396
+ * License: http://www.tinymce.com/license
1397
+ * Contributing: http://www.tinymce.com/contributing
1398
+ */
1399
+
1400
+ define(
1401
+ 'tinymce.plugins.help.ui.Dialog',
1402
+ [
1403
+ 'tinymce.core.EditorManager',
1404
+ 'tinymce.plugins.help.ui.KeyboardShortcutsTab',
1405
+ 'tinymce.plugins.help.ui.PluginsTab',
1406
+ 'tinymce.plugins.help.ui.ButtonsRow'
1407
+ ],
1408
+ function (EditorManager, KeyboardShortcutsTab, PluginsTab, ButtonsRow) {
1409
+ var open = function (editor, pluginUrl) {
1410
+ return function () {
1411
+ editor.windowManager.open({
1412
+ title: 'Help',
1413
+ bodyType: 'tabpanel',
1414
+ layout: 'flex',
1415
+ body: [
1416
+ KeyboardShortcutsTab.makeTab(),
1417
+ PluginsTab.makeTab(editor, pluginUrl)
1418
+ ],
1419
+ buttons: ButtonsRow.makeRow(),
1420
+ onPostRender: function () {
1421
+ var title = this.getEl('title');
1422
+ title.innerHTML = '<img src="' + pluginUrl + '/img/logo.png" alt="TinyMCE Logo" style="display: inline-block; width: 200px; height: 50px">';
1423
+ }
1424
+ });
1425
+ };
1426
+ };
1427
+
1428
+ return {
1429
+ open: open
1430
+ };
1431
+ });
1432
+
1433
+ /**
1434
+ * Commands.js
1435
+ *
1436
+ * Released under LGPL License.
1437
+ * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
1438
+ *
1439
+ * License: http://www.tinymce.com/license
1440
+ * Contributing: http://www.tinymce.com/contributing
1441
+ */
1442
+
1443
+ define(
1444
+ 'tinymce.plugins.help.api.Commands',
1445
+ [
1446
+ 'tinymce.plugins.help.ui.Dialog'
1447
+ ],
1448
+ function (Dialog) {
1449
+ var register = function (editor, pluginUrl) {
1450
+ editor.addCommand('mceHelp', Dialog.open(editor, pluginUrl));
1451
+ };
1452
+
1453
+ return {
1454
+ register: register
1455
+ };
1456
+ }
1457
+ );
1458
+
1459
+
1460
+
1461
+ /**
1462
+ * Buttons.js
1463
+ *
1464
+ * Released under LGPL License.
1465
+ * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
1466
+ *
1467
+ * License: http://www.tinymce.com/license
1468
+ * Contributing: http://www.tinymce.com/contributing
1469
+ */
1470
+
1471
+ define(
1472
+ 'tinymce.plugins.help.ui.Buttons',
1473
+ [
1474
+ 'tinymce.plugins.help.ui.Dialog'
1475
+ ],
1476
+ function (Dialog) {
1477
+ var register = function (editor, pluginUrl) {
1478
+ editor.addButton('help', {
1479
+ icon: 'help',
1480
+ onclick: Dialog.open(editor, pluginUrl)
1481
+ });
1482
+
1483
+ editor.addMenuItem('Help', {
1484
+ text: 'Help',
1485
+ icon: 'help',
1486
+ context: 'help',
1487
+ onclick: Dialog.open(editor, pluginUrl)
1488
+ });
1489
+ };
1490
+
1491
+ return {
1492
+ register: register
1493
+ };
1494
+ }
1495
+ );
1496
+
1497
+ /**
1498
+ * PLugin.js
1499
+ *
1500
+ * Released under LGPL License.
1501
+ * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
1502
+ *
1503
+ * License: http://www.tinymce.com/license
1504
+ * Contributing: http://www.tinymce.com/contributing
1505
+ */
1506
+
1507
+ define(
1508
+ 'tinymce.plugins.help.Plugin',
1509
+ [
1510
+ 'tinymce.core.PluginManager',
1511
+ 'tinymce.plugins.help.api.Commands',
1512
+ 'tinymce.plugins.help.ui.Buttons',
1513
+ 'tinymce.plugins.help.ui.Dialog'
1514
+ ],
1515
+ function (PluginManager, Commands, Buttons, Dialog) {
1516
+ PluginManager.add('help', function (editor, pluginUrl) {
1517
+ Buttons.register(editor, pluginUrl);
1518
+ Commands.register(editor, pluginUrl);
1519
+ editor.shortcuts.add('Alt+0', 'Open help dialog', 'mceHelp');
1520
+ });
1521
+
1522
+ return function () {};
1523
+ }
1524
+ );
1525
+
1526
+ dem('tinymce.plugins.help.Plugin')();
1527
+ })();