initial commit
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -0,0 +1,7 @@
|
||||
/*!
|
||||
* froala_editor v2.7.3 (https://www.froala.com/wysiwyg-editor)
|
||||
* License https://froala.com/wysiwyg-editor/terms/
|
||||
* Copyright 2014-2017 Froala Labs
|
||||
*/
|
||||
|
||||
!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=function(b,c){return void 0===c&&(c="undefined"!=typeof window?require("jquery"):require("jquery")(b)),a(c)}:a(window.jQuery)}(function(a){if(a.extend(a.FE.DEFAULTS,{aviaryKey:"542e1ff5d5144b9b81cef846574ba6cf",aviaryScriptURL:"https://dme0ih8comzn4.cloudfront.net/imaging/v3/editor.js",aviaryOptions:{displayImageSize:!0,theme:"minimum"}}),a.FE.PLUGINS.imageAviary=function(b){function c(a,b){var c=document.createElement("script");c.type="text/javascript",c.defer="defer",c.src=a,c.innerText="",c.onload=b,document.getElementsByTagName("head")[0].appendChild(c)}function d(){b.shared.feather_editor||(b.shared.feather_editor=!0,"undefined"==typeof Aviary?c(b.opts.aviaryScriptURL,e):e())}function e(){b.shared.feather_editor=new Aviary.Feather(a.extend({apiKey:b.opts.aviaryKey,onSave:function(c,d){var e=new Image;e.crossOrigin="Anonymous",e.onload=function(){var c=document.createElement("CANVAS"),d=c.getContext("2d");c.height=this.height,c.width=this.width,d.drawImage(this,0,0);for(var e=c.toDataURL("image/png"),f=atob(e.split(",")[1]),g=[],h=0;h<f.length;h++)g.push(f.charCodeAt(h));var i=new Blob([new Uint8Array(g)],{type:"image/png"});b.shared.feather_editor.instance.image.edit(a(b.shared.feather_editor.current_image)),b.shared.feather_editor.instance.image.upload([i]),b.shared.feather_editor.close()},e.src=d,b.shared.feather_editor.showWaitIndicator()},onError:function(a){throw new Error(a.message)},onClose:function(){b.shared.feather_editor.instance.image.get()||b.shared.feather_editor.instance.image.edit(a(b.shared.feather_editor.current_image))}},b.opts.aviaryOptions))}function f(a){"object"==typeof a.shared.feather_editor&&(a.shared.feather_editor.current_image=a.image.get()[0],a.shared.feather_editor.instance=a,a.shared.feather_editor.launch({image:a.image.get()[0],url:a.image.get()[0].src}))}return{_init:d,launch:f}},a.FE.DefineIcon("aviary",{NAME:"sliders"}),a.FE.RegisterCommand("aviary",{title:"Advanced Edit",undo:!1,focus:!1,callback:function(a,b){this.imageAviary.launch(this)},plugin:"imageAviary"}),!a.FE.PLUGINS.image)throw new Error("Image Aviary plugin requires image plugin.");a.FE.DEFAULTS.imageEditButtons.push("aviary")});
|
||||
@@ -0,0 +1,7 @@
|
||||
/*!
|
||||
* froala_editor v2.7.3 (https://www.froala.com/wysiwyg-editor)
|
||||
* License https://froala.com/wysiwyg-editor/terms/
|
||||
* Copyright 2014-2017 Froala Labs
|
||||
*/
|
||||
|
||||
!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=function(b,c){return void 0===c&&(c="undefined"!=typeof window?require("jquery"):require("jquery")(b)),a(c)}:a(window.jQuery)}(function(a){a.FE.DEFAULT_SCAYT_OPTIONS={enableOnTouchDevices:!1,disableOptionsStorage:["all"],localization:"en",extraModules:"ui",DefaultSelection:"American English",spellcheckLang:"en_US",contextMenuSections:"suggest|moresuggest",serviceProtocol:"https",servicePort:"80",serviceHost:"svc.webspellchecker.net",servicePath:"spellcheck/script/ssrv.cgi",contextMenuForMisspelledOnly:!0,scriptPath:"https://svc.webspellchecker.net/spellcheck31/lf/scayt3/customscayt/customscayt.js"},a.extend(a.FE.DEFAULTS,{scaytAutoload:!1,scaytCustomerId:"1:tLBmI3-7rr3J1-GMEFA1-mIewo-hynTZ1-PV38I1-uEXCy2-Rn81L-gXuG4-NUNri4-5q9Q34-Jd",scaytOptions:{}}),a.FE.PLUGINS.spellChecker=function(b){function c(a){if(l){var c=!l.isDisabled();a.toggleClass("fr-active",c).attr("aria-pressed",c),b.$el.attr("spellcheck",b.opts.spellcheck&&!c)}}function d(a){l&&!l.isDisabled()&&(["bold","italic","underline","strikeThrough","subscript","superscript","fontFamily","fontSize"].indexOf(a)>=0&&l.removeMarkupInSelectionNode({removeInside:!0}),"html"==a&&g())}function e(a){l&&!l.isDisabled()&&["bold","italic","underline","strikeThrough","subscript","superscript","fontFamily","fontSize"].indexOf(a)>=0&&l.reloadMarkup()}function f(b){if(l&&!l.isDisabled()){var c=b.which;c==a.FE.KEYCODE.ENTER&&setTimeout(l.reloadMarkup,0)}}function g(){l&&l.setDisabled(!l.isDisabled())}function h(a){if(a&&a.getAttribute&&a.getAttribute("data-scayt-word"))a.outerHTML=a.innerHTML;else if(a&&a.nodeType==Node.ELEMENT_NODE)for(var b=a.querySelectorAll("[data-scayt-word]"),c=0;c<b.length;c++)b[c].outerHTML=b[c].innerHTML}function i(){b.events.on("commands.before",d),b.events.on("commands.after",e),b.events.on("keydown",f,!0),b.events.on("html.processGet",h),c(b.$tb.find('[data-cmd="spellChecker"]'))}function j(){var a=b.opts.scaytOptions;a.customerId=b.opts.scaytCustomerId,a.container=b.$iframe?b.$iframe.get(0):b.$el.get(0),a.autoStartup=b.opts.scaytAutoload,a.onLoad=i,null!==b.opts.language&&(b.opts.spellCheckerLanguage=b.opts.language),b.opts.scaytAutoload===!0&&(b.opts.spellcheck=!1),l=new SCAYT.CUSTOMSCAYT(a)}function k(){if(!b.$wp)return!1;if(b.opts.scaytOptions=a.extend({},a.FE.DEFAULT_SCAYT_OPTIONS,b.opts.scaytOptions),"undefined"!=typeof SCAYT)j();else if(b.shared.spellCheckerLoaded||(b.shared.spellCheckerCallbacks=[]),b.shared.spellCheckerCallbacks.push(j),!b.shared.spellCheckerLoaded){b.shared.spellCheckerLoaded=!0;var c=document.createElement("script");c.type="text/javascript",c.src=b.opts.scaytOptions.scriptPath,c.innerText="",c.onload=function(){for(var a=0;a<b.shared.spellCheckerCallbacks.length;a++)b.shared.spellCheckerCallbacks[a]()},document.getElementsByTagName("head")[0].appendChild(c)}}var l;return{_init:k,refresh:c,toggle:g}},a.FE.DefineIcon("spellChecker",{NAME:"keyboard-o"}),a.FE.RegisterCommand("spellChecker",{title:"Spell Checker",undo:!1,focus:!1,accessibilityFocus:!0,forcedRefresh:!0,toggle:!0,callback:function(){this.spellChecker.toggle()},refresh:function(a){this.spellChecker.refresh(a)},plugin:"spellChecker"})});
|
||||
Reference in New Issue
Block a user