!function(factory){"function"==typeof define&&define.amd?define(["jquery"],factory):"object"==typeof module&&module.exports?module.exports=function(root,jQuery){return void 0===jQuery&&(jQuery="undefined"!=typeof window?require("jquery"):require("jquery")(root)),factory(jQuery),jQuery}:factory(jQuery)}(function($){"use strict";var FroalaEditor=function(element,options){this.opts=$.extend({},FroalaEditor.DEFAULTS,$(element).data(),"object"==typeof options&&options),this.$original_element=$(element),this.$original_element.data("froala.editor",this),this.id=++$.FroalaEditor.ID,this.original_document=element.ownerDocument,this.original_window="defaultView"in this.original_document?this.original_document.defaultView:this.original_document.parentWindow;var c_scroll=$(this.original_window).scrollTop();this.$original_element.on("froala.doInit",$.proxy(function(){this.$original_element.off("froala.doInit"),this.document=this.$el.get(0).ownerDocument,this.window="defaultView"in this.document?this.document.defaultView:this.document.parentWindow,this.$document=$(this.document),this.$window=$(this.window),this.opts.initOnClick?(this.load($.FroalaEditor.MODULES),this.$el.on("mousedown.init dragenter.init focus.init",$.proxy(function(e){if(1===e.which){this.$el.off("mousedown.init dragenter.init focus.init"),this.load($.FroalaEditor.MODULES),this.load($.FroalaEditor.PLUGINS);var target=e.originalEvent&&e.originalEvent.originalTarget;target&&"IMG"==target.tagName&&$(target).trigger("mousedown"),"undefined"==typeof this.ul&&this.destroy(),this.events.trigger("initialized")}},this))):(this.load($.FroalaEditor.MODULES),this.load($.FroalaEditor.PLUGINS),$(this.original_window).scrollTop(c_scroll),"undefined"==typeof this.ul&&this.destroy(),this.events.trigger("initialized"))},this)),this._init()};FroalaEditor.DEFAULTS={initOnClick:!1},FroalaEditor.MODULES={},FroalaEditor.PLUGINS={},FroalaEditor.VERSION="2.0.5",FroalaEditor.INSTANCES=[],FroalaEditor.ID=0,FroalaEditor.prototype._init=function(){var tag_name=this.$original_element.prop("tagName"),initOnDefault=$.proxy(function(){this._original_html=this._original_html||this.$original_element.html(),this.$box=this.$box||this.$original_element,this.opts.fullPage&&(this.opts.iframe=!0),this.opts.iframe?(this.$iframe=$('