',f+='',b.opts.linkText&&(f+='');for(var h in b.opts.linkAttributes)if(b.opts.linkAttributes.hasOwnProperty(h)){var k=b.opts.linkAttributes[h];f+=''}b.opts.linkAlwaysBlank||(f+='
"),d.document.close()}return{run:b}},a.FE.DefineIcon("print",{NAME:"print"}),a.FE.RegisterCommand("print",{title:"Print",undo:!1,focus:!1,plugin:"print",callback:function(){this.print.run()}}),a.extend(a.FE.DEFAULTS,{quickInsertButtons:["image","video","embedly","table","ul","ol","hr"],quickInsertTags:["p","div","h1","h2","h3","h4","h5","h6","pre","blockquote"]}),a.FE.QUICK_INSERT_BUTTONS={},a.FE.DefineIcon("quickInsert",{PATH:'',template:"svg"}),a.FE.RegisterQuickInsertButton=function(b,c){a.FE.QUICK_INSERT_BUTTONS[b]=a.extend({undo:!0},c)},a.FE.RegisterQuickInsertButton("image",{icon:"insertImage",requiredPlugin:"image",title:"Insert Image",undo:!1,callback:function(){var b=this;b.shared.$qi_image_input||(b.shared.$qi_image_input=a(''),a("body:first").append(b.shared.$qi_image_input),b.events.$on(b.shared.$qi_image_input,"change",function(){var b=a(this).data("inst");this.files&&(b.quickInsert.hide(),b.image.upload(this.files)),a(this).val("")},!0)),b.$qi_image_input=b.shared.$qi_image_input,b.helpers.isMobile()&&b.selection.save(),b.$qi_image_input.data("inst",b).trigger("click")}}),a.FE.RegisterQuickInsertButton("video",{icon:"insertVideo",requiredPlugin:"video",title:"Insert Video",undo:!1,callback:function(){var a=prompt(this.language.translate("Paste the URL of the video you want to insert."));a&&this.video.insertByURL(a)}}),a.FE.RegisterQuickInsertButton("embedly",{icon:"embedly",requiredPlugin:"embedly",title:"Embed URL",undo:!1,callback:function(){var a=prompt(this.language.translate("Paste the URL of any web content you want to insert."));a&&this.embedly.add(a)}}),a.FE.RegisterQuickInsertButton("table",{icon:"insertTable",requiredPlugin:"table",title:"Insert Table",callback:function(){this.table.insert(2,2)}}),a.FE.RegisterQuickInsertButton("ol",{icon:"formatOL",requiredPlugin:"lists",title:"Ordered List",callback:function(){this.lists.format("OL")}}),a.FE.RegisterQuickInsertButton("ul",{icon:"formatUL",requiredPlugin:"lists",title:"Unordered List",callback:function(){this.lists.format("UL")}}),a.FE.RegisterQuickInsertButton("hr",{icon:"insertHR",title:"Insert Horizontal Line",callback:function(){this.commands.insertHR()}}),a.FE.PLUGINS.quickInsert=function(b){function c(c){var d,e,f;d=c.offset().top-b.$box.offset().top,e=0-k.outerWidth(),b.opts.enter!=a.FE.ENTER_BR?f=(k.outerHeight()-c.outerHeight())/2:(a(""+a.FE.INVISIBLE_SPACE+"").insertAfter(c),f=(k.outerHeight()-c.next().outerHeight())/2,c.next().remove()),b.opts.iframe&&(d+=b.$iframe.offset().top-b.helpers.scrollTop()),k.hasClass("fr-on")&&d>=0&&l.css("top",d-f),d>=0&&d-f<=b.$box.outerHeight()-c.outerHeight()?(k.hasClass("fr-hidden")&&(k.hasClass("fr-on")&&g(),k.removeClass("fr-hidden")),k.css("top",d-f)):k.hasClass("fr-visible")&&(k.addClass("fr-hidden"),h()),k.css("left",e)}function d(a){k||i(),k.hasClass("fr-on")&&h(),b.$box.append(k),c(a),k.data("tag",a),k.addClass("fr-visible")}function e(){if(b.core.hasFocus()){var c=b.selection.element();if(b.opts.enter==a.FE.ENTER_BR||b.node.isBlock(c)||(c=b.node.blockParent(c)),b.opts.enter==a.FE.ENTER_BR&&!b.node.isBlock(c)){var e=b.node.deepestParent(c);e&&(c=e)}var g=function(){return b.opts.enter!=a.FE.ENTER_BR&&b.node.isEmpty(c)&&b.node.isElement(c.parentNode)&&b.opts.quickInsertTags.indexOf(c.tagName.toLowerCase())>=0},i=function(){return b.opts.enter==a.FE.ENTER_BR&&("BR"==c.tagName&&(!c.previousSibling||"BR"==c.previousSibling.tagName||b.node.isBlock(c.previousSibling))||b.node.isEmpty(c)&&(!c.previousSibling||"BR"==c.previousSibling.tagName||b.node.isBlock(c.previousSibling))&&(!c.nextSibling||"BR"==c.nextSibling.tagName||b.node.isBlock(c.nextSibling)))};c&&(g()||i())?k&&k.data("tag").is(a(c))&&k.hasClass("fr-on")?h():b.selection.isCollapsed()&&d(a(c)):f()}}function f(){k&&(b.html.checkIfEmpty(),k.hasClass("fr-on")&&h(),k.removeClass("fr-visible fr-on"),k.css("left",-9999).css("top",-9999))}function g(c){if(c&&c.preventDefault(),k.hasClass("fr-on")&&!k.hasClass("fr-hidden"))h();else{if(!b.shared.$qi_helper){for(var d=b.opts.quickInsertButtons,e='
',f+='',b.opts.linkText&&(f+='');for(var h in b.opts.linkAttributes)if(b.opts.linkAttributes.hasOwnProperty(h)){var k=b.opts.linkAttributes[h];f+=''}b.opts.linkAlwaysBlank||(f+='
"),d.document.close()}return{run:b}},a.FE.DefineIcon("print",{NAME:"print"}),a.FE.RegisterCommand("print",{title:"Print",undo:!1,
+focus:!1,plugin:"print",callback:function(){this.print.run()}}),a.extend(a.FE.DEFAULTS,{quickInsertButtons:["image","video","embedly","table","ul","ol","hr"],quickInsertTags:["p","div","h1","h2","h3","h4","h5","h6","pre","blockquote"]}),a.FE.QUICK_INSERT_BUTTONS={},a.FE.DefineIcon("quickInsert",{PATH:'',template:"svg"}),a.FE.RegisterQuickInsertButton=function(b,c){a.FE.QUICK_INSERT_BUTTONS[b]=a.extend({undo:!0},c)},a.FE.RegisterQuickInsertButton("image",{icon:"insertImage",requiredPlugin:"image",title:"Insert Image",undo:!1,callback:function(){var b=this;b.shared.$qi_image_input||(b.shared.$qi_image_input=a(''),a("body:first").append(b.shared.$qi_image_input),b.events.$on(b.shared.$qi_image_input,"change",function(){var b=a(this).data("inst");this.files&&(b.quickInsert.hide(),b.image.upload(this.files)),a(this).val("")},!0)),b.$qi_image_input=b.shared.$qi_image_input,b.helpers.isMobile()&&b.selection.save(),b.$qi_image_input.data("inst",b).trigger("click")}}),a.FE.RegisterQuickInsertButton("video",{icon:"insertVideo",requiredPlugin:"video",title:"Insert Video",undo:!1,callback:function(){var a=prompt(this.language.translate("Paste the URL of the video you want to insert."));a&&this.video.insertByURL(a)}}),a.FE.RegisterQuickInsertButton("embedly",{icon:"embedly",requiredPlugin:"embedly",title:"Embed URL",undo:!1,callback:function(){var a=prompt(this.language.translate("Paste the URL of any web content you want to insert."));a&&this.embedly.add(a)}}),a.FE.RegisterQuickInsertButton("table",{icon:"insertTable",requiredPlugin:"table",title:"Insert Table",callback:function(){this.table.insert(2,2)}}),a.FE.RegisterQuickInsertButton("ol",{icon:"formatOL",requiredPlugin:"lists",title:"Ordered List",callback:function(){this.lists.format("OL")}}),a.FE.RegisterQuickInsertButton("ul",{icon:"formatUL",requiredPlugin:"lists",title:"Unordered List",callback:function(){this.lists.format("UL")}}),a.FE.RegisterQuickInsertButton("hr",{icon:"insertHR",title:"Insert Horizontal Line",callback:function(){this.commands.insertHR()}}),a.FE.PLUGINS.quickInsert=function(b){function c(c){var d,e,f;d=c.offset().top-b.$box.offset().top,e=0-k.outerWidth(),b.opts.enter!=a.FE.ENTER_BR?f=(k.outerHeight()-c.outerHeight())/2:(a(""+a.FE.INVISIBLE_SPACE+"").insertAfter(c),f=(k.outerHeight()-c.next().outerHeight())/2,c.next().remove()),b.opts.iframe&&(d+=b.$iframe.offset().top-b.helpers.scrollTop()),k.hasClass("fr-on")&&d>=0&&l.css("top",d-f),d>=0&&d-f<=b.$box.outerHeight()-c.outerHeight()?(k.hasClass("fr-hidden")&&(k.hasClass("fr-on")&&g(),k.removeClass("fr-hidden")),k.css("top",d-f)):k.hasClass("fr-visible")&&(k.addClass("fr-hidden"),h()),k.css("left",e)}function d(a){k||i(),k.hasClass("fr-on")&&h(),b.$box.append(k),c(a),k.data("tag",a),k.addClass("fr-visible")}function e(){if(b.core.hasFocus()){var c=b.selection.element();if(b.opts.enter==a.FE.ENTER_BR||b.node.isBlock(c)||(c=b.node.blockParent(c)),b.opts.enter==a.FE.ENTER_BR&&!b.node.isBlock(c)){var e=b.node.deepestParent(c);e&&(c=e)}var g=function(){return b.opts.enter!=a.FE.ENTER_BR&&b.node.isEmpty(c)&&b.node.isElement(c.parentNode)&&b.opts.quickInsertTags.indexOf(c.tagName.toLowerCase())>=0},i=function(){return b.opts.enter==a.FE.ENTER_BR&&("BR"==c.tagName&&(!c.previousSibling||"BR"==c.previousSibling.tagName||b.node.isBlock(c.previousSibling))||b.node.isEmpty(c)&&(!c.previousSibling||"BR"==c.previousSibling.tagName||b.node.isBlock(c.previousSibling))&&(!c.nextSibling||"BR"==c.nextSibling.tagName||b.node.isBlock(c.nextSibling)))};c&&(g()||i())?k&&k.data("tag").is(a(c))&&k.hasClass("fr-on")?h():b.selection.isCollapsed()&&d(a(c)):f()}}function f(){k&&(b.html.checkIfEmpty(),k.hasClass("fr-on")&&h(),k.removeClass("fr-visible fr-on"),k.css("left",-9999).css("top",-9999))}function g(c){if(c&&c.preventDefault(),k.hasClass("fr-on")&&!k.hasClass("fr-hidden"))h();else{if(!b.shared.$qi_helper){for(var d=b.opts.quickInsertButtons,e='
"},callback:function(a,b){this.image.applyStyle(b)},refreshOnShow:function(b,c){var d=this.image.getEl();d&&c.find(".fr-command").each(function(){var b=a(this).data("param1"),c=d.hasClass(b);a(this).toggleClass("fr-active",c).attr("aria-selected",c)})}}),a.FE.DefineIcon("imageAlt",{NAME:"info"}),a.FE.RegisterCommand("imageAlt",{undo:!1,focus:!1,popup:!0,title:"Alternate Text",callback:function(){this.image.showAltPopup()}}),a.FE.RegisterCommand("imageSetAlt",{undo:!0,focus:!1,title:"Update",refreshAfterCallback:!1,callback:function(){this.image.setAlt()}}),a.FE.DefineIcon("imageSize",{NAME:"arrows-alt"}),a.FE.RegisterCommand("imageSize",{undo:!1,focus:!1,popup:!0,title:"Change Size",callback:function(){this.image.showSizePopup()}}),a.FE.RegisterCommand("imageSetSize",{undo:!0,focus:!1,title:"Update",refreshAfterCallback:!1,callback:function(){this.image.setSize()}}),a.FE.DefineIcon("imageCaption",{NAME:"commenting"}),a.FE.RegisterCommand("imageCaption",{undo:!0,focus:!1,title:"Image Caption",refreshAfterCallback:!0,callback:function(){this.image.toggleCaption()},refresh:function(a){this.image.get()&&a.toggleClass("fr-active",this.image.hasCaption())}})});
\ No newline at end of file