/*! * froala_editor v2.9.8 (https://www.froala.com/wysiwyg-editor) * License https://froala.com/wysiwyg-editor/terms/ * Copyright 2014-2020 Froala Labs */ !function(n){"function"==typeof define&&define.amd?define(["jquery"],n):"object"==typeof module&&module.exports?module.exports=function(e,t){return t===undefined&&(t="undefined"!=typeof window?require("jquery"):require("jquery")(e)),n(t)}:n(window.jQuery)}(function(R){var s=function(e,t){this.id=++R.FE.ID;var n={};t&&t.documentReady&&(n.toolbarButtons=["fullscreen","undo","redo","getPDF","print","|","bold","italic","underline","color","clearFormatting","|","alignLeft","alignCenter","alignRight","alignJustify","|","formatOL","formatUL","indent","outdent","-","paragraphFormat","|","fontFamily","|","fontSize","|","insertLink","insertImage","quote"],n.paragraphFormatSelection=!0,n.fontFamilySelection=!0,n.fontSizeSelection=!0,n.placeholderText="Type something",n.quickInsertEnabled=!1,n.charCounterCount=!1),this.opts=R.extend(!0,{},R.extend({},s.DEFAULTS,n,"object"==typeof t&&t));var r=JSON.stringify(this.opts);R.FE.OPTS_MAPPING[r]=R.FE.OPTS_MAPPING[r]||this.id,this.sid=R.FE.OPTS_MAPPING[r],R.FE.SHARED[this.sid]=R.FE.SHARED[this.sid]||{},this.shared=R.FE.SHARED[this.sid],this.shared.count=(this.shared.count||0)+1,this.$oel=R(e),this.$oel.data("froala.editor",this),this.o_doc=e.ownerDocument,this.o_win="defaultView"in this.o_doc?this.o_doc.defaultView:this.o_doc.parentWindow;var o=R(this.o_win).scrollTop();this.$oel.on("froala.doInit",R.proxy(function(){this.$oel.off("froala.doInit"),this.doc=this.$el.get(0).ownerDocument,this.win="defaultView"in this.doc?this.doc.defaultView:this.doc.parentWindow,this.$doc=R(this.doc),this.$win=R(this.win),this.opts.pluginsEnabled||(this.opts.pluginsEnabled=Object.keys(R.FE.PLUGINS)),this.opts.initOnClick?(this.load(R.FE.MODULES),this.$el.on("touchstart.init",function(){R(this).data("touched",!0)}),this.$el.on("touchmove.init",function(){R(this).removeData("touched")}),this.$el.on("mousedown.init touchend.init dragenter.init focus.init",R.proxy(function(e){if("touchend"==e.type&&!this.$el.data("touched"))return!0;if(1===e.which||!e.which){this.$el.off("mousedown.init touchstart.init touchmove.init touchend.init dragenter.init focus.init"),this.load(R.FE.MODULES),this.load(R.FE.PLUGINS);var t=e.originalEvent&&e.originalEvent.originalTarget;t&&"IMG"==t.tagName&&R(t).trigger("mousedown"),"undefined"==typeof this.ul&&this.destroy(),"touchend"==e.type&&this.image&&e.originalEvent&&e.originalEvent.target&&R(e.originalEvent.target).is("img")&&setTimeout(R.proxy(function(){this.image.edit(R(e.originalEvent.target))},this),100),this.ready=!0,this.events.trigger("initialized")}},this)),this.events.trigger("initializationDelayed")):(this.load(R.FE.MODULES),this.load(R.FE.PLUGINS),R(this.o_win).scrollTop(o),"undefined"==typeof this.ul&&this.destroy(),this.ready=!0,this.events.trigger("initialized"))},this)),this._init()};s.DEFAULTS={initOnClick:!1,pluginsEnabled:null},s.MODULES={},s.PLUGINS={},s.VERSION="2.9.8",s.INSTANCES=[],s.OPTS_MAPPING={},s.SHARED={},s.ID=0,s.prototype._init=function(){var e=this.$oel.prop("tagName");this.$oel.closest("label").length;var t=R.proxy(function(){"TEXTAREA"!=e&&(this._original_html=this._original_html||this.$oel.html()),this.$box=this.$box||this.$oel,this.opts.fullPage&&(this.opts.iframe=!0),this.opts.iframe?(this.$iframe=R('