first commit
This commit is contained in:
No files matched your search
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,7 @@
|
||||
/*!
|
||||
* froala_editor v2.9.0 (https://www.froala.com/wysiwyg-editor)
|
||||
* License https://froala.com/wysiwyg-editor/terms/
|
||||
* Copyright 2014-2018 Froala Labs
|
||||
*/
|
||||
|
||||
!function(r){"function"==typeof define&&define.amd?define(["jquery"],r):"object"==typeof module&&module.exports?module.exports=function(e,t){return t===undefined&&(t="undefined"!=typeof window?require("jquery"):require("jquery")(e)),r(t)}:r(window.jQuery)}(function(s){if(s.extend(s.FE.DEFAULTS,{aviaryKey:"542e1ff5d5144b9b81cef846574ba6cf",aviaryScriptURL:"https://dme0ih8comzn4.cloudfront.net/imaging/v3/editor.js",aviaryOptions:{displayImageSize:!0,theme:"minimum"}}),s.FE.PLUGINS.imageAviary=function(d){function i(){d.shared.feather_editor=new Aviary.Feather(s.extend({apiKey:d.opts.aviaryKey,onSave:function(e,t){var r=new Image;r.crossOrigin="Anonymous",r.onload=function(){var e=document.createElement("CANVAS"),t=e.getContext("2d");e.height=this.height,e.width=this.width,t.drawImage(this,0,0);for(var r=e.toDataURL("image/png"),i=atob(r.split(",")[1]),a=[],n=0;n<i.length;n++)a.push(i.charCodeAt(n));var o=new Blob([new Uint8Array(a)],{type:"image/png"});d.shared.feather_editor.instance.image.edit(s(d.shared.feather_editor.current_image)),d.shared.feather_editor.instance.image.upload([o]),d.shared.feather_editor.close()},r.src=t,d.shared.feather_editor.showWaitIndicator()},onError:function(e){throw new Error(e.message)},onClose:function(){d.shared.feather_editor.instance.image.get()||d.shared.feather_editor.instance.image.edit(s(d.shared.feather_editor.current_image))}},d.opts.aviaryOptions))}return{_init:function(){var e,t,r;d.shared.feather_editor||(d.shared.feather_editor=!0,"undefined"==typeof Aviary?(e=d.opts.aviaryScriptURL,t=i,(r=document.createElement("script")).type="text/javascript",r.defer="defer",r.src=e,r.innerText="",r.onload=t,document.getElementsByTagName("head")[0].appendChild(r)):i())},launch:function(e){"object"==typeof e.shared.feather_editor&&(e.shared.feather_editor.current_image=e.image.get()[0],(e.shared.feather_editor.instance=e).shared.feather_editor.launch({image:e.image.get()[0],url:e.image.get()[0].src}))}}},s.FE.DefineIcon("aviary",{NAME:"sliders",FA5NAME:"sliders-h"}),s.FE.RegisterCommand("aviary",{title:"Advanced Edit",undo:!1,focus:!1,callback:function(e,t){this.imageAviary.launch(this)},plugin:"imageAviary"}),!s.FE.PLUGINS.image)throw new Error("Image Aviary plugin requires image plugin.")});
|
||||
@@ -0,0 +1,7 @@
|
||||
/*!
|
||||
* froala_editor v2.9.0 (https://www.froala.com/wysiwyg-editor)
|
||||
* License https://froala.com/wysiwyg-editor/terms/
|
||||
* Copyright 2014-2018 Froala Labs
|
||||
*/
|
||||
|
||||
!function(i){"function"==typeof define&&define.amd?define(["jquery"],i):"object"==typeof module&&module.exports?module.exports=function(e,t){return t===undefined&&(t="undefined"!=typeof window?require("jquery"):require("jquery")(e)),i(t)}:i(window.jQuery)}(function(s){if(s.extend(s.FE.DEFAULTS,{imageTUIOptions:{includeUI:{theme:{"menu.normalIcon.path":"https://cdn.jsdelivr.net/npm/[email protected]/dist/svg/icon-d.svg","menu.activeIcon.path":"https://cdn.jsdelivr.net/npm/[email protected]/dist/svg/icon-b.svg","menu.disabledIcon.path":"https://cdn.jsdelivr.net/npm/[email protected]/dist/svg/icon-a.svg","menu.hoverIcon.path":"https://cdn.jsdelivr.net/npm/[email protected]/dist/svg/icon-c.svg","submenu.normalIcon.path":"https://cdn.jsdelivr.net/npm/[email protected]/dist/svg/icon-d.svg","submenu.normalIcon.name":"icon-d","submenu.activeIcon.path":"https://cdn.jsdelivr.net/npm/[email protected]/dist/svg/icon-c.svg","submenu.activeIcon.name":"icon-c"},initMenu:"filter",menuBarPosition:"left"}},tui:window.tui}),s.FE.PLUGINS.imageTUI=function(u){function c(e){s("#tuieditor").remove(),e.style.display="none"}return{_init:function(){var e=u.o_doc.body,t=u.o_doc.createElement("div");t.setAttribute("id","tuiContainer"),t.style.cssText="position: fixed; top: 0;left: 0;margin: 0;padding: 0;width: 100%;height: 100%;background: rgba(0,0,0,.5);z-index: 9998;display:none",e.appendChild(t)},launch:function(t){if("object"==typeof u.opts.tui){u.o_doc.body;var e=u.o_doc.createElement("div");e.setAttribute("id","tuieditor");var i=u.o_doc.getElementById("tuiContainer");i.appendChild(e),i.style.display="block";var n=t.image.get(),o=u.opts.imageTUIOptions;o.includeUI.loadImage={path:n[0].src,name:" "};var d=new u.opts.tui.ImageEditor(u.o_doc.querySelector("#tuieditor"),o),a=u.o_doc.getElementById("tuieditor");a.style.minHeight="590px",a.style.width="94%",a.style.height="94%",a.style.margin="auto",s(".tui-image-editor-header-buttons").html('<button class="tui-editor-cancel-btn" data-cmd="cancel_tui_image">Cancel</button> <button class="tui-editor-save-btn">Save</button>'),s(".tui-editor-cancel-btn").click(function(e){c(i)}),s(".tui-editor-save-btn").click(function(e){!function(e,t,i){for(var n=e.toDataURL(),o=atob(n.split(",")[1]),d=[],a=0;a<o.length;a++)d.push(o.charCodeAt(a));var u=new Blob([new Uint8Array(d)],{type:"image/png"});t.image.edit(s(i)),t.image.upload([u])}(d,t,n),c(i)})}}}},s.FE.DefineIcon("imageTUI",{NAME:"sliders",FA5NAME:"sliders-h"}),s.FE.RegisterCommand("imageTUI",{title:"Advanced Edit",undo:!1,focus:!1,callback:function(e,t){this.imageTUI.launch(this)},plugin:"imageTUI"}),!s.FE.PLUGINS.image)throw new Error("TUI image editor plugin requires image plugin.");s.FE.DEFAULTS.imageEditButtons.push("imageTUI")});
|
||||
@@ -0,0 +1,7 @@
|
||||
/*!
|
||||
* froala_editor v2.9.0 (https://www.froala.com/wysiwyg-editor)
|
||||
* License https://froala.com/wysiwyg-editor/terms/
|
||||
* Copyright 2014-2018 Froala Labs
|
||||
*/
|
||||
|
||||
!function(s){"function"==typeof define&&define.amd?define(["jquery"],s):"object"==typeof module&&module.exports?module.exports=function(e,t){return t===undefined&&(t="undefined"!=typeof window?require("jquery"):require("jquery")(e)),s(t)}:s(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/wscbundle/wscbundle.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(s){var l;function e(e){if(l&&l.isDisabled){var t=!l.isDisabled();e.toggleClass("fr-active",t).attr("aria-pressed",t),s.$el.attr("spellcheck",s.opts.spellcheck&&!t)}}function t(e){l&&l.isDisabled&&!l.isDisabled()&&0<=["bold","italic","underline","strikeThrough","subscript","superscript","fontFamily","fontSize","html"].indexOf(e)&&l.removeMarkupInSelectionNode({removeInside:!0})}function n(e){l&&l.isDisabled&&!l.isDisabled()&&0<=["bold","italic","underline","strikeThrough","subscript","superscript","fontFamily","fontSize","html"].indexOf(e)&&l.reloadMarkup()}function o(e){l&&l.isDisabled&&!l.isDisabled()&&(e.which==a.FE.KEYCODE.ENTER&&setTimeout(l.reloadMarkup,0))}function r(e){if(e&&e.getAttribute&&e.getAttribute("data-scayt-word"))e.outerHTML=e.innerHTML;else if(e&&e.nodeType==Node.ELEMENT_NODE)for(var t=e.querySelectorAll("[data-scayt-word], [data-spelling-word]"),s=0;s<t.length;s++)t[s].outerHTML=t[s].innerHTML}function i(){s.events.on("commands.before",t),s.events.on("commands.after",n),s.events.on("keydown",o,!0),s.events.on("html.processGet",r),e(s.$tb.find('[data-cmd="spellChecker"]'))}function c(){var e=s.opts.scaytOptions;e.customerId=s.opts.scaytCustomerId,e.container=s.$iframe?s.$iframe.get(0):s.$el.get(0),e.autoStartup=s.opts.scaytAutoload,e.onLoad=i,null!==s.opts.language&&(s.opts.spellCheckerLanguage=s.opts.language),!0===s.opts.scaytAutoload&&(s.opts.spellcheck=!1),l=new SCAYT.CUSTOMSCAYT(e)}return{_init:function(){if(!s.$wp)return!1;if(s.opts.scaytOptions=a.extend({},a.FE.DEFAULT_SCAYT_OPTIONS,s.opts.scaytOptions),"undefined"!=typeof SCAYT)c();else if(s.shared.spellCheckerLoaded||(s.shared.spellCheckerCallbacks=[]),s.shared.spellCheckerCallbacks.push(c),!s.shared.spellCheckerLoaded){s.shared.spellCheckerLoaded=!0;var e=document.createElement("script");e.type="text/javascript",e.src=s.opts.scaytOptions.scriptPath,e.innerText="",e.onload=function(){for(var e=0;e<s.shared.spellCheckerCallbacks.length;e++)s.shared.spellCheckerCallbacks[e]()},document.getElementsByTagName("head")[0].appendChild(e)}},refresh:e,toggle:function(){l&&l.isDisabled&&l.setDisabled(!l.isDisabled())}}},a.FE.DefineIcon("spellChecker",{NAME:"keyboard-o",FA5NAME:"keyboard"}),a.FE.RegisterCommand("spellChecker",{title:"Spell Checker",undo:!1,focus:!1,accessibilityFocus:!0,forcedRefresh:!0,toggle:!0,callback:function(){this.spellChecker.toggle()},refresh:function(e){this.spellChecker.refresh(e)},plugin:"spellChecker"})});
|
||||
Reference in New Issue
Block a user