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})};h("8",tinymce.util.Tools.resolve),g("1",["8"],function(a){return a("tinymce.PluginManager")}),g("f",["8"],function(a){return a("tinymce.Env")}),g("b",["8"],function(a){return a("tinymce.util.Tools")}),g("g",[],function(){var a=function(a){return a.getParam("media_scripts")},b=function(a){return a.getParam("audio_template_callback")},c=function(a){return a.getParam("video_template_callback")},d=function(a){return a.getParam("media_live_embeds",!0)},e=function(a){return a.getParam("media_filter_html",!0)},f=function(a){return a.getParam("media_url_resolver")},g=function(a){return a.getParam("media_alt_source",!0)},h=function(a){return a.getParam("media_poster",!0)},i=function(a){return a.getParam("media_dimensions",!0)};return{getScripts:a,getAudioTemplateCallback:b,getVideoTemplateCallback:c,hasLiveEmbeds:d,shouldFilterHtml:e,getUrlResolver:f,hasAltSource:g,hasPoster:h,hasDimensions:i}}),g("l",["8"],function(a){return a("tinymce.html.SaxParser")}),g("m",["8"],function(a){return a("tinymce.html.Schema")}),g("n",["8"],function(a){return a("tinymce.dom.DOMUtils")}),g("p",[],function(){var a=function(a,b){if(a)for(var c=0;c<a.length;c++)if(b.indexOf(a[c].filter)!==-1)return a[c]};return{getVideoScriptMatch:a}}),g("j",[],function(){var a=function(a){return a.replace(/px$/,"")},b=function(a){return/^[0-9.]+$/.test(a)?a+"px":a},c=function(b){return function(c){return c?a(c.style[b]):""}},d=function(a){return function(c,d){c&&(c.style[a]=b(d))}};return{getMaxWidth:c("maxWidth"),getMaxHeight:c("maxHeight"),setMaxWidth:d("maxWidth"),setMaxHeight:d("maxHeight")}}),g("h",["b","l","m","n","p","j"],function(a,b,c,d,e,f){var g=d.DOM,h=function(a){return g.getAttrib(a,"data-ephox-embed-iri")},i=function(a){var b=g.createFragment(a);return""!==h(b.firstChild)},j=function(c,d){var f={};return new b({validate:!1,allow_conditional_comments:!0,special:"script,noscript",start:function(b,d){if(f.source1||"param"!==b||(f.source1=d.map.movie),"iframe"!==b&&"object"!==b&&"embed"!==b&&"video"!==b&&"audio"!==b||(f.type||(f.type=b),f=a.extend(d.map,f)),"script"===b){var g=e.getVideoScriptMatch(c,d.map.src);if(!g)return;f={type:"script",source1:d.map.src,width:g.width,height:g.height}}"source"===b&&(f.source1?f.source2||(f.source2=d.map.src):f.source1=d.map.src),"img"!==b||f.poster||(f.poster=d.map.src)}}).parse(d),f.source1=f.source1||f.src||f.data,f.source2=f.source2||"",f.poster=f.poster||"",f},k=function(a){var b=g.createFragment(a),c=b.firstChild;return{type:"ephox-embed-iri",source1:h(c),source2:"",poster:"",width:f.getMaxWidth(c),height:f.getMaxHeight(c)}},l=function(a,b){return i(b)?k(b):j(a,b)};return{htmlToData:l}}),g("q",["8"],function(a){return a("tinymce.util.Promise")}),g("s",[],function(){var a=function(a){var b={mp3:"audio/mpeg",wav:"audio/wav",mp4:"video/mp4",webm:"video/webm",ogg:"video/ogg",swf:"application/x-shockwave-flash"},c=a.toLowerCase().split(".").pop(),d=b[c];return d?d:""};return{guess:a}}),g("k",["8"],function(a){return a("tinymce.html.Writer")}),g("e",["k","l","m","n","j"],function(a,b,c,d,e){var f=d.DOM,g=function(a,b){var c,d,e,f;for(c in b)if(e=""+b[c],a.map[c])for(d=a.length;d--;)f=a[d],f.name===c&&(e?(a.map[c]=e,f.value=e):(delete a.map[c],a.splice(d,1)));else e&&(a.push({name:c,value:e}),a.map[c]=e)},h=function(c){var d=new a,e=new b(d);return e.parse(c),d.getContent()},i=function(d,e,f){var h,i=new a,j=0;return new b({validate:!1,allow_conditional_comments:!0,special:"script,noscript",comment:function(a){i.comment(a)},cdata:function(a){i.cdata(a)},text:function(a,b){i.text(a,b)},start:function(a,b,c){switch(a){case"video":case"object":case"embed":case"img":case"iframe":void 0!==e.height&&void 0!==e.width&&g(b,{width:e.width,height:e.height})}if(f)switch(a){case"video":g(b,{poster:e.poster,src:""}),e.source2&&g(b,{src:""});break;case"iframe":g(b,{src:e.source1});break;case"source":if(j++,j<=2&&(g(b,{src:e["source"+j],type:e["source"+j+"mime"]}),!e["source"+j]))return;break;case"img":if(!e.poster)return;h=!0}i.start(a,b,c)},end:function(a){if("video"===a&&f)for(var b=1;b<=2;b++)if(e["source"+b]){var c=[];c.map={},j<b&&(g(c,{src:e["source"+b],type:e["source"+b+"mime"]}),i.start("source",c,!0))}if(e.poster&&"object"===a&&f&&!h){var d=[];d.map={},g(d,{src:e.poster,width:e.width,height:e.height}),i.start("img",d,!0)}i.end(a)}},new c({})).parse(d),i.getContent()},j=function(a){var b=f.createFragment(a);return""!==f.getAttrib(b.firstChild,"data-ephox-embed-iri")},k=function(a,b){var c=f.createFragment(a),d=c.firstChild;return e.setMaxWidth(d,b.width),e.setMaxHeight(d,b.height),h(d.outerHTML)},l=function(a,b,c){return j(a)?k(a,b):i(a,b,c)};return{updateHtml:l}}),g("t",[],function(){var a=[{regex:/youtu\.be\/([\w\-.]+)/,type:"iframe",w:560,h:314,url:"//www.youtube.com/embed/$1",allowFullscreen:!0},{regex:/youtube\.com(.+)v=([^&]+)/,type:"iframe",w:560,h:314,url:"//www.youtube.com/embed/$2",allowFullscreen:!0},{regex:/youtube.com\/embed\/([a-z0-9\-_]+(?:\?.+)?)/i,type:"iframe",w:560,h:314,url:"//www.youtube.com/embed/$1",allowFullscreen:!0},{regex:/vimeo\.com\/([0-9]+)/,type:"iframe",w:425,h:350,url:"//player.vimeo.com/video/$1?title=0&byline=0&portrait=0&color=8dc7dc",allowfullscreen:!0},{regex:/vimeo\.com\/(.*)\/([0-9]+)/,type:"iframe",w:425,h:350,url:"//player.vimeo.com/video/$2?title=0&byline=0",allowfullscreen:!0},{regex:/maps\.google\.([a-z]{2,3})\/maps\/(.+)msid=(.+)/,type:"iframe",w:425,h:350,url:'//maps.google.com/maps/ms?msid=$2&output=embed"',allowFullscreen:!1},{regex:/dailymotion\.com\/video\/([^_]+)/,type:"iframe",w:480,h:270,url:"//www.dailymotion.com/embed/video/$1",allowFullscreen:!0},{regex:/dai\.ly\/([^_]+)/,type:"iframe",w:480,h:270,url:"//www.dailymotion.com/embed/video/$1",allowFullscreen:!0}];return{urlPatterns:a}}),g("r",["b","g","h","s","e","t","p"],function(a,b,c,d,e,f,g){var h=function(a){var b=a.allowFullscreen?' allowFullscreen="1"':"";return'<iframe src="'+a.source1+'" width="'+a.width+'" height="'+a.height+'"'+b+"></iframe>"},i=function(a){var b='<object data="'+a.source1+'" width="'+a.width+'" height="'+a.height+'" type="application/x-shockwave-flash">';return a.poster&&(b+='<img src="'+a.poster+'" width="'+a.width+'" height="'+a.height+'" />'),b+="</object>"},j=function(a,b){return b?b(a):'<audio controls="controls" src="'+a.source1+'">'+(a.source2?'\n<source src="'+a.source2+'"'+(a.source2mime?' type="'+a.source2mime+'"':"")+" />\n":"")+"</audio>"},k=function(a,b){return b?b(a):'<video width="'+a.width+'" height="'+a.height+'"'+(a.poster?' poster="'+a.poster+'"':"")+' controls="controls">\n<source src="'+a.source1+'"'+(a.source1mime?' type="'+a.source1mime+'"':"")+" />\n"+(a.source2?'<source src="'+a.source2+'"'+(a.source2mime?' type="'+a.source2mime+'"':"")+" />\n":"")+"</video>"},l=function(a){return'<script src="'+a.source1+'"></script>'},m=function(m,n){var o=a.extend({},n);if(!o.source1&&(a.extend(o,c.htmlToData(b.getScripts(m),o.embed)),!o.source1))return"";if(o.source2||(o.source2=""),o.poster||(o.poster=""),o.source1=m.convertURL(o.source1,"source"),o.source2=m.convertURL(o.source2,"source"),o.source1mime=d.guess(o.source1),o.source2mime=d.guess(o.source2),o.poster=m.convertURL(o.poster,"poster"),a.each(f.urlPatterns,function(a){var b,c,d=a.regex.exec(o.source1);if(d){for(c=a.url,b=0;d[b];b++)c=c.replace("$"+b,function(){return d[b]});o.source1=c,o.type=a.type,o.allowFullscreen=a.allowFullscreen,o.width=o.width||a.w,o.height=o.height||a.h}}),o.embed)return e.updateHtml(o.embed,o,!0);var p=g.getVideoScriptMatch(b.getScripts(m),o.source1);p&&(o.type="script",o.width=p.width,o.height=p.height);var q=b.getAudioTemplateCallback(m),r=b.getVideoTemplateCallback(m);return o.width=o.width||300,o.height=o.height||150,a.each(o,function(a,b){o[b]=m.dom.encode(a)}),"iframe"===o.type?h(o):"application/x-shockwave-flash"===o.source1mime?i(o):o.source1mime.indexOf("audio")!==-1?j(o,q):"script"===o.type?l(o):k(o,r)};return{dataToHtml:m}}),g("i",["q","g","r"],function(a,b,c){var d={},e=function(b,c,e){return new a(function(a,f){var g=function(e){return e.html&&(d[b.source1]=e),a({url:b.source1,html:e.html?e.html:c(b)})};d[b.source1]?g(d[b.source1]):e({url:b.source1},g,f)})},f=function(b,c){return new a(function(a){a({html:c(b),url:b.source1})})},g=function(a){return function(b){return c.dataToHtml(a,b)}},h=function(a,c){var d=b.getUrlResolver(a);return d?e(c,g(a),d):f(c,g(a))},i=function(a){return d.hasOwnProperty(a)};return{getEmbedHtml:h,isCached:i}}),g("o",[],function(){var a=function(a,b){a.state.set("oldVal",a.value()),b.state.set("oldVal",b.value())},b=function(a,b){var c=a.find("#width")[0],d=a.find("#height")[0],e=a.find("#constrain")[0];c&&d&&e&&b(c,d,e.checked())},c=function(b,c,d){var e=b.state.get("oldVal"),f=c.state.get("oldVal"),g=b.value(),h=c.value();d&&e&&f&&g&&h&&(g!==e?(h=Math.round(g/e*h),isNaN(h)||c.value(h)):(g=Math.round(h/f*g),isNaN(g)||b.value(g))),a(b,c)},d=function(c){b(c,a)},e=function(a){b(a,c)},f=function(a){var b=function(){a(function(a){e(a)})};return{type:"container",label:"Dimensions",layout:"flex",align:"center",spacing:5,items:[{name:"width",type:"textbox",maxLength:5,size:5,onchange:b,ariaLabel:"Width"},{type:"label",text:"x"},{name:"height",type:"textbox",maxLength:5,size:5,onchange:b,ariaLabel:"Height"},{name:"constrain",type:"checkbox",checked:!0,text:"Constrain proportions"}]}};return{createUi:f,syncSize:d,updateSize:e}}),g("9",["f","b","g","h","i","j","e","o"],function(a,b,c,d,e,f,g,h){var i=a.ie&&a.ie<=8?"onChange":"onInput",j=function(a){return function(b){var c=b&&b.msg?"Media embed handler error: "+b.msg:"Media embed handler threw unknown error.";a.notificationManager.open({type:"error",text:c})}},k=function(a){var b=a.selection.getNode(),e=b.getAttribute("data-ephox-embed-iri");return e?{source1:e,"data-ephox-embed-iri":e,width:f.getMaxWidth(b),height:f.getMaxHeight(b)}:b.getAttribute("data-mce-object")?d.htmlToData(c.getScripts(a),a.serializer.serialize(b,{selection:!0})):{}},l=function(a){var b=a.selection.getNode();if(b.getAttribute("data-mce-object")||b.getAttribute("data-ephox-embed-iri"))return a.selection.getContent()},m=function(a,e){return function(f){var g=f.html,i=a.find("#embed")[0],j=b.extend(d.htmlToData(c.getScripts(e),g),{source1:f.url});a.fromJSON(j),i&&(i.value(g),h.updateSize(a))}},n=function(a,b){var c,d,e=a.dom.select("img[data-mce-object]");for(c=0;c<b.length;c++)for(d=e.length-1;d>=0;d--)b[c]===e[d]&&e.splice(d,1);a.selection.select(e[0])},o=function(a,b){var c=a.dom.select("img[data-mce-object]");a.insertContent(b),n(a,c),a.nodeChanged()},p=function(a,b){var c=a.toJSON();c.embed=g.updateHtml(c.embed,c),c.embed&&e.isCached(c.source1)?o(b,c.embed):e.getEmbedHtml(b,c).then(function(a){o(b,a.html)})["catch"](j(b))},q=function(a,c){b.each(c,function(b,c){a.find("#"+c).value(b)})},r=function(a){var f,n,o=[{name:"source1",type:"filepicker",filetype:"media",size:40,autofocus:!0,label:"Source",onpaste:function(){setTimeout(function(){e.getEmbedHtml(a,f.toJSON()).then(m(f,a))["catch"](j(a))},1)},onchange:function(b){e.getEmbedHtml(a,f.toJSON()).then(m(f,a))["catch"](j(a)),q(f,b.meta)},onbeforecall:function(a){a.meta=f.toJSON()}}],r=[],s=function(a){a(f),n=f.toJSON(),f.find("#embed").value(g.updateHtml(n.embed,n))};if(c.hasAltSource(a)&&r.push({name:"source2",type:"filepicker",filetype:"media",size:40,label:"Alternative source"}),c.hasPoster(a)&&r.push({name:"poster",type:"filepicker",filetype:"image",size:40,label:"Poster"}),c.hasDimensions(a)){var t=h.createUi(s);o.push(t)}n=k(a);var u={id:"mcemediasource",type:"textbox",flex:1,name:"embed",value:l(a),multiline:!0,rows:5,label:"Source"},v=function(){n=b.extend({},d.htmlToData(c.getScripts(a),this.value())),this.parent().parent().fromJSON(n)};u[i]=v,f=a.windowManager.open({title:"Insert/edit media",data:n,bodyType:"tabpanel",body:[{title:"General",type:"form",items:o},{title:"Embed",type:"container",layout:"flex",direction:"column",align:"stretch",padding:10,spacing:10,items:[{type:"label",text:"Paste your embed code below:",forId:"mcemediasource"},u]},{title:"Advanced",type:"form",items:r}],onSubmit:function(){h.updateSize(f),p(f,a)}}),h.syncSize(f)};return{showDialog:r}}),g("2",["9"],function(a){var b=function(b){var c=function(){a.showDialog(b)};return{showDialog:c}};return{get:b}}),g("3",["9"],function(a){var b=function(b){var c=function(){a.showDialog(b)};b.addCommand("mceMedia",c)};return{register:b}}),g("a",["8"],function(a){return a("tinymce.html.Node")}),g("d",["l","m","k","b","g"],function(a,b,c,d,e){var f=function(d,f){if(e.shouldFilterHtml(d)===!1)return f;var g,h=new c;return new a({validate:!1,allow_conditional_comments:!1,special:"script,noscript",comment:function(a){h.comment(a)},cdata:function(a){h.cdata(a)},text:function(a,b){h.text(a,b)},start:function(a,b,c){if(g=!0,"script"!==a&&"noscript"!==a){for(var e=0;e<b.length;e++){if(0===b[e].name.indexOf("on"))return;"style"===b[e].name&&(b[e].value=d.dom.serializeStyle(d.dom.parseStyle(b[e].value),a))}h.start(a,b,c),g=!1}},end:function(a){g||h.end(a)}},new b({})).parse(f),h.getContent()};return{sanitize:f}}),g("c",["f","a","g","d","p"],function(a,b,c,d,e){var f=function(c,d){var e,f=d.name;return e=new b("img",1),e.shortEnded=!0,h(c,d,e),e.attr({width:d.attr("width")||"300",height:d.attr("height")||("audio"===f?"30":"150"),style:d.attr("style"),src:a.transparentSrc,"data-mce-object":f,"class":"mce-object mce-object-"+f}),e},g=function(a,c){var d,e,f,g=c.name;return d=new b("span",1),d.attr({contentEditable:"false",style:c.attr("style"),"data-mce-object":g,"class":"mce-preview-object mce-object-"+g}),h(a,c,d),e=new b(g,1),e.attr({src:c.attr("src"),allowfullscreen:c.attr("allowfullscreen"),width:c.attr("width")||"300",height:c.attr("height")||("audio"===g?"30":"150"),frameborder:"0"}),f=new b("span",1),f.attr("class","mce-shim"),d.append(e),d.append(f),d},h=function(a,b,c){var e,f,g,h,i;for(g=b.attributes,h=g.length;h--;)e=g[h].name,f=g[h].value,"width"!==e&&"height"!==e&&"style"!==e&&("data"!==e&&"src"!==e||(f=a.convertURL(f,e)),c.attr("data-mce-p-"+e,f));i=b.firstChild&&b.firstChild.value,i&&(c.attr("data-mce-html",escape(d.sanitize(a,i))),c.firstChild=null)},i=function(a){for(;a=a.parent;)if(a.attr("data-ephox-embed-iri"))return!0;return!1},j=function(b){return function(d){for(var h,j,k=d.length;k--;)h=d[k],h.parent&&(h.parent.attr("data-mce-object")||("script"!==h.name||(j=e.getVideoScriptMatch(c.getScripts(b),h.attr("src"))))&&(j&&(j.width&&h.attr("width",j.width.toString()),j.height&&h.attr("height",j.height.toString())),"iframe"===h.name&&c.hasLiveEmbeds(b)&&a.ceFalse?i(h)||h.replace(g(b,h)):i(h)||h.replace(f(b,h))))}};return{createPreviewIframeNode:g,createPlaceholderNode:f,placeHolderConverter:j}}),g("4",["a","b","c","d"],function(a,b,c,d){var e=function(e){e.on("preInit",function(){var f=e.schema.getSpecialElements();b.each("video audio iframe object".split(" "),function(a){f[a]=new RegExp("</"+a+"[^>]*>","gi")});var g=e.schema.getBoolAttrs();b.each("webkitallowfullscreen mozallowfullscreen allowfullscreen".split(" "),function(a){g[a]={}}),e.parser.addNodeFilter("iframe,video,audio,object,embed,script",c.placeHolderConverter(e)),e.serializer.addAttributeFilter("data-mce-object",function(b,c){for(var f,g,h,i,j,k,l,m,n=b.length;n--;)if(f=b[n],f.parent){for(l=f.attr(c),g=new a(l,1),"audio"!==l&&"script"!==l&&(m=f.attr("class"),m&&m.indexOf("mce-preview-object")!==-1?g.attr({width:f.firstChild.attr("width"),height:f.firstChild.attr("height")}):g.attr({width:f.attr("width"),height:f.attr("height")})),g.attr({style:f.attr("style")}),i=f.attributes,h=i.length;h--;){var o=i[h].name;0===o.indexOf("data-mce-p-")&&g.attr(o.substr(11),i[h].value)}"script"===l&&g.attr("type","text/javascript"),j=f.attr("data-mce-html"),j&&(k=new a("#text",3),k.raw=!0,k.value=d.sanitize(e,unescape(j)),g.append(k)),f.replace(g)}})}),e.on("setContent",function(){e.$("span.mce-preview-object").each(function(a,b){var c=e.$(b);0===c.find("span.mce-shim",b).length&&c.append('<span class="mce-shim"></span>')})})};return{setup:e}}),g("5",[],function(){var a=function(a){a.on("ResolveName",function(a){var b;1===a.target.nodeType&&(b=a.target.getAttribute("data-mce-object"))&&(a.name=b)})};return{setup:a}}),g("6",["e"],function(a){var b=function(b){b.on("click keyup",function(){var a=b.selection.getNode();a&&b.dom.hasClass(a,"mce-preview-object")&&b.dom.getAttrib(a,"data-mce-selected")&&a.setAttribute("data-mce-selected","2")}),b.on("ObjectSelected",function(a){var b=a.target.getAttribute("data-mce-object");"audio"!==b&&"script"!==b||a.preventDefault()}),b.on("objectResized",function(b){var c,d=b.target;d.getAttribute("data-mce-object")&&(c=d.getAttribute("data-mce-html"),c&&(c=unescape(c),d.setAttribute("data-mce-html",escape(a.updateHtml(c,{width:b.width,height:b.height})))))})};return{setup:b}}),g("7",[],function(){var a=function(a){a.addButton("media",{tooltip:"Insert/edit media",cmd:"mceMedia",stateSelector:["img[data-mce-object]","span[data-mce-object]","div[data-ephox-embed-iri]"]}),a.addMenuItem("media",{icon:"media",text:"Media",cmd:"mceMedia",context:"insert",prependToContext:!0})};return{register:a}}),g("0",["1","2","3","4","5","6","7"],function(a,b,c,d,e,f,g){return a.add("media",function(a){return c.register(a),g.register(a),e.setup(a),d.setup(a),f.setup(a),b.get(a)}),function(){}}),d("0")()}();
|
@@ -0,0 +1,313 @@
|
|
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.nonbreaking.Plugin","tinymce.core.PluginManager","tinymce.plugins.nonbreaking.api.Commands","tinymce.plugins.nonbreaking.core.Keyboard","tinymce.plugins.nonbreaking.ui.Buttons","global!tinymce.util.Tools.resolve","tinymce.plugins.nonbreaking.core.Actions","tinymce.plugins.nonbreaking.api.Settings"]
|
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
|
+
* Actions.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.nonbreaking.core.Actions',
|
119
|
+
[
|
120
|
+
],
|
121
|
+
function () {
|
122
|
+
var stringRepeat = function (string, repeats) {
|
123
|
+
var str = '';
|
124
|
+
|
125
|
+
for (var index = 0; index < repeats; index++) {
|
126
|
+
str += string;
|
127
|
+
}
|
128
|
+
|
129
|
+
return str;
|
130
|
+
};
|
131
|
+
|
132
|
+
var isVisualCharsEnabled = function (editor) {
|
133
|
+
return editor.plugins.visualchars ? editor.plugins.visualchars.isEnabled() : false;
|
134
|
+
};
|
135
|
+
|
136
|
+
var insertNbsp = function (editor, times) {
|
137
|
+
var nbsp = isVisualCharsEnabled(editor) ? '<span class="mce-nbsp"> </span>' : ' ';
|
138
|
+
|
139
|
+
editor.insertContent(stringRepeat(nbsp, times));
|
140
|
+
editor.dom.setAttrib(editor.dom.select('span.mce-nbsp'), 'data-mce-bogus', '1');
|
141
|
+
};
|
142
|
+
|
143
|
+
return {
|
144
|
+
insertNbsp: insertNbsp
|
145
|
+
};
|
146
|
+
}
|
147
|
+
);
|
148
|
+
/**
|
149
|
+
* Commands.js
|
150
|
+
*
|
151
|
+
* Released under LGPL License.
|
152
|
+
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
153
|
+
*
|
154
|
+
* License: http://www.tinymce.com/license
|
155
|
+
* Contributing: http://www.tinymce.com/contributing
|
156
|
+
*/
|
157
|
+
|
158
|
+
define(
|
159
|
+
'tinymce.plugins.nonbreaking.api.Commands',
|
160
|
+
[
|
161
|
+
'tinymce.plugins.nonbreaking.core.Actions'
|
162
|
+
],
|
163
|
+
function (Actions) {
|
164
|
+
var register = function (editor) {
|
165
|
+
editor.addCommand('mceNonBreaking', function () {
|
166
|
+
Actions.insertNbsp(editor, 1);
|
167
|
+
});
|
168
|
+
};
|
169
|
+
|
170
|
+
return {
|
171
|
+
register: register
|
172
|
+
};
|
173
|
+
}
|
174
|
+
);
|
175
|
+
/**
|
176
|
+
* Settings.js
|
177
|
+
*
|
178
|
+
* Released under LGPL License.
|
179
|
+
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
180
|
+
*
|
181
|
+
* License: http://www.tinymce.com/license
|
182
|
+
* Contributing: http://www.tinymce.com/contributing
|
183
|
+
*/
|
184
|
+
|
185
|
+
define(
|
186
|
+
'tinymce.plugins.nonbreaking.api.Settings',
|
187
|
+
[
|
188
|
+
],
|
189
|
+
function () {
|
190
|
+
var getKeyboardSpaces = function (editor) {
|
191
|
+
var spaces = editor.getParam('nonbreaking_force_tab', 0);
|
192
|
+
|
193
|
+
if (typeof spaces === 'boolean') {
|
194
|
+
return spaces === true ? 3 : 0;
|
195
|
+
} else {
|
196
|
+
return spaces;
|
197
|
+
}
|
198
|
+
};
|
199
|
+
|
200
|
+
return {
|
201
|
+
getKeyboardSpaces: getKeyboardSpaces
|
202
|
+
};
|
203
|
+
}
|
204
|
+
);
|
205
|
+
|
206
|
+
/**
|
207
|
+
* Keyboard.js
|
208
|
+
*
|
209
|
+
* Released under LGPL License.
|
210
|
+
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
211
|
+
*
|
212
|
+
* License: http://www.tinymce.com/license
|
213
|
+
* Contributing: http://www.tinymce.com/contributing
|
214
|
+
*/
|
215
|
+
|
216
|
+
define(
|
217
|
+
'tinymce.plugins.nonbreaking.core.Keyboard',
|
218
|
+
[
|
219
|
+
'tinymce.plugins.nonbreaking.api.Settings',
|
220
|
+
'tinymce.plugins.nonbreaking.core.Actions'
|
221
|
+
],
|
222
|
+
function (Settings, Actions) {
|
223
|
+
var setup = function (editor) {
|
224
|
+
var spaces = Settings.getKeyboardSpaces(editor);
|
225
|
+
|
226
|
+
if (spaces > 0) {
|
227
|
+
editor.on('keydown', function (e) {
|
228
|
+
if (e.keyCode === 9) {
|
229
|
+
if (e.shiftKey) {
|
230
|
+
return;
|
231
|
+
}
|
232
|
+
|
233
|
+
e.preventDefault();
|
234
|
+
Actions.insertNbsp(editor, spaces);
|
235
|
+
}
|
236
|
+
});
|
237
|
+
}
|
238
|
+
};
|
239
|
+
|
240
|
+
return {
|
241
|
+
setup: setup
|
242
|
+
};
|
243
|
+
}
|
244
|
+
);
|
245
|
+
/**
|
246
|
+
* Buttons.js
|
247
|
+
*
|
248
|
+
* Released under LGPL License.
|
249
|
+
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
250
|
+
*
|
251
|
+
* License: http://www.tinymce.com/license
|
252
|
+
* Contributing: http://www.tinymce.com/contributing
|
253
|
+
*/
|
254
|
+
|
255
|
+
define(
|
256
|
+
'tinymce.plugins.nonbreaking.ui.Buttons',
|
257
|
+
[
|
258
|
+
],
|
259
|
+
function () {
|
260
|
+
var register = function (editor) {
|
261
|
+
editor.addButton('nonbreaking', {
|
262
|
+
title: 'Nonbreaking space',
|
263
|
+
cmd: 'mceNonBreaking'
|
264
|
+
});
|
265
|
+
|
266
|
+
editor.addMenuItem('nonbreaking', {
|
267
|
+
text: 'Nonbreaking space',
|
268
|
+
cmd: 'mceNonBreaking',
|
269
|
+
context: 'insert'
|
270
|
+
});
|
271
|
+
};
|
272
|
+
|
273
|
+
return {
|
274
|
+
register: register
|
275
|
+
};
|
276
|
+
}
|
277
|
+
);
|
278
|
+
/**
|
279
|
+
* Plugin.js
|
280
|
+
*
|
281
|
+
* Released under LGPL License.
|
282
|
+
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
283
|
+
*
|
284
|
+
* License: http://www.tinymce.com/license
|
285
|
+
* Contributing: http://www.tinymce.com/contributing
|
286
|
+
*/
|
287
|
+
|
288
|
+
/**
|
289
|
+
* This class contains all core logic for the nonbreaking plugin.
|
290
|
+
*
|
291
|
+
* @class tinymce.nonbreaking.Plugin
|
292
|
+
* @private
|
293
|
+
*/
|
294
|
+
define(
|
295
|
+
'tinymce.plugins.nonbreaking.Plugin',
|
296
|
+
[
|
297
|
+
'tinymce.core.PluginManager',
|
298
|
+
'tinymce.plugins.nonbreaking.api.Commands',
|
299
|
+
'tinymce.plugins.nonbreaking.core.Keyboard',
|
300
|
+
'tinymce.plugins.nonbreaking.ui.Buttons'
|
301
|
+
],
|
302
|
+
function (PluginManager, Commands, Keyboard, Buttons) {
|
303
|
+
PluginManager.add('nonbreaking', function (editor) {
|
304
|
+
Commands.register(editor);
|
305
|
+
Buttons.register(editor);
|
306
|
+
Keyboard.setup(editor);
|
307
|
+
});
|
308
|
+
|
309
|
+
return function () { };
|
310
|
+
}
|
311
|
+
);
|
312
|
+
dem('tinymce.plugins.nonbreaking.Plugin')();
|
313
|
+
})();
|
@@ -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("5",tinymce.util.Tools.resolve),g("1",["5"],function(a){return a("tinymce.PluginManager")}),g("6",[],function(){var a=function(a,b){for(var c="",d=0;d<b;d++)c+=a;return c},b=function(a){return!!a.plugins.visualchars&&a.plugins.visualchars.isEnabled()},c=function(c,d){var e=b(c)?'<span class="mce-nbsp"> </span>':" ";c.insertContent(a(e,d)),c.dom.setAttrib(c.dom.select("span.mce-nbsp"),"data-mce-bogus","1")};return{insertNbsp:c}}),g("2",["6"],function(a){var b=function(b){b.addCommand("mceNonBreaking",function(){a.insertNbsp(b,1)})};return{register:b}}),g("7",[],function(){var a=function(a){var b=a.getParam("nonbreaking_force_tab",0);return"boolean"==typeof b?b===!0?3:0:b};return{getKeyboardSpaces:a}}),g("3",["7","6"],function(a,b){var c=function(c){var d=a.getKeyboardSpaces(c);d>0&&c.on("keydown",function(a){if(9===a.keyCode){if(a.shiftKey)return;a.preventDefault(),b.insertNbsp(c,d)}})};return{setup:c}}),g("4",[],function(){var a=function(a){a.addButton("nonbreaking",{title:"Nonbreaking space",cmd:"mceNonBreaking"}),a.addMenuItem("nonbreaking",{text:"Nonbreaking space",cmd:"mceNonBreaking",context:"insert"})};return{register:a}}),g("0",["1","2","3","4"],function(a,b,c,d){return a.add("nonbreaking",function(a){b.register(a),d.register(a),c.setup(a)}),function(){}}),d("0")()}();
|
@@ -0,0 +1,316 @@
|
|
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.noneditable.Plugin","tinymce.core.PluginManager","tinymce.plugins.noneditable.core.FilterContent","global!tinymce.util.Tools.resolve","tinymce.core.util.Tools","tinymce.plugins.noneditable.api.Settings"]
|
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
|
+
* Settings.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.noneditable.api.Settings',
|
139
|
+
[
|
140
|
+
],
|
141
|
+
function () {
|
142
|
+
var getNonEditableClass = function (editor) {
|
143
|
+
return editor.getParam('noneditable_noneditable_class', 'mceNonEditable');
|
144
|
+
};
|
145
|
+
|
146
|
+
var getEditableClass = function (editor) {
|
147
|
+
return editor.getParam('noneditable_editable_class', 'mceEditable');
|
148
|
+
};
|
149
|
+
|
150
|
+
var getNonEditableRegExps = function (editor) {
|
151
|
+
var nonEditableRegExps = editor.getParam('noneditable_regexp', []);
|
152
|
+
|
153
|
+
if (nonEditableRegExps && nonEditableRegExps.constructor === RegExp) {
|
154
|
+
return [nonEditableRegExps];
|
155
|
+
} else {
|
156
|
+
return nonEditableRegExps;
|
157
|
+
}
|
158
|
+
};
|
159
|
+
|
160
|
+
return {
|
161
|
+
getNonEditableClass: getNonEditableClass,
|
162
|
+
getEditableClass: getEditableClass,
|
163
|
+
getNonEditableRegExps: getNonEditableRegExps
|
164
|
+
};
|
165
|
+
}
|
166
|
+
);
|
167
|
+
/**
|
168
|
+
* FilterContent.js
|
169
|
+
*
|
170
|
+
* Released under LGPL License.
|
171
|
+
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
172
|
+
*
|
173
|
+
* License: http://www.tinymce.com/license
|
174
|
+
* Contributing: http://www.tinymce.com/contributing
|
175
|
+
*/
|
176
|
+
|
177
|
+
define(
|
178
|
+
'tinymce.plugins.noneditable.core.FilterContent',
|
179
|
+
[
|
180
|
+
'tinymce.core.util.Tools',
|
181
|
+
'tinymce.plugins.noneditable.api.Settings'
|
182
|
+
],
|
183
|
+
function (Tools, Settings) {
|
184
|
+
var hasClass = function (checkClassName) {
|
185
|
+
return function (node) {
|
186
|
+
return (' ' + node.attr('class') + ' ').indexOf(checkClassName) !== -1;
|
187
|
+
};
|
188
|
+
};
|
189
|
+
|
190
|
+
var replaceMatchWithSpan = function (editor, content, cls) {
|
191
|
+
return function (match) {
|
192
|
+
var args = arguments, index = args[args.length - 2];
|
193
|
+
var prevChar = index > 0 ? content.charAt(index - 1) : '';
|
194
|
+
|
195
|
+
// Is value inside an attribute then don't replace
|
196
|
+
if (prevChar === '"') {
|
197
|
+
return match;
|
198
|
+
}
|
199
|
+
|
200
|
+
// Is value inside a contentEditable='false' tag
|
201
|
+
if (prevChar === '>') {
|
202
|
+
var findStartTagIndex = content.lastIndexOf('<', index);
|
203
|
+
if (findStartTagIndex !== -1) {
|
204
|
+
var tagHtml = content.substring(findStartTagIndex, index);
|
205
|
+
if (tagHtml.indexOf('contenteditable="false"') !== -1) {
|
206
|
+
return match;
|
207
|
+
}
|
208
|
+
}
|
209
|
+
}
|
210
|
+
|
211
|
+
return (
|
212
|
+
'<span class="' + cls + '" data-mce-content="' + editor.dom.encode(args[0]) + '">' +
|
213
|
+
editor.dom.encode(typeof args[1] === 'string' ? args[1] : args[0]) + '</span>'
|
214
|
+
);
|
215
|
+
};
|
216
|
+
};
|
217
|
+
|
218
|
+
var convertRegExpsToNonEditable = function (editor, nonEditableRegExps, e) {
|
219
|
+
var i = nonEditableRegExps.length, content = e.content;
|
220
|
+
|
221
|
+
// Don't replace the variables when raw is used for example on undo/redo
|
222
|
+
if (e.format === 'raw') {
|
223
|
+
return;
|
224
|
+
}
|
225
|
+
|
226
|
+
while (i--) {
|
227
|
+
content = content.replace(nonEditableRegExps[i], replaceMatchWithSpan(editor, content, Settings.getNonEditableClass(editor)));
|
228
|
+
}
|
229
|
+
|
230
|
+
e.content = content;
|
231
|
+
};
|
232
|
+
|
233
|
+
var setup = function (editor) {
|
234
|
+
var editClass, nonEditClass, contentEditableAttrName = 'contenteditable';
|
235
|
+
|
236
|
+
editClass = ' ' + Tools.trim(Settings.getEditableClass(editor)) + ' ';
|
237
|
+
nonEditClass = ' ' + Tools.trim(Settings.getNonEditableClass(editor)) + ' ';
|
238
|
+
|
239
|
+
var hasEditClass = hasClass(editClass);
|
240
|
+
var hasNonEditClass = hasClass(nonEditClass);
|
241
|
+
var nonEditableRegExps = Settings.getNonEditableRegExps(editor);
|
242
|
+
|
243
|
+
editor.on('PreInit', function () {
|
244
|
+
if (nonEditableRegExps.length > 0) {
|
245
|
+
editor.on('BeforeSetContent', function (e) {
|
246
|
+
convertRegExpsToNonEditable(editor, nonEditableRegExps, e);
|
247
|
+
});
|
248
|
+
}
|
249
|
+
|
250
|
+
editor.parser.addAttributeFilter('class', function (nodes) {
|
251
|
+
var i = nodes.length, node;
|
252
|
+
|
253
|
+
while (i--) {
|
254
|
+
node = nodes[i];
|
255
|
+
|
256
|
+
if (hasEditClass(node)) {
|
257
|
+
node.attr(contentEditableAttrName, 'true');
|
258
|
+
} else if (hasNonEditClass(node)) {
|
259
|
+
node.attr(contentEditableAttrName, 'false');
|
260
|
+
}
|
261
|
+
}
|
262
|
+
});
|
263
|
+
|
264
|
+
editor.serializer.addAttributeFilter(contentEditableAttrName, function (nodes) {
|
265
|
+
var i = nodes.length, node;
|
266
|
+
|
267
|
+
while (i--) {
|
268
|
+
node = nodes[i];
|
269
|
+
if (!hasEditClass(node) && !hasNonEditClass(node)) {
|
270
|
+
continue;
|
271
|
+
}
|
272
|
+
|
273
|
+
if (nonEditableRegExps.length > 0 && node.attr('data-mce-content')) {
|
274
|
+
node.name = '#text';
|
275
|
+
node.type = 3;
|
276
|
+
node.raw = true;
|
277
|
+
node.value = node.attr('data-mce-content');
|
278
|
+
} else {
|
279
|
+
node.attr(contentEditableAttrName, null);
|
280
|
+
}
|
281
|
+
}
|
282
|
+
});
|
283
|
+
});
|
284
|
+
};
|
285
|
+
|
286
|
+
return {
|
287
|
+
setup: setup
|
288
|
+
};
|
289
|
+
}
|
290
|
+
);
|
291
|
+
/**
|
292
|
+
* Plugin.js
|
293
|
+
*
|
294
|
+
* Released under LGPL License.
|
295
|
+
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
296
|
+
*
|
297
|
+
* License: http://www.tinymce.com/license
|
298
|
+
* Contributing: http://www.tinymce.com/contributing
|
299
|
+
*/
|
300
|
+
|
301
|
+
define(
|
302
|
+
'tinymce.plugins.noneditable.Plugin',
|
303
|
+
[
|
304
|
+
'tinymce.core.PluginManager',
|
305
|
+
'tinymce.plugins.noneditable.core.FilterContent'
|
306
|
+
],
|
307
|
+
function (PluginManager, FilterContent) {
|
308
|
+
PluginManager.add('noneditable', function (editor) {
|
309
|
+
FilterContent.setup(editor);
|
310
|
+
});
|
311
|
+
|
312
|
+
return function () { };
|
313
|
+
}
|
314
|
+
);
|
315
|
+
dem('tinymce.plugins.noneditable.Plugin')();
|
316
|
+
})();
|