froala-editor
Advanced tools
Comparing version 2.0.3 to 2.0.4-1
{ | ||
"name": "froala-wysiwyg-editor", | ||
"version": "2.0.3", | ||
"version": "2.0.4-1", | ||
"description": "A beautiful jQuery WYSIWYG HTML rich text editor. High performance and modern design make it easy to use for developers and loved by users.", | ||
@@ -5,0 +5,0 @@ "main": [ |
/*! | ||
* froala_editor v2.0.3 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v2.0.4 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2015 Froala Labs |
/*! | ||
* froala_editor v2.0.3 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v2.0.4 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2015 Froala Labs |
/*! | ||
* froala_editor v2.0.3 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v2.0.4 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2015 Froala Labs |
/*! | ||
* froala_editor v2.0.3 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v2.0.4 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2015 Froala Labs |
/*! | ||
* froala_editor v2.0.3 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v2.0.4 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2015 Froala Labs |
/*! | ||
* froala_editor v2.0.3 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v2.0.4 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2015 Froala Labs |
/*! | ||
* froala_editor v2.0.3 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v2.0.4 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2015 Froala Labs |
/*! | ||
* froala_editor v2.0.3 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v2.0.4 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2015 Froala Labs |
/*! | ||
* froala_editor v2.0.3 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v2.0.4 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2015 Froala Labs |
/*! | ||
* froala_editor v2.0.3 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v2.0.4 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2015 Froala Labs |
/*! | ||
* froala_editor v2.0.3 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v2.0.4 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2015 Froala Labs |
/*! | ||
* froala_editor v2.0.3 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v2.0.4 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2015 Froala Labs |
/*! | ||
* froala_editor v2.0.3 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v2.0.4 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2015 Froala Labs |
/*! | ||
* froala_editor v2.0.3 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v2.0.4 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2015 Froala Labs |
/*! | ||
* froala_editor v2.0.3 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v2.0.4 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2015 Froala Labs |
/*! | ||
* froala_editor v2.0.3 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v2.0.4 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2015 Froala Labs |
/*! | ||
* froala_editor v2.0.3 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v2.0.4 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2015 Froala Labs |
/*! | ||
* froala_editor v2.0.3 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v2.0.4 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2015 Froala Labs |
/*! | ||
* froala_editor v2.0.3 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v2.0.4 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2015 Froala Labs |
/*! | ||
* froala_editor v2.0.3 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v2.0.4 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2015 Froala Labs |
/*! | ||
* froala_editor v2.0.3 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v2.0.4 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2015 Froala Labs |
/*! | ||
* froala_editor v2.0.3 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v2.0.4 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2015 Froala Labs |
/*! | ||
* froala_editor v2.0.3 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v2.0.4 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2015 Froala Labs |
/*! | ||
* froala_editor v2.0.3 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v2.0.4 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2015 Froala Labs |
/*! | ||
* froala_editor v2.0.3 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v2.0.4 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2015 Froala Labs |
/*! | ||
* froala_editor v2.0.3 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v2.0.4 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2015 Froala Labs |
/*! | ||
* froala_editor v2.0.3 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v2.0.4 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2015 Froala Labs |
/*! | ||
* froala_editor v2.0.3 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v2.0.4 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2015 Froala Labs |
/*! | ||
* froala_editor v2.0.3 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v2.0.4 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2015 Froala Labs |
/*! | ||
* froala_editor v2.0.3 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v2.0.4 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2015 Froala Labs |
/*! | ||
* froala_editor v2.0.3 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v2.0.4 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2015 Froala Labs |
/*! | ||
* froala_editor v2.0.3 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v2.0.4 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2015 Froala Labs |
/*! | ||
* froala_editor v2.0.3 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v2.0.4 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2015 Froala Labs |
/*! | ||
* froala_editor v2.0.3 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v2.0.4 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2015 Froala Labs |
/*! | ||
* froala_editor v2.0.3 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v2.0.4 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2015 Froala Labs |
/*! | ||
* froala_editor v2.0.3 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v2.0.4 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms | ||
@@ -7,2 +7,2 @@ * Copyright 2014-2015 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),c}:a(jQuery)}(function(a){"use strict";a.extend(a.FroalaEditor.DEFAULTS,{charCounterMax:-1,charCounterCount:!0}),a.FroalaEditor.PLUGINS.charCounter=function(b){function c(){return b.$el.text().length}function d(a){if(b.opts.charCounterMax<0)return!0;if(c()<b.opts.charCounterMax)return!0;var d=a.which;return!b.keys.ctrlKey(a)&&b.keys.isCharacter(d)?(a.preventDefault(),a.stopPropagation(),b.events.trigger("charCounter.exceeded"),!1):!0}function e(d){if(b.opts.charCounterMax<0)return d;var e=a("<div>").html(d).text().length;return e+c()<=b.opts.charCounterMax?d:(b.events.trigger("charCounter.exceeded"),"")}function f(){if(b.opts.charCounterCount){var a=c()+(b.opts.charCounterMax>0?"/"+b.opts.charCounterMax:"");h.text(a),b.opts.toolbarBottom&&h.css("margin-bottom",b.$tb.outerHeight(!0));var d=b.$wp.get(0).offsetWidth-b.$wp.get(0).clientWidth;d>0&&("rtl"==b.opts.direction?h.css("margin-left",d):h.css("margin-right",d))}}function g(){return b.$wp&&b.opts.charCounterCount?(h=a('<span class="fr-counter"></span>'),b.$box.append(h),b.events.on("keydown",d,!0),b.events.on("paste.afterCleanup",e),b.events.on("keyup",f),b.events.on("contentChanged",f),b.events.on("charCounter.update",f),f(),void b.events.on("destroy",function(){a(b.original_window).off("resize.char"+b.id),h.removeData().remove()})):!1}var h;return{_init:g}}}); | ||
!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),c}:a(jQuery)}(function(a){"use strict";a.extend(a.FroalaEditor.DEFAULTS,{charCounterMax:-1,charCounterCount:!0}),a.FroalaEditor.PLUGINS.charCounter=function(b){function c(){return b.$el.text().length}function d(a){if(b.opts.charCounterMax<0)return!0;if(c()<b.opts.charCounterMax)return!0;var d=a.which;return!b.keys.ctrlKey(a)&&b.keys.isCharacter(d)?(a.preventDefault(),a.stopPropagation(),b.events.trigger("charCounter.exceeded"),!1):!0}function e(d){if(b.opts.charCounterMax<0)return d;var e=a("<div>").html(d).text().length;return e+c()<=b.opts.charCounterMax?d:(b.events.trigger("charCounter.exceeded"),"")}function f(){if(b.opts.charCounterCount){var a=c()+(b.opts.charCounterMax>0?"/"+b.opts.charCounterMax:"");h.text(a),b.opts.toolbarBottom&&h.css("margin-bottom",b.$tb.outerHeight(!0));var d=b.$wp.get(0).offsetWidth-b.$wp.get(0).clientWidth;d>0&&("rtl"==b.opts.direction?h.css("margin-left",d):h.css("margin-right",d))}}function g(){return b.$wp&&b.opts.charCounterCount?(h=a('<span class="fr-counter"></span>'),b.$box.append(h),b.events.on("keydown",d,!0),b.events.on("paste.afterCleanup",e),b.events.on("keyup",f),b.events.on("contentChanged",f),b.events.on("charCounter.update",f),f(),void b.events.on("destroy",function(){a(b.original_window).off("resize.char"+b.id),h.removeData().remove()})):!1}var h;return{_init:g,count:c}}}); |
/*! | ||
* froala_editor v2.0.3 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v2.0.4 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2015 Froala Labs |
/*! | ||
* froala_editor v2.0.3 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v2.0.4 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2015 Froala Labs |
/*! | ||
* froala_editor v2.0.3 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v2.0.4 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2015 Froala Labs |
/*! | ||
* froala_editor v2.0.3 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v2.0.4 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2015 Froala Labs |
/*! | ||
* froala_editor v2.0.3 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v2.0.4 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2015 Froala Labs |
/*! | ||
* froala_editor v2.0.3 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v2.0.4 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms | ||
@@ -7,2 +7,2 @@ * Copyright 2014-2015 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),c}:a(jQuery)}(function(a){"use strict";a.extend(a.FroalaEditor.POPUP_TEMPLATES,{"file.insert":"[_BUTTONS_][_UPLOAD_LAYER_][_PROGRESS_BAR_]"}),a.extend(a.FroalaEditor.DEFAULTS,{fileUploadURL:"http://i.froala.com/upload",fileUploadParam:"file",fileUploadParams:{},fileUploadToS3:!1,fileUploadMethod:"POST",fileMaxSize:10485760,fileAllowedTypes:["*"],fileInsertButtons:["fileBack","|"],fileUseSelectedText:!1}),a.FroalaEditor.PLUGINS.file=function(b){function c(){var a=b.$tb.find('.fr-command[data-cmd="insertFile"]'),c=b.popups.get("file.insert");if(c||(c=r()),e(),!c.hasClass("fr-active")){b.popups.refresh("file.insert"),b.popups.setContainer("file.insert",b.$tb);var d=a.offset().left+a.outerWidth()/2,f=a.offset().top+(b.opts.toolbarBottom?0:a.outerHeight());b.popups.show("file.insert",d,f,a.outerHeight()),b.selection.save()}}function d(){var a=b.popups.get("file.insert");a&&(a.find(".fr-layer.fr-active").removeClass("fr-active").addClass("fr-pactive"),a.find(".fr-file-progress-bar-layer").addClass("fr-active"),a.find(".fr-buttons").hide(),f("Uploading",0))}function e(a){var c=b.popups.get("file.insert");c&&(c.find(".fr-layer.fr-pactive").addClass("fr-active").removeClass("fr-pactive"),c.find(".fr-file-progress-bar-layer").removeClass("fr-active"),c.find(".fr-buttons").show(),a&&b.popups.show("file.insert",null,null))}function f(a,c){var d=b.popups.get("file.insert");if(d){var e=d.find(".fr-file-progress-bar-layer");e.find("h3").text(a+(c?" "+c+"%":"")),e.removeClass("fr-error"),c?(e.find("div").removeClass("fr-indeterminate"),e.find("div > span").css("width",c+"%")):e.find("div").addClass("fr-indeterminate")}}function g(a){var c=b.popups.get("file.insert"),d=c.find(".fr-file-progress-bar-layer");d.addClass("fr-error"),d.find("h3").text(a)}function h(a,c,d){b.edit.on(),b.events.focus(!0),b.selection.restore(),b.html.insert('<a href="'+a+'" id="fr-inserted-file" class="fr-file">'+(c||b.selection.text())+"</a>");var e=b.$el.find("#fr-inserted-file");e.removeAttr("id"),b.popups.hide("file.insert"),b.undo.saveStep(),b.events.trigger("file.inserted",[e,d])}function i(c){try{if(b.events.trigger("file.uploaded",[c],!0)===!1)return b.edit.on(),!1;var d=a.parseJSON(c);return d.link?d:(n(x,c),!1)}catch(e){return n(z,c),!1}}function j(c){try{var d=a(c).find("Location").text(),e=a(c).find("Key").text();return b.events.trigger("file.uploadedToS3",[d,e,c],!0)===!1?(b.edit.on(),!1):d}catch(f){return n(z,c),!1}}function k(a){var c=this.status,d=this.response,e=this.responseXML,f=this.responseText;try{if(b.opts.fileUploadToS3)if(201==c){var g=j(e);g&&h(g,a,d||e)}else n(z,d||e);else if(c>=200&&300>c){var k=i(f);k&&h(k.link,a,d||f)}else n(y,d||f)}catch(l){n(z,d||f)}}function l(){n(z,this.response||this.responseText||this.responseXML)}function m(a){if(a.lengthComputable){var b=a.loaded/a.total*100|0;f("Uploading",b)}}function n(a,c){b.edit.on(),g(b.language.translate("Something went wrong. Please try again.")),b.events.trigger("file.error",[{code:a,message:D[a]},c])}function o(a){if(b.events.trigger("file.beforeUpload",[a])===!1)return!1;if("undefined"!=typeof a&&a.length>0){var c=a[0];if(c.size>b.opts.fileMaxSize)return n(A),!1;if(b.opts.fileAllowedTypes.indexOf("*")<0&&b.opts.fileAllowedTypes.indexOf(c.type.replace(/file\//g,""))<0)return n(B),!1;var e;if(b.drag_support.formdata&&(e=b.drag_support.formdata?new FormData:null),e){var f;if(b.opts.fileUploadToS3!==!1){e.append("key",b.opts.fileUploadToS3.keyStart+(new Date).getTime()+"-"+(c.name||"untitled")),e.append("success_action_status","201"),e.append("X-Requested-With","xhr"),e.append("Content-Type",c.type);for(f in b.opts.fileUploadToS3.params)e.append(f,b.opts.fileUploadToS3.params[f])}for(f in b.opts.fileUploadParams)e.append(f,b.opts.fileUploadParams[f]);e.append(b.opts.fileUploadParam,c);var g=b.opts.fileUploadURL;b.opts.fileUploadToS3&&(g="https://"+b.opts.fileUploadToS3.region+".amazonaws.com/"+b.opts.fileUploadToS3.bucket);var h=b.core.getXHR(g,b.opts.fileUploadMethod);h.onload=function(){k.call(h,[b.opts.fileUseSelectedText?null:c.name])},h.onerror=l,h.upload.onprogress=m,d(),b.edit.off(),h.send(e)}}}function p(b){b.on("dragover dragenter",".fr-file-upload-layer",function(){return a(this).addClass("fr-drop"),!1}),b.on("dragleave dragend",".fr-file-upload-layer",function(){return a(this).removeClass("fr-drop"),!1}),b.on("drop",".fr-file-upload-layer",function(b){b.preventDefault(),b.stopPropagation(),a(this).removeClass("fr-drop");var c=b.originalEvent.dataTransfer;c&&c.files&&o(c.files)}),b.on("change",'.fr-file-upload-layer input[type="file"]',function(){this.files&&o(this.files),a(this).val("")})}function q(){e()}function r(){var a="";a='<div class="fr-buttons">'+b.button.buildList(b.opts.fileInsertButtons)+"</div>";var c="";c='<div class="fr-file-upload-layer fr-layer fr-active" id="fr-file-upload-layer-'+b.id+'"><strong>'+b.language.translate("Drop file")+"</strong><br>("+b.language.translate("or click")+')<div class="fr-form"><input type="file" name="'+b.opts.fileUploadParam+'" accept="/*" tabIndex="-1"></div></div>';var d='<div class="fr-file-progress-bar-layer fr-layer"><h3 class="fr-message">Uploading</h3><div class="fr-loader"><span class="fr-progress"></span></div><div class="fr-action-buttons"><button type="button" class="fr-command" data-cmd="fileDismissError" tabIndex="2">OK</button></div></div>',e={buttons:a,upload_layer:c,progress_bar:d},f=b.popups.create("file.insert",e);return b.popups.onHide("file.insert",q),p(f),f}function s(c){return a(c).hasClass("fr-file")?b.events.trigger("file.unlink",[c]):void 0}function t(){var c=function(a){a.preventDefault()};b.events.on("dragenter",c),b.events.on("dragover",c),b.events.on("drop",function(c){b.popups.hideAll();var e=c.originalEvent.dataTransfer;if(e&&e.files&&e.files.length){var f=e.files[0];if(f&&f.type&&(b.opts.fileAllowedTypes.indexOf(f.type)>=0||b.opts.fileAllowedTypes.indexOf("*")>=0)){b.markers.insertAtPoint(c.originalEvent),b.markers.remove(),b.popups.hideAll();var g=b.popups.get("file.insert");g||(g=r()),b.popups.setContainer("file.insert",a(b.opts.scrollableContainer)),b.popups.show("file.insert",c.originalEvent.pageX,c.originalEvent.pageY),d(),o(e.files),c.preventDefault(),c.stopPropagation()}}})}function u(){b.events.disableBlur(),b.selection.restore(),b.events.enableBlur(),b.popups.hide("file.insert"),b.toolbar.showInline()}function v(){t(),b.events.on("link.beforeRemove",s)}var w=1,x=2,y=3,z=4,A=5,B=6,C=7,D={};return D[w]="File cannot be loaded from the passed link.",D[x]="No link in upload response.",D[y]="Error during file upload.",D[z]="Parsing response failed.",D[A]="File is too large.",D[B]="File file type is invalid.",D[C]="Files can be uploaded only to same domain in IE 8 and IE 9.",{_init:v,showInsertPopup:c,upload:o,insert:h,back:u,hideProgressBar:e}},a.FroalaEditor.DefineIcon("insertFile",{NAME:"file-o"}),a.FroalaEditor.RegisterCommand("insertFile",{title:"Upload File",undo:!1,focus:!0,refershAfterCallback:!1,popup:!0,callback:function(){this.popups.isVisible("file.insert")?(this.$el.find(".fr-marker")&&(this.events.disableBlur(),this.selection.restore()),this.popups.hide("file.insert")):this.file.showInsertPopup()}}),a.FroalaEditor.DefineIcon("fileBack",{NAME:"arrow-left"}),a.FroalaEditor.RegisterCommand("fileBack",{title:"Back",undo:!1,focus:!1,back:!0,refreshAfterCallback:!1,callback:function(){this.file.back()},refresh:function(a){this.opts.toolbarInline?(a.removeClass("fr-hidden"),a.next(".fr-separator").removeClass("fr-hidden")):(a.addClass("fr-hidden"),a.next(".fr-separator").addClass("fr-hidden"))}}),a.FroalaEditor.RegisterCommand("fileDismissError",{title:"OK",callback:function(){this.file.hideProgressBar(!0)}})}); | ||
!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),c}:a(jQuery)}(function(a){"use strict";a.extend(a.FroalaEditor.POPUP_TEMPLATES,{"file.insert":"[_BUTTONS_][_UPLOAD_LAYER_][_PROGRESS_BAR_]"}),a.extend(a.FroalaEditor.DEFAULTS,{fileUploadURL:"http://i.froala.com/upload",fileUploadParam:"file",fileUploadParams:{},fileUploadToS3:!1,fileUploadMethod:"POST",fileMaxSize:10485760,fileAllowedTypes:["*"],fileInsertButtons:["fileBack","|"],fileUseSelectedText:!1}),a.FroalaEditor.PLUGINS.file=function(b){function c(){var a=b.$tb.find('.fr-command[data-cmd="insertFile"]'),c=b.popups.get("file.insert");if(c||(c=r()),e(),!c.hasClass("fr-active")){b.popups.refresh("file.insert"),b.popups.setContainer("file.insert",b.$tb);var d=a.offset().left+a.outerWidth()/2,f=a.offset().top+(b.opts.toolbarBottom?0:a.outerHeight());b.popups.show("file.insert",d,f,a.outerHeight())}}function d(){var a=b.popups.get("file.insert");a&&(a.find(".fr-layer.fr-active").removeClass("fr-active").addClass("fr-pactive"),a.find(".fr-file-progress-bar-layer").addClass("fr-active"),a.find(".fr-buttons").hide(),f("Uploading",0))}function e(a){var c=b.popups.get("file.insert");c&&(c.find(".fr-layer.fr-pactive").addClass("fr-active").removeClass("fr-pactive"),c.find(".fr-file-progress-bar-layer").removeClass("fr-active"),c.find(".fr-buttons").show(),a&&b.popups.show("file.insert",null,null))}function f(a,c){var d=b.popups.get("file.insert");if(d){var e=d.find(".fr-file-progress-bar-layer");e.find("h3").text(a+(c?" "+c+"%":"")),e.removeClass("fr-error"),c?(e.find("div").removeClass("fr-indeterminate"),e.find("div > span").css("width",c+"%")):e.find("div").addClass("fr-indeterminate")}}function g(a){var c=b.popups.get("file.insert"),d=c.find(".fr-file-progress-bar-layer");d.addClass("fr-error"),d.find("h3").text(a)}function h(a,c,d){b.edit.on(),b.events.focus(!0),b.selection.restore(),b.html.insert('<a href="'+a+'" id="fr-inserted-file" class="fr-file">'+(c||b.selection.text())+"</a>");var e=b.$el.find("#fr-inserted-file");e.removeAttr("id"),b.popups.hide("file.insert"),b.undo.saveStep(),b.events.trigger("file.inserted",[e,d])}function i(c){try{if(b.events.trigger("file.uploaded",[c],!0)===!1)return b.edit.on(),!1;var d=a.parseJSON(c);return d.link?d:(n(x,c),!1)}catch(e){return n(z,c),!1}}function j(c){try{var d=a(c).find("Location").text(),e=a(c).find("Key").text();return b.events.trigger("file.uploadedToS3",[d,e,c],!0)===!1?(b.edit.on(),!1):d}catch(f){return n(z,c),!1}}function k(a){var c=this.status,d=this.response,e=this.responseXML,f=this.responseText;try{if(b.opts.fileUploadToS3)if(201==c){var g=j(e);g&&h(g,a,d||e)}else n(z,d||e);else if(c>=200&&300>c){var k=i(f);k&&h(k.link,a,d||f)}else n(y,d||f)}catch(l){n(z,d||f)}}function l(){n(z,this.response||this.responseText||this.responseXML)}function m(a){if(a.lengthComputable){var b=a.loaded/a.total*100|0;f("Uploading",b)}}function n(a,c){b.edit.on(),g(b.language.translate("Something went wrong. Please try again.")),b.events.trigger("file.error",[{code:a,message:D[a]},c])}function o(a){if(b.events.trigger("file.beforeUpload",[a])===!1)return!1;if("undefined"!=typeof a&&a.length>0){var c=a[0];if(c.size>b.opts.fileMaxSize)return n(A),!1;if(b.opts.fileAllowedTypes.indexOf("*")<0&&b.opts.fileAllowedTypes.indexOf(c.type.replace(/file\//g,""))<0)return n(B),!1;var e;if(b.drag_support.formdata&&(e=b.drag_support.formdata?new FormData:null),e){var f;if(b.opts.fileUploadToS3!==!1){e.append("key",b.opts.fileUploadToS3.keyStart+(new Date).getTime()+"-"+(c.name||"untitled")),e.append("success_action_status","201"),e.append("X-Requested-With","xhr"),e.append("Content-Type",c.type);for(f in b.opts.fileUploadToS3.params)e.append(f,b.opts.fileUploadToS3.params[f])}for(f in b.opts.fileUploadParams)e.append(f,b.opts.fileUploadParams[f]);e.append(b.opts.fileUploadParam,c);var g=b.opts.fileUploadURL;b.opts.fileUploadToS3&&(g="https://"+b.opts.fileUploadToS3.region+".amazonaws.com/"+b.opts.fileUploadToS3.bucket);var h=b.core.getXHR(g,b.opts.fileUploadMethod);h.onload=function(){k.call(h,[b.opts.fileUseSelectedText?null:c.name])},h.onerror=l,h.upload.onprogress=m,d(),b.edit.off(),h.send(e)}}}function p(b){b.on("dragover dragenter",".fr-file-upload-layer",function(){return a(this).addClass("fr-drop"),!1}),b.on("dragleave dragend",".fr-file-upload-layer",function(){return a(this).removeClass("fr-drop"),!1}),b.on("drop",".fr-file-upload-layer",function(b){b.preventDefault(),b.stopPropagation(),a(this).removeClass("fr-drop");var c=b.originalEvent.dataTransfer;c&&c.files&&o(c.files)}),b.on("change",'.fr-file-upload-layer input[type="file"]',function(){this.files&&o(this.files),a(this).val("")})}function q(){e()}function r(){var a="";a='<div class="fr-buttons">'+b.button.buildList(b.opts.fileInsertButtons)+"</div>";var c="";c='<div class="fr-file-upload-layer fr-layer fr-active" id="fr-file-upload-layer-'+b.id+'"><strong>'+b.language.translate("Drop file")+"</strong><br>("+b.language.translate("or click")+')<div class="fr-form"><input type="file" name="'+b.opts.fileUploadParam+'" accept="/*" tabIndex="-1"></div></div>';var d='<div class="fr-file-progress-bar-layer fr-layer"><h3 class="fr-message">Uploading</h3><div class="fr-loader"><span class="fr-progress"></span></div><div class="fr-action-buttons"><button type="button" class="fr-command" data-cmd="fileDismissError" tabIndex="2">OK</button></div></div>',e={buttons:a,upload_layer:c,progress_bar:d},f=b.popups.create("file.insert",e);return b.popups.onHide("file.insert",q),p(f),f}function s(c){return a(c).hasClass("fr-file")?b.events.trigger("file.unlink",[c]):void 0}function t(){var c=function(a){a.preventDefault()};b.events.on("dragenter",c),b.events.on("dragover",c),b.events.on("drop",function(c){b.popups.hideAll();var e=c.originalEvent.dataTransfer;if(e&&e.files&&e.files.length){var f=e.files[0];if(f&&f.type&&(b.opts.fileAllowedTypes.indexOf(f.type)>=0||b.opts.fileAllowedTypes.indexOf("*")>=0)){b.markers.insertAtPoint(c.originalEvent),b.markers.remove(),b.popups.hideAll();var g=b.popups.get("file.insert");g||(g=r()),b.popups.setContainer("file.insert",a(b.opts.scrollableContainer)),b.popups.show("file.insert",c.originalEvent.pageX,c.originalEvent.pageY),d(),o(e.files),c.preventDefault(),c.stopPropagation()}}})}function u(){b.events.disableBlur(),b.selection.restore(),b.events.enableBlur(),b.popups.hide("file.insert"),b.toolbar.showInline()}function v(){t(),b.events.on("link.beforeRemove",s)}var w=1,x=2,y=3,z=4,A=5,B=6,C=7,D={};return D[w]="File cannot be loaded from the passed link.",D[x]="No link in upload response.",D[y]="Error during file upload.",D[z]="Parsing response failed.",D[A]="File is too large.",D[B]="File file type is invalid.",D[C]="Files can be uploaded only to same domain in IE 8 and IE 9.",{_init:v,showInsertPopup:c,upload:o,insert:h,back:u,hideProgressBar:e}},a.FroalaEditor.DefineIcon("insertFile",{NAME:"file-o"}),a.FroalaEditor.RegisterCommand("insertFile",{title:"Upload File",undo:!1,focus:!0,refershAfterCallback:!1,popup:!0,callback:function(){this.popups.isVisible("file.insert")?(this.$el.find(".fr-marker")&&(this.events.disableBlur(),this.selection.restore()),this.popups.hide("file.insert")):this.file.showInsertPopup()}}),a.FroalaEditor.DefineIcon("fileBack",{NAME:"arrow-left"}),a.FroalaEditor.RegisterCommand("fileBack",{title:"Back",undo:!1,focus:!1,back:!0,refreshAfterCallback:!1,callback:function(){this.file.back()},refresh:function(a){this.opts.toolbarInline?(a.removeClass("fr-hidden"),a.next(".fr-separator").removeClass("fr-hidden")):(a.addClass("fr-hidden"),a.next(".fr-separator").addClass("fr-hidden"))}}),a.FroalaEditor.RegisterCommand("fileDismissError",{title:"OK",callback:function(){this.file.hideProgressBar(!0)}})}); |
/*! | ||
* froala_editor v2.0.3 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v2.0.4 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2015 Froala Labs |
/*! | ||
* froala_editor v2.0.3 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v2.0.4 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2015 Froala Labs |
/*! | ||
* froala_editor v2.0.3 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v2.0.4 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms | ||
@@ -7,2 +7,2 @@ * Copyright 2014-2015 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),c}:a(jQuery)}(function(a){"use strict";a.FroalaEditor.PLUGINS.fullscreen=function(b){function c(){return b.$box.hasClass("fr-fullscreen")}function d(){i=a(b.original_window).scrollTop(),b.$box.toggleClass("fr-fullscreen"),a("body").toggleClass("fr-fullscreen"),j=a('<div style="display: none;"></div>'),b.$box.after(j).appendTo(a("body")),b.helpers.isMobile()&&(b.$tb.data("parent",b.$tb.parent()),b.$tb.prependTo(b.$box),b.$tb.data("sticky-dummy")&&b.$tb.after(b.$tb.data("sticky-dummy"))),b.$wp.css("max-height",""),b.$wp.css("height",a(b.original_window).height()-(b.opts.toolbarInline?0:b.$tb.outerHeight())),b.opts.toolbarInline&&b.toolbar.showInline(),b.events.trigger("charCounter.update"),b.$window.trigger("scroll.sticky"+b.id)}function e(){j.replaceWith(b.$box),b.$box.toggleClass("fr-fullscreen"),a("body").toggleClass("fr-fullscreen"),b.$tb.prependTo(b.$tb.data("parent")),b.$tb.data("sticky-dummy")&&b.$tb.after(b.$tb.data("sticky-dummy")),b.$wp.css("height",""),b.size.refresh(),a(b.original_window).scrollTop(i),b.opts.toolbarInline&&b.toolbar.showInline(),b.events.trigger("charCounter.update"),b.opts.toolbarSticky&&b.opts.toolbarStickyOffset&&(b.opts.toolbarBottom?b.$tb.css("bottom",b.opts.toolbarStickyOffset).data("bottom",b.opts.toolbarStickyOffset):b.$tb.css("top",b.opts.toolbarStickyOffset).data("top",b.opts.toolbarStickyOffset)),b.$window.trigger("scroll.sticky"+b.id)}function f(){c()?e():d(),g(b.$tb.find('.fr-command[data-cmd="fullscreen"]'))}function g(a){var b=c();a.toggleClass("fr-active",b),a.find("i").toggleClass("fa-expand",!b).toggleClass("fa-compress",b)}function h(){return b.$wp?(a(b.original_window).on("resize.fullscreen"+b.id,function(){c()&&(e(),d())}),b.events.on("toolbar.hide",function(){return c()&&b.helpers.isMobile()?!1:void 0}),void b.events.on("destroy",function(){a(b.original_window).off("resize.fullscreen"+b.id)})):!1}var i,j;return{_init:h,toggle:f,refresh:g,isActive:c}},a.FroalaEditor.RegisterCommand("fullscreen",{title:"Fullscreen",undo:!1,focus:!1,forcedRefresh:!0,callback:function(){this.fullscreen.toggle()},refresh:function(a){this.fullscreen.refresh(a)}}),a.FroalaEditor.DefineIcon("fullscreen",{NAME:"expand"})}); | ||
!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),c}:a(jQuery)}(function(a){"use strict";a.FroalaEditor.PLUGINS.fullscreen=function(b){function c(){return b.$box.hasClass("fr-fullscreen")}function d(){i=a(b.original_window).scrollTop(),b.$box.toggleClass("fr-fullscreen"),a("body").toggleClass("fr-fullscreen"),j=a('<div style="display: none;"></div>'),b.$box.after(j).appendTo(a("body")),b.helpers.isMobile()&&(b.$tb.data("parent",b.$tb.parent()),b.$tb.prependTo(b.$box),b.$tb.data("sticky-dummy")&&b.$tb.after(b.$tb.data("sticky-dummy"))),b.$wp.css("max-height",""),b.$wp.css("height",b.original_window.innerHeight-(b.opts.toolbarInline?0:b.$tb.outerHeight())),b.opts.toolbarInline&&b.toolbar.showInline(),b.events.trigger("charCounter.update"),b.$window.trigger("scroll.sticky"+b.id)}function e(){j.replaceWith(b.$box),b.$box.toggleClass("fr-fullscreen"),a("body").toggleClass("fr-fullscreen"),b.$tb.prependTo(b.$tb.data("parent")),b.$tb.data("sticky-dummy")&&b.$tb.after(b.$tb.data("sticky-dummy")),b.$wp.css("height",""),b.size.refresh(),a(b.original_window).scrollTop(i),b.opts.toolbarInline&&b.toolbar.showInline(),b.events.trigger("charCounter.update"),b.opts.toolbarSticky&&b.opts.toolbarStickyOffset&&(b.opts.toolbarBottom?b.$tb.css("bottom",b.opts.toolbarStickyOffset).data("bottom",b.opts.toolbarStickyOffset):b.$tb.css("top",b.opts.toolbarStickyOffset).data("top",b.opts.toolbarStickyOffset)),b.$window.trigger("scroll.sticky"+b.id)}function f(){c()?e():d(),g(b.$tb.find('.fr-command[data-cmd="fullscreen"]'))}function g(a){var b=c();a.toggleClass("fr-active",b),a.find("i").toggleClass("fa-expand",!b).toggleClass("fa-compress",b)}function h(){return b.$wp?(a(b.original_window).on("resize.fullscreen"+b.id,function(){c()&&(e(),d())}),b.events.on("toolbar.hide",function(){return c()&&b.helpers.isMobile()?!1:void 0}),void b.events.on("destroy",function(){a(b.original_window).off("resize.fullscreen"+b.id)})):!1}var i,j;return{_init:h,toggle:f,refresh:g,isActive:c}},a.FroalaEditor.RegisterCommand("fullscreen",{title:"Fullscreen",undo:!1,focus:!1,forcedRefresh:!0,callback:function(){this.fullscreen.toggle()},refresh:function(a){this.fullscreen.refresh(a)}}),a.FroalaEditor.DefineIcon("fullscreen",{NAME:"expand"})}); |
/*! | ||
* froala_editor v2.0.3 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v2.0.4 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2015 Froala Labs |
/*! | ||
* froala_editor v2.0.3 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v2.0.4 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2015 Froala Labs |
/*! | ||
* froala_editor v2.0.3 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v2.0.4 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2015 Froala Labs |
/*! | ||
* froala_editor v2.0.3 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v2.0.4 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2015 Froala Labs |
/*! | ||
* froala_editor v2.0.3 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v2.0.4 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms | ||
@@ -7,2 +7,2 @@ * Copyright 2014-2015 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),c}:a(jQuery)}(function(a){"use strict";a.extend(a.FroalaEditor.POPUP_TEMPLATES,{"link.edit":"[_BUTTONS_]","link.insert":"[_BUTTONS_][_INPUT_LAYER_]"}),a.extend(a.FroalaEditor.DEFAULTS,{linkEditButtons:["linkOpen","linkStyle","linkEdit","linkRemove"],linkInsertButtons:["linkBack","|","linkList"],linkAttributes:{},linkAutoPrefix:"http://",linkStyles:{"fr-green":"Green","fr-strong":"Thick"},linkMultipleStyles:!0,linkConvertEmailAddress:!0,linkAlwaysBlank:!1,linkAlwaysNoFollow:!1,linkList:[{text:"Froala",href:"https://froala.com",target:"_blank"},{text:"Google",href:"https://google.com",target:"_blank"},{displayText:"Facebook",href:"https://facebook.com"}],linkText:!0}),a.FroalaEditor.PLUGINS.link=function(b){function c(){}function d(){var c=b.image?b.image.get():null;if(!c&&b.$wp){var d=b.selection.element(),e=b.selection.endElement();return"A"!=d.tagName&&(d=a(d).parents("a:first").get(0)),"A"!=e.tagName&&(e=a(e).parents("a:first").get(0)),e&&e==d?d:null}return"A"==b.$el.get(0).tagName&&b.core.hasFocus()?b.$el:c&&c.get(0).parentNode&&"A"==c.get(0).parentNode.tagName?c.get(0).parentNode:void 0}function e(){var a=b.image?b.image.get():null,c=[];if(a)"A"==a.get(0).parentNode.tagName&&c.push(a.get(0).parentNode);else{var d,e,f,g;if(b.window.getSelection){var h=b.window.getSelection();if(h.getRangeAt&&h.rangeCount){g=b.document.createRange();for(var i=0;i<h.rangeCount;++i)if(d=h.getRangeAt(i),e=d.commonAncestorContainer,e&&1!=e.nodeType&&(e=e.parentNode),e&&"a"==e.nodeName.toLowerCase())c.push(e);else{f=e.getElementsByTagName("a");for(var j=0;j<f.length;++j)g.selectNodeContents(f[j]),g.compareBoundaryPoints(d.END_TO_START,d)<1&&g.compareBoundaryPoints(d.START_TO_END,d)>-1&&c.push(f[j])}}}else if(b.document.selection&&"Control"!=b.document.selection.type)if(d=b.document.selection.createRange(),e=d.parentElement(),"a"==e.nodeName.toLowerCase())c.push(e);else{f=e.getElementsByTagName("a"),g=b.document.body.createTextRange();for(var k=0;k<f.length;++k)g.moveToElementText(f[k]),g.compareEndPoints("StartToEnd",d)>-1&&g.compareEndPoints("EndToStart",d)<1&&c.push(f[k])}}return c}function f(c){setTimeout(function(){if(!c||c&&(1==c.which||"mouseup"!=c.type)){var e=d(),f=b.image?b.image.get():null;if(e&&!f){if(b.image){var h=b.node.contents(e);if(1==h.length&&"IMG"==h[0].tagName)return a(h[0]).trigger("click"),!1}c&&c.stopPropagation(),g(e)}else b.popups.hide("link.edit")}},b.helpers.isIOS()?100:0)}function g(c){var d=b.popups.get("link.edit");d||(d=i());var e=a(c);b.popups.isVisible("link.edit")||b.popups.refresh("link.edit"),b.popups.setContainer("link.edit",a(b.opts.scrollableContainer));var f=e.offset().left+a(c).outerWidth()/2,g=e.offset().top+e.outerHeight();b.popups.show("link.edit",f,g,e.outerHeight())}function h(){b.popups.hide("link.edit")}function i(){var a="";b.opts.linkEditButtons.length>1&&("A"==b.$el.get(0).tagName&&b.opts.linkEditButtons.indexOf("linkRemove")>=0&&b.opts.linkEditButtons.splice(b.opts.linkEditButtons.indexOf("linkRemove"),1),a='<div class="fr-buttons">'+b.button.buildList(b.opts.linkEditButtons)+"</div>");var c={buttons:a},e=b.popups.create("link.edit",c);return b.$wp&&b.$wp.on("scroll.link-edit",function(){d()&&b.popups.isVisible("link.edit")&&g(d())}),b.events.on("destroy",function(){b.$wp&&b.$wp.off("scroll.link-edit")}),e}function j(){}function k(){var c=b.popups.get("link.insert"),e=d();if(e){var f,g,h=a(e),i=c.find('input.fr-link-attr[type="text"]'),j=c.find('input.fr-link-attr[type="checkbox"]');for(f=0;f<i.length;f++)g=a(i[f]),g.val(h.attr(g.attr("name")||""));for(j.prop("checked",!1),f=0;f<j.length;f++)g=a(j[f]),h.attr(g.attr("name"))==g.data("checked")&&g.prop("checked",!0);c.find('input.fr-link-attr[type="text"][name="text"]').val(h.text())}else c.find('input.fr-link-attr[type="text"]').val(""),c.find('input.fr-link-attr[type="checkbox"]').prop("checked",!1),c.find('input.fr-link-attr[type="text"][name="text"]').val(b.selection.text());c.find("input.fr-link-attr").trigger("change");var k=b.image?b.image.get():null;k?c.find('.fr-link-attr[name="text"]').parent().hide():c.find('.fr-link-attr[name="text"]').parent().show()}function l(){var c=b.$tb.find('.fr-command[data-cmd="insertLink"]'),d=b.popups.get("link.insert");if(d||(d=m()),!d.hasClass("fr-active"))if(b.popups.refresh("link.insert"),b.popups.setContainer("link.insert",b.$tb||a(b.opts.scrollableContainer)),c.is(":visible")){var e=c.offset().left+c.outerWidth()/2,f=c.offset().top+(b.opts.toolbarBottom?10:c.outerHeight()-10);b.popups.show("link.insert",e,f,c.outerHeight())}else b.position.forSelection(d),b.popups.show("link.insert")}function m(){var a="";b.opts.linkInsertButtons.length>=1&&(a='<div class="fr-buttons">'+b.button.buildList(b.opts.linkInsertButtons)+"</div>");var c='<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="10" height="10" viewBox="0 0 32 32"><path d="M27 4l-15 15-7-7-5 5 12 12 20-20z" fill="#FFF"></path></svg>',e="",f=0;e='<div class="fr-link-insert-layer fr-layer fr-active" id="fr-link-insert-layer-'+b.id+'">',e+='<div class="fr-input-line"><input name="href" type="text" class="fr-link-attr" placeholder="URL" tabIndex="'+ ++f+'"></div>',b.opts.linkText&&(e+='<div class="fr-input-line"><input name="text" type="text" class="fr-link-attr" placeholder="'+b.language.translate("Text")+'" tabIndex="'+ ++f+'"></div>');for(var g in b.opts.linkAttributes){var h=b.opts.linkAttributes[g];e+='<div class="fr-input-line"><input name="'+g+'" type="text" class="fr-link-attr" placeholder="'+b.language.translate(h)+'" tabIndex="'+ ++f+'"></div>'}b.opts.linkAlwaysBlank||(e+='<div class="fr-checkbox-line"><span class="fr-checkbox"><input name="target" class="fr-link-attr" data-checked="_blank" type="checkbox" id="fr-link-target-'+b.id+'" tabIndex="'+ ++f+'"><span>'+c+'</span></span><label for="fr-link-target-'+b.id+'">'+b.language.translate("Open in new tab")+"</label></div>"),e+='<div class="fr-action-buttons"><button class="fr-command fr-submit" data-cmd="linkInsert" href="#" tabIndex="'+ ++f+'" type="button">'+b.language.translate("Insert")+"</button></div></div>";var i={buttons:a,input_layer:e},l=b.popups.create("link.insert",i);return b.popups.onRefresh("link.insert",k),b.popups.onHide("link.insert",j),b.$wp&&b.$wp.on("scroll.link-insert",function(){var a=b.image?b.image.get():null;a&&b.popups.isVisible("link.insert")&&v(),d&&b.popups.isVisible("link.insert")&&t()}),b.events.on("destroy",function(){b.$wp&&b.$wp.off("scroll.link-insert")}),l}function n(){var c=d(),e=b.image?b.image.get():null;return b.events.trigger("link.beforeRemove",[c])===!1?!1:void(e&&c?(e.unwrap(),e.trigger("click")):c&&(b.selection.save(),a(c).replaceWith(a(c).html()),b.selection.restore(),h()))}function o(){b.events.on("keyup",function(b){b.which!=a.FroalaEditor.KEYCODE.ESC&&f(b)}),b.events.on("window.mouseup",f)}function p(c){var d,e,f=b.opts.linkList[c],g=b.popups.get("link.insert"),h=g.find('input.fr-link-attr[type="text"]'),i=g.find('input.fr-link-attr[type="checkbox"]');for(e=0;e<h.length;e++)d=a(h[e]),f[d.attr("name")]?d.val(f[d.attr("name")]):d.val("");for(e=0;e<i.length;e++)d=a(i[e]),d.prop("checked",d.data("checked")==f[d.attr("name")])}function q(){var c,d,e=b.popups.get("link.insert"),f=e.find('input.fr-link-attr[type="text"]'),g=e.find('input.fr-link-attr[type="checkbox"]'),h=f.filter('[name="href"]').val(),i=f.filter('[name="text"]').val(),j={};for(d=0;d<f.length;d++)c=a(f[d]),["href","text"].indexOf(c.attr("name"))<0&&(j[c.attr("name")]=c.val());for(d=0;d<g.length;d++)c=a(g[d]),c.is(":checked")?j[c.attr("name")]=c.data("checked"):j[c.attr("name")]=c.data("unchecked");var k=a(b.original_window).scrollTop();s(h,i,j),a(b.original_window).scrollTop(k)}function r(){if(!b.selection.isCollapsed()){b.selection.save();for(var c=b.$el.find(".fr-marker").addClass("fr-unprocessed").toArray();c.length;){var d=a(c.pop());d.removeClass("fr-unprocessed");var e=b.node.deepestParent(d.get(0));if(e){var f=d.get(0),g="",h="";do f=f.parentNode,b.node.isBlock(f)||(g+=b.node.closeTagString(f),h=b.node.openTagString(f)+h);while(f!=e);var i=b.node.openTagString(d.get(0))+d.html()+b.node.closeTagString(d.get(0));d.replaceWith('<span id="fr-break"></span>');var j=a(e).html();j=j.replace(/<span id="fr-break"><\/span>/g,g+i+h),a(e).html(j)}c=b.$el.find(".fr-marker.fr-unprocessed").toArray()}b.selection.restore()}}function s(c,g,h){"undefined"==typeof h&&(h={});var i=b.image?b.image.get():null;i||"A"==b.$el.get(0).tagName?"A"==b.$el.get(0).tagName&&b.$el.focus():(b.events.focus(!0),b.selection.restore());var j=c;if(b.opts.linkConvertEmailAddress){var k=/^[\w._]+@[a-zA-Z_]+?\.[a-zA-Z]{2,3}$/i;k.test(c)&&0!==c.indexOf("mailto:")&&(c="mailto:"+c)}if(0===c.indexOf("tel:")||0===c.indexOf("sms:")||0===c.indexOf("mailto:")||0===c.indexOf("data:image")||""===b.opts.linkAutoPrefix||/^(https?:|ftps?:|)\/\//.test(c)||(c=b.opts.linkAutoPrefix+c),c=b.helpers.sanitizeURL(c),b.opts.linkAlwaysBlank&&(h.target="_blank"),b.opts.linkAlwaysNoFollow&&(h.rel="nofollow"),g=g||"",c===b.opts.linkAutoPrefix){var l=b.popups.get("link.insert");return l.find('input[name="href"]').addClass("fr-error"),b.events.trigger("link.bad",[j]),!1}var m,n=d();if(n){m=a(n);var o=b.node.rawAttributes(n);for(var p in o)"class"!=p&&"style"!=p&&m.removeAttr(p);m.attr("href",c),g.length>0&&m.text()!=g&&!i&&m.text(g),i||m.prepend(a.FroalaEditor.START_MARKER).append(a.FroalaEditor.END_MARKER),m.attr(h),i||b.selection.restore()}else{i?i.wrap('<a href="'+c+'"></a>'):(b.document.execCommand("unlink",!1,!1),b.selection.isCollapsed()?(g=0===g.length?j:g,b.html.insert('<a href="'+c+'">'+a.FroalaEditor.START_MARKER+g+a.FroalaEditor.END_MARKER+"</a>"),b.selection.restore()):g.length>0&&g!=b.selection.text()?(b.selection.remove(),b.html.insert('<a href="'+c+'">'+a.FroalaEditor.START_MARKER+g+a.FroalaEditor.END_MARKER+"</a>"),b.selection.restore()):(r(),b.document.execCommand("createLink",!1,c)));for(var q=e(),s=0;s<q.length;s++)m=a(q[s]),m.attr(h),m.removeAttr("_moz_dirty");1==q.length&&b.$wp&&!i?(a(q[0]).prepend(a.FroalaEditor.START_MARKER).append(a.FroalaEditor.END_MARKER),b.selection.restore()):b.popups.hide("link.insert")}i?(i.trigger("touchstart"),i.trigger(b.helpers.isMobile()?"touchend":"click")):(b.popups.get("link.insert"),f())}function t(){h();var c=d();if(c){var e=b.popups.get("link.insert");e||(e=m()),b.popups.isVisible("link.insert")||(b.popups.refresh("link.insert"),b.selection.save(),b.helpers.isMobile()&&(b.events.disableBlur(),b.$el.blur(),b.events.enableBlur())),b.popups.setContainer("link.insert",a(b.opts.scrollableContainer));var f=(b.image?b.image.get():null)||a(c),g=f.offset().left+f.outerWidth()/2,i=f.offset().top+f.outerHeight();b.popups.show("link.insert",g,i,f.outerHeight())}}function u(){var a=b.image?b.image.get():null;if(a)a.trigger("click").trigger("touchend");else{b.events.disableBlur(),b.selection.restore(),b.events.enableBlur();var c=d();c&&b.$wp?(b.selection.restore(),h(),f()):"A"==b.$el.get(0).tagName?(b.$el.focus(),f()):(b.popups.hide("link.insert"),b.toolbar.showInline())}}function v(){var c=b.image?b.image.get():null;if(c){var d=b.popups.get("link.insert");d||(d=m()),k(!0),b.popups.setContainer("link.insert",a(b.opts.scrollableContainer));var e=c.offset().left+c.outerWidth()/2,f=c.offset().top+c.outerHeight();b.popups.show("link.insert",e,f,c.outerHeight())}}function w(c){var e=d();if(!e)return!1;if(!b.opts.linkMultipleStyles){var f=Object.keys(b.opts.linkStyles);f.splice(f.indexOf(c),1),a(e).removeClass(f.join(" "))}a(e).toggleClass(c)}return{_init:o,callback:c,remove:n,showInsertPopup:l,usePredefined:p,insertCallback:q,insert:s,update:t,get:d,allSelected:e,back:u,imageLink:v,applyStyle:w}},a.FroalaEditor.DefineIcon("insertLink",{NAME:"link"}),a.FroalaEditor.RegisterShortcut(75,"insertLink"),a.FroalaEditor.RegisterCommand("insertLink",{title:"Insert Link",undo:!1,focus:!0,refreshOnCallback:!1,popup:!0,callback:function(){this.popups.isVisible("link.insert")?(this.$el.find(".fr-marker")&&(this.events.disableBlur(),this.selection.restore()),this.popups.hide("link.insert")):this.link.showInsertPopup()}}),a.FroalaEditor.DefineIcon("linkOpen",{NAME:"external-link"}),a.FroalaEditor.RegisterCommand("linkOpen",{title:"Open Link",undo:!1,refresh:function(b){var c=this.link.get();c?(b.removeClass("fr-hidden"),b.attr("href",a(c).attr("href")).attr("target","_blank").attr("rel","nofollow")):b.addClass("fr-hidden")}}),a.FroalaEditor.DefineIcon("linkEdit",{NAME:"edit"}),a.FroalaEditor.RegisterCommand("linkEdit",{title:"Edit Link",undo:!1,refreshAfterCallback:!1,callback:function(){this.link.update()},refresh:function(a){var b=this.link.get();b?a.removeClass("fr-hidden"):a.addClass("fr-hidden")}}),a.FroalaEditor.DefineIcon("linkRemove",{NAME:"unlink"}),a.FroalaEditor.RegisterCommand("linkRemove",{title:"Unlink",callback:function(){this.link.remove()},refresh:function(a){var b=this.link.get();b?a.removeClass("fr-hidden"):a.addClass("fr-hidden")}}),a.FroalaEditor.DefineIcon("linkBack",{NAME:"arrow-left"}),a.FroalaEditor.RegisterCommand("linkBack",{title:"Back",undo:!1,focus:!1,back:!0,refreshAfterCallback:!1,callback:function(){this.link.back()},refresh:function(a){var b=this.link.get(),c=this.image?this.image.get():null;c||b||this.opts.toolbarInline?(a.removeClass("fr-hidden"),a.next(".fr-separator").removeClass("fr-hidden")):(a.addClass("fr-hidden"),a.next(".fr-separator").addClass("fr-hidden"))}}),a.FroalaEditor.DefineIcon("linkList",{NAME:"search"}),a.FroalaEditor.RegisterCommand("linkList",{title:"Choose Link",type:"dropdown",focus:!1,undo:!1,refreshAfterCallback:!1,html:function(){for(var a='<ul class="fr-dropdown-list">',b=this.opts.linkList,c=0;c<b.length;c++)a+='<li><a class="fr-command" data-cmd="linkList" data-param1="'+c+'">'+(b[c].displayText||b[c].text)+"</a></li>";return a+="</ul>"},callback:function(a,b){this.link.usePredefined(b)}}),a.FroalaEditor.RegisterCommand("linkInsert",{focus:!1,refreshAfterCallback:!1,callback:function(){this.link.insertCallback()},refresh:function(a){var b=this.link.get();b?a.text(this.language.translate("Update")):a.text(this.language.translate("Insert"))}}),a.FroalaEditor.DefineIcon("imageLink",{NAME:"link"}),a.FroalaEditor.RegisterCommand("imageLink",{title:"Insert Link",undo:!1,focus:!1,callback:function(){this.link.imageLink()},refresh:function(a){var b,c=this.link.get();c?(b=a.prev(),b.hasClass("fr-separator")&&b.removeClass("fr-hidden"),a.addClass("fr-hidden")):(b=a.prev(),b.hasClass("fr-separator")&&b.addClass("fr-hidden"),a.removeClass("fr-hidden"))}}),a.FroalaEditor.DefineIcon("linkStyle",{NAME:"magic"}),a.FroalaEditor.RegisterCommand("linkStyle",{title:"Style",type:"dropdown",html:function(){var a='<ul class="fr-dropdown-list">',b=this.opts.linkStyles;for(var c in b)a+='<li><a class="fr-command" data-cmd="linkStyle" data-param1="'+c+'">'+this.language.translate(b[c])+"</a></li>";return a+="</ul>"},callback:function(a,b){this.link.applyStyle(b)},refreshOnShow:function(b,c){var d=this.link.get();if(d){var e=a(d);c.find(".fr-command").each(function(){var b=a(this).data("param1");a(this).toggleClass("fr-active",e.hasClass(b))})}}})}); | ||
!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),c}:a(jQuery)}(function(a){"use strict";a.extend(a.FroalaEditor.POPUP_TEMPLATES,{"link.edit":"[_BUTTONS_]","link.insert":"[_BUTTONS_][_INPUT_LAYER_]"}),a.extend(a.FroalaEditor.DEFAULTS,{linkEditButtons:["linkOpen","linkStyle","linkEdit","linkRemove"],linkInsertButtons:["linkBack","|","linkList"],linkAttributes:{},linkAutoPrefix:"http://",linkStyles:{"fr-green":"Green","fr-strong":"Thick"},linkMultipleStyles:!0,linkConvertEmailAddress:!0,linkAlwaysBlank:!1,linkAlwaysNoFollow:!1,linkList:[{text:"Froala",href:"https://froala.com",target:"_blank"},{text:"Google",href:"https://google.com",target:"_blank"},{displayText:"Facebook",href:"https://facebook.com"}],linkText:!0}),a.FroalaEditor.PLUGINS.link=function(b){function c(){}function d(){var c=b.image?b.image.get():null;if(!c&&b.$wp){var d=b.selection.element(),e=b.selection.endElement();return"A"!=d.tagName&&(d=a(d).parents("a:first").get(0)),"A"!=e.tagName&&(e=a(e).parents("a:first").get(0)),e&&e==d?d:null}return"A"==b.$el.get(0).tagName&&b.core.hasFocus()?b.$el:c&&c.get(0).parentNode&&"A"==c.get(0).parentNode.tagName?c.get(0).parentNode:void 0}function e(){var a=b.image?b.image.get():null,c=[];if(a)"A"==a.get(0).parentNode.tagName&&c.push(a.get(0).parentNode);else{var d,e,f,g;if(b.window.getSelection){var h=b.window.getSelection();if(h.getRangeAt&&h.rangeCount){g=b.document.createRange();for(var i=0;i<h.rangeCount;++i)if(d=h.getRangeAt(i),e=d.commonAncestorContainer,e&&1!=e.nodeType&&(e=e.parentNode),e&&"a"==e.nodeName.toLowerCase())c.push(e);else{f=e.getElementsByTagName("a");for(var j=0;j<f.length;++j)g.selectNodeContents(f[j]),g.compareBoundaryPoints(d.END_TO_START,d)<1&&g.compareBoundaryPoints(d.START_TO_END,d)>-1&&c.push(f[j])}}}else if(b.document.selection&&"Control"!=b.document.selection.type)if(d=b.document.selection.createRange(),e=d.parentElement(),"a"==e.nodeName.toLowerCase())c.push(e);else{f=e.getElementsByTagName("a"),g=b.document.body.createTextRange();for(var k=0;k<f.length;++k)g.moveToElementText(f[k]),g.compareEndPoints("StartToEnd",d)>-1&&g.compareEndPoints("EndToStart",d)<1&&c.push(f[k])}}return c}function f(c){setTimeout(function(){if(!c||c&&(1==c.which||"mouseup"!=c.type)){var e=d(),f=b.image?b.image.get():null;if(e&&!f){if(b.image){var h=b.node.contents(e);if(1==h.length&&"IMG"==h[0].tagName)return a(h[0]).trigger("click"),!1}c&&c.stopPropagation(),g(e)}else b.popups.hide("link.edit")}},b.helpers.isIOS()?100:0)}function g(c){var d=b.popups.get("link.edit");d||(d=i());var e=a(c);b.popups.isVisible("link.edit")||b.popups.refresh("link.edit"),b.popups.setContainer("link.edit",a(b.opts.scrollableContainer));var f=e.offset().left+a(c).outerWidth()/2,g=e.offset().top+e.outerHeight();b.popups.show("link.edit",f,g,e.outerHeight())}function h(){b.popups.hide("link.edit")}function i(){var a="";b.opts.linkEditButtons.length>1&&("A"==b.$el.get(0).tagName&&b.opts.linkEditButtons.indexOf("linkRemove")>=0&&b.opts.linkEditButtons.splice(b.opts.linkEditButtons.indexOf("linkRemove"),1),a='<div class="fr-buttons">'+b.button.buildList(b.opts.linkEditButtons)+"</div>");var c={buttons:a},e=b.popups.create("link.edit",c);return b.$wp&&b.$wp.on("scroll.link-edit",function(){d()&&b.popups.isVisible("link.edit")&&g(d())}),b.events.on("destroy",function(){b.$wp&&b.$wp.off("scroll.link-edit")}),e}function j(){}function k(){var c=b.popups.get("link.insert"),e=d();if(e){var f,g,h=a(e),i=c.find('input.fr-link-attr[type="text"]'),j=c.find('input.fr-link-attr[type="checkbox"]');for(f=0;f<i.length;f++)g=a(i[f]),g.val(h.attr(g.attr("name")||""));for(j.prop("checked",!1),f=0;f<j.length;f++)g=a(j[f]),h.attr(g.attr("name"))==g.data("checked")&&g.prop("checked",!0);c.find('input.fr-link-attr[type="text"][name="text"]').val(h.text())}else c.find('input.fr-link-attr[type="text"]').val(""),c.find('input.fr-link-attr[type="checkbox"]').prop("checked",!1),c.find('input.fr-link-attr[type="text"][name="text"]').val(b.selection.text());c.find("input.fr-link-attr").trigger("change");var k=b.image?b.image.get():null;k?c.find('.fr-link-attr[name="text"]').parent().hide():c.find('.fr-link-attr[name="text"]').parent().show()}function l(){var c=b.$tb.find('.fr-command[data-cmd="insertLink"]'),d=b.popups.get("link.insert");if(d||(d=m()),!d.hasClass("fr-active"))if(b.popups.refresh("link.insert"),b.popups.setContainer("link.insert",b.$tb||a(b.opts.scrollableContainer)),c.is(":visible")){var e=c.offset().left+c.outerWidth()/2,f=c.offset().top+(b.opts.toolbarBottom?10:c.outerHeight()-10);b.popups.show("link.insert",e,f,c.outerHeight())}else b.position.forSelection(d),b.popups.show("link.insert")}function m(){var a="";b.opts.linkInsertButtons.length>=1&&(a='<div class="fr-buttons">'+b.button.buildList(b.opts.linkInsertButtons)+"</div>");var c='<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="10" height="10" viewBox="0 0 32 32"><path d="M27 4l-15 15-7-7-5 5 12 12 20-20z" fill="#FFF"></path></svg>',e="",f=0;e='<div class="fr-link-insert-layer fr-layer fr-active" id="fr-link-insert-layer-'+b.id+'">',e+='<div class="fr-input-line"><input name="href" type="text" class="fr-link-attr" placeholder="URL" tabIndex="'+ ++f+'"></div>',b.opts.linkText&&(e+='<div class="fr-input-line"><input name="text" type="text" class="fr-link-attr" placeholder="'+b.language.translate("Text")+'" tabIndex="'+ ++f+'"></div>');for(var g in b.opts.linkAttributes){var h=b.opts.linkAttributes[g];e+='<div class="fr-input-line"><input name="'+g+'" type="text" class="fr-link-attr" placeholder="'+b.language.translate(h)+'" tabIndex="'+ ++f+'"></div>'}b.opts.linkAlwaysBlank||(e+='<div class="fr-checkbox-line"><span class="fr-checkbox"><input name="target" class="fr-link-attr" data-checked="_blank" type="checkbox" id="fr-link-target-'+b.id+'" tabIndex="'+ ++f+'"><span>'+c+'</span></span><label for="fr-link-target-'+b.id+'">'+b.language.translate("Open in new tab")+"</label></div>"),e+='<div class="fr-action-buttons"><button class="fr-command fr-submit" data-cmd="linkInsert" href="#" tabIndex="'+ ++f+'" type="button">'+b.language.translate("Insert")+"</button></div></div>";var i={buttons:a,input_layer:e},l=b.popups.create("link.insert",i);return b.popups.onRefresh("link.insert",k),b.popups.onHide("link.insert",j),b.$wp&&b.$wp.on("scroll.link-insert",function(){var a=b.image?b.image.get():null;a&&b.popups.isVisible("link.insert")&&v(),d&&b.popups.isVisible("link.insert")&&t()}),b.events.on("destroy",function(){b.$wp&&b.$wp.off("scroll.link-insert")}),l}function n(){var c=d(),e=b.image?b.image.get():null;return b.events.trigger("link.beforeRemove",[c])===!1?!1:void(e&&c?(e.unwrap(),e.trigger("click")):c&&(b.selection.save(),a(c).replaceWith(a(c).html()),b.selection.restore(),h()))}function o(){b.events.on("keyup",function(b){b.which!=a.FroalaEditor.KEYCODE.ESC&&f(b)}),b.events.on("window.mouseup",f)}function p(c){var d,e,f=b.opts.linkList[c],g=b.popups.get("link.insert"),h=g.find('input.fr-link-attr[type="text"]'),i=g.find('input.fr-link-attr[type="checkbox"]');for(e=0;e<h.length;e++)d=a(h[e]),f[d.attr("name")]?d.val(f[d.attr("name")]):d.val("");for(e=0;e<i.length;e++)d=a(i[e]),d.prop("checked",d.data("checked")==f[d.attr("name")])}function q(){var c,d,e=b.popups.get("link.insert"),f=e.find('input.fr-link-attr[type="text"]'),g=e.find('input.fr-link-attr[type="checkbox"]'),h=f.filter('[name="href"]').val(),i=f.filter('[name="text"]').val(),j={};for(d=0;d<f.length;d++)c=a(f[d]),["href","text"].indexOf(c.attr("name"))<0&&(j[c.attr("name")]=c.val());for(d=0;d<g.length;d++)c=a(g[d]),c.is(":checked")?j[c.attr("name")]=c.data("checked"):j[c.attr("name")]=c.data("unchecked");var k=a(b.original_window).scrollTop();s(h,i,j),a(b.original_window).scrollTop(k)}function r(){if(!b.selection.isCollapsed()){b.selection.save();for(var c=b.$el.find(".fr-marker").addClass("fr-unprocessed").toArray();c.length;){var d=a(c.pop());d.removeClass("fr-unprocessed");var e=b.node.deepestParent(d.get(0));if(e){var f=d.get(0),g="",h="";do f=f.parentNode,b.node.isBlock(f)||(g+=b.node.closeTagString(f),h=b.node.openTagString(f)+h);while(f!=e);var i=b.node.openTagString(d.get(0))+d.html()+b.node.closeTagString(d.get(0));d.replaceWith('<span id="fr-break"></span>');var j=a(e).html();j=j.replace(/<span id="fr-break"><\/span>/g,g+i+h),a(e).html(j)}c=b.$el.find(".fr-marker.fr-unprocessed").toArray()}b.selection.restore()}}function s(c,g,h){"undefined"==typeof h&&(h={});var i=b.image?b.image.get():null;i||"A"==b.$el.get(0).tagName?"A"==b.$el.get(0).tagName&&b.$el.focus():(b.events.focus(!0),b.selection.restore());var j=c;if(b.opts.linkConvertEmailAddress){var k=/^[\w._]+@[a-zA-Z_]+?\.[a-zA-Z]{2,3}$/i;k.test(c)&&0!==c.indexOf("mailto:")&&(c="mailto:"+c)}if(0===c.indexOf("tel:")||0===c.indexOf("sms:")||0===c.indexOf("mailto:")||0===c.indexOf("data:image")||""===b.opts.linkAutoPrefix||/^(https?:|ftps?:|)\/\//.test(c)||(c=b.opts.linkAutoPrefix+c),c=b.helpers.sanitizeURL(c),b.opts.linkAlwaysBlank&&(h.target="_blank"),b.opts.linkAlwaysNoFollow&&(h.rel="nofollow"),g=g||"",c===b.opts.linkAutoPrefix){var l=b.popups.get("link.insert");return l.find('input[name="href"]').addClass("fr-error"),b.events.trigger("link.bad",[j]),!1}var m,n=d();if(n){m=a(n);var o=b.node.rawAttributes(n);for(var p in o)"class"!=p&&"style"!=p&&m.removeAttr(p);m.attr("href",c),g.length>0&&m.text()!=g&&!i&&m.text(g),i||m.prepend(a.FroalaEditor.START_MARKER).append(a.FroalaEditor.END_MARKER),m.attr(h),i||b.selection.restore()}else{i?i.wrap('<a href="'+c+'"></a>'):(b.document.execCommand("unlink",!1,!1),b.selection.isCollapsed()?(g=0===g.length?j:g,b.html.insert('<a href="'+c+'">'+a.FroalaEditor.START_MARKER+g+a.FroalaEditor.END_MARKER+"</a>"),b.selection.restore()):g.length>0&&g!=b.selection.text()?(b.selection.remove(),b.html.insert('<a href="'+c+'">'+a.FroalaEditor.START_MARKER+g+a.FroalaEditor.END_MARKER+"</a>"),b.selection.restore()):(r(),b.document.execCommand("createLink",!1,c)));for(var q=e(),s=0;s<q.length;s++)m=a(q[s]),m.attr(h),m.removeAttr("_moz_dirty");1==q.length&&b.$wp&&!i?(a(q[0]).prepend(a.FroalaEditor.START_MARKER).append(a.FroalaEditor.END_MARKER),b.selection.restore()):b.popups.hide("link.insert")}i?(i.trigger("touchstart"),i.trigger(b.helpers.isMobile()?"touchend":"click")):(b.popups.get("link.insert"),f())}function t(){h();var c=d();if(c){var e=b.popups.get("link.insert");e||(e=m()),b.popups.isVisible("link.insert")||(b.popups.refresh("link.insert"),b.selection.save(),b.helpers.isMobile()&&(b.events.disableBlur(),b.$el.blur(),b.events.enableBlur())),b.popups.setContainer("link.insert",a(b.opts.scrollableContainer));var f=(b.image?b.image.get():null)||a(c),g=f.offset().left+f.outerWidth()/2,i=f.offset().top+f.outerHeight();b.popups.show("link.insert",g,i,f.outerHeight())}}function u(){var a=b.image?b.image.get():null;if(a)a.trigger("click").trigger("touchend");else{b.events.disableBlur(),b.selection.restore(),b.events.enableBlur();var c=d();c&&b.$wp?(b.selection.restore(),h(),f()):"A"==b.$el.get(0).tagName?(b.$el.focus(),f()):(b.popups.hide("link.insert"),b.toolbar.showInline())}}function v(){var c=b.image?b.image.get():null;if(c){var d=b.popups.get("link.insert");d||(d=m()),k(!0),b.popups.setContainer("link.insert",a(b.opts.scrollableContainer));var e=c.offset().left+c.outerWidth()/2,f=c.offset().top+c.outerHeight();b.popups.show("link.insert",e,f,c.outerHeight())}}function w(c){var e=d();if(!e)return!1;if(!b.opts.linkMultipleStyles){var f=Object.keys(b.opts.linkStyles);f.splice(f.indexOf(c),1),a(e).removeClass(f.join(" "))}a(e).toggleClass(c)}return{_init:o,callback:c,remove:n,showInsertPopup:l,usePredefined:p,insertCallback:q,insert:s,update:t,get:d,allSelected:e,back:u,imageLink:v,applyStyle:w}},a.FroalaEditor.DefineIcon("insertLink",{NAME:"link"}),a.FroalaEditor.RegisterShortcut(75,"insertLink"),a.FroalaEditor.RegisterCommand("insertLink",{title:"Insert Link",undo:!1,focus:!0,refreshOnCallback:!1,popup:!0,callback:function(){this.popups.isVisible("link.insert")?(this.$el.find(".fr-marker")&&(this.events.disableBlur(),this.selection.restore()),this.popups.hide("link.insert")):this.link.showInsertPopup()}}),a.FroalaEditor.DefineIcon("linkOpen",{NAME:"external-link"}),a.FroalaEditor.RegisterCommand("linkOpen",{title:"Open Link",undo:!1,refresh:function(a){var b=this.link.get();b?a.removeClass("fr-hidden"):a.addClass("fr-hidden")},callback:function(){var a=this.link.get();a&&this.original_window.open(a.href)}}),a.FroalaEditor.DefineIcon("linkEdit",{NAME:"edit"}),a.FroalaEditor.RegisterCommand("linkEdit",{title:"Edit Link",undo:!1,refreshAfterCallback:!1,callback:function(){this.link.update()},refresh:function(a){var b=this.link.get();b?a.removeClass("fr-hidden"):a.addClass("fr-hidden")}}),a.FroalaEditor.DefineIcon("linkRemove",{NAME:"unlink"}),a.FroalaEditor.RegisterCommand("linkRemove",{title:"Unlink",callback:function(){this.link.remove()},refresh:function(a){var b=this.link.get();b?a.removeClass("fr-hidden"):a.addClass("fr-hidden")}}),a.FroalaEditor.DefineIcon("linkBack",{NAME:"arrow-left"}),a.FroalaEditor.RegisterCommand("linkBack",{title:"Back",undo:!1,focus:!1,back:!0,refreshAfterCallback:!1,callback:function(){this.link.back()},refresh:function(a){var b=this.link.get(),c=this.image?this.image.get():null;c||b||this.opts.toolbarInline?(a.removeClass("fr-hidden"),a.next(".fr-separator").removeClass("fr-hidden")):(a.addClass("fr-hidden"),a.next(".fr-separator").addClass("fr-hidden"))}}),a.FroalaEditor.DefineIcon("linkList",{NAME:"search"}),a.FroalaEditor.RegisterCommand("linkList",{title:"Choose Link",type:"dropdown",focus:!1,undo:!1,refreshAfterCallback:!1,html:function(){for(var a='<ul class="fr-dropdown-list">',b=this.opts.linkList,c=0;c<b.length;c++)a+='<li><a class="fr-command" data-cmd="linkList" data-param1="'+c+'">'+(b[c].displayText||b[c].text)+"</a></li>";return a+="</ul>"},callback:function(a,b){this.link.usePredefined(b)}}),a.FroalaEditor.RegisterCommand("linkInsert",{focus:!1,refreshAfterCallback:!1,callback:function(){this.link.insertCallback()},refresh:function(a){var b=this.link.get();b?a.text(this.language.translate("Update")):a.text(this.language.translate("Insert"))}}),a.FroalaEditor.DefineIcon("imageLink",{NAME:"link"}),a.FroalaEditor.RegisterCommand("imageLink",{title:"Insert Link",undo:!1,focus:!1,callback:function(){this.link.imageLink()},refresh:function(a){var b,c=this.link.get();c?(b=a.prev(),b.hasClass("fr-separator")&&b.removeClass("fr-hidden"),a.addClass("fr-hidden")):(b=a.prev(),b.hasClass("fr-separator")&&b.addClass("fr-hidden"),a.removeClass("fr-hidden"))}}),a.FroalaEditor.DefineIcon("linkStyle",{NAME:"magic"}),a.FroalaEditor.RegisterCommand("linkStyle",{title:"Style",type:"dropdown",html:function(){var a='<ul class="fr-dropdown-list">',b=this.opts.linkStyles;for(var c in b)a+='<li><a class="fr-command" data-cmd="linkStyle" data-param1="'+c+'">'+this.language.translate(b[c])+"</a></li>";return a+="</ul>"},callback:function(a,b){this.link.applyStyle(b)},refreshOnShow:function(b,c){var d=this.link.get();if(d){var e=a(d);c.find(".fr-command").each(function(){var b=a(this).data("param1");a(this).toggleClass("fr-active",e.hasClass(b))})}}})}); |
/*! | ||
* froala_editor v2.0.3 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v2.0.4 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2015 Froala Labs |
/*! | ||
* froala_editor v2.0.3 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v2.0.4 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2015 Froala Labs |
/*! | ||
* froala_editor v2.0.3 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v2.0.4 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2015 Froala Labs |
/*! | ||
* froala_editor v2.0.3 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v2.0.4 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2015 Froala Labs |
/*! | ||
* froala_editor v2.0.3 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v2.0.4 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2015 Froala Labs |
/*! | ||
* froala_editor v2.0.3 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v2.0.4 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2015 Froala Labs |
/*! | ||
* froala_editor v2.0.3 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v2.0.4 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2015 Froala Labs |
/*! | ||
* froala_editor v2.0.3 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v2.0.4 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2015 Froala Labs |
@@ -18,3 +18,3 @@ { | ||
], | ||
"version": "2.0.3", | ||
"version": "2.0.4-1", | ||
"description": "A beautiful jQuery WYSIWYG HTML rich text editor. High performance and modern design make it easy to use for developers and loved by users.", | ||
@@ -21,0 +21,0 @@ "homepage": "https://www.froala.com/wysiwyg-editor", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1982933
13701
27