From 308117e3308d3c2e3a3a5d68b4614eba665d4c3f Mon Sep 17 00:00:00 2001 From: Alex-D Date: Sun, 10 Apr 2016 23:41:33 +0200 Subject: [PATCH] build: v2.0.0 --- dist/langs/fr.min.js | 2 +- dist/plugins/colors/trumbowyg.colors.js | 6 ++-- dist/plugins/colors/trumbowyg.colors.min.js | 2 +- .../colors/ui/sass/trumbowyg.colors.scss | 2 +- dist/plugins/colors/ui/trumbowyg.colors.css | 2 +- .../colors/ui/trumbowyg.colors.min.css | 2 +- dist/plugins/noembed/trumbowyg.noembed.js | 3 +- dist/plugins/noembed/trumbowyg.noembed.min.js | 2 +- dist/trumbowyg.js | 28 +++++++++++++--- dist/trumbowyg.min.js | 4 +-- dist/ui/icons.svg | 2 +- dist/ui/sass/trumbowyg.scss | 28 ++++++++-------- dist/ui/trumbowyg.css | 32 +++++++++++-------- dist/ui/trumbowyg.min.css | 4 +-- 14 files changed, 71 insertions(+), 48 deletions(-) diff --git a/dist/langs/fr.min.js b/dist/langs/fr.min.js index 3232ce8c0..cb112235c 100644 --- a/dist/langs/fr.min.js +++ b/dist/langs/fr.min.js @@ -7,4 +7,4 @@ * Twitter : @AlexandreDemode * Website : alex-d.fr */ -jQuery.trumbowyg.langs.fr={viewHTML:"Voir le HTML",formatting:"Format",p:"Paragraphe",blockquote:"Citation",code:"Code",header:"Titre",bold:"Gras",italic:"Italique",strikethrough:"Rayé",underline:"Souligné",strong:"Fort",em:"Emphase",del:"Supprimé",superscript:"Exposant",subscript:"Indice",unorderedList:"Liste à puces",orderedList:"Liste ordonnée",insertImage:"Insérer une image",insertVideo:"Insérer une video",link:"Lien",createLink:"Insérer un lien",unlink:"Supprimer le lien",justifyLeft:"Aligner à gauche",justifyCenter:"Centrer",justifyRight:"Aligner à droite",justifyFull:"Justifier",horizontalRule:"Insérer un séparateur horizontal",fullscreen:"Plein écran",close:"Fermer",submit:"Valider",reset:"Annuler",required:"Obligatoire",description:"Description",title:"Titre",text:"Texte",target:"Cible"}; \ No newline at end of file +jQuery.trumbowyg.langs.fr={viewHTML:"Voir le HTML",undo:"Annuler",redo:"Refaire",formatting:"Format",p:"Paragraphe",blockquote:"Citation",code:"Code",header:"Titre",bold:"Gras",italic:"Italique",strikethrough:"Rayé",underline:"Souligné",strong:"Fort",em:"Emphase",del:"Supprimé",superscript:"Exposant",subscript:"Indice",unorderedList:"Liste à puces",orderedList:"Liste ordonnée",insertImage:"Insérer une image",insertVideo:"Insérer une video",link:"Lien",createLink:"Insérer un lien",unlink:"Supprimer le lien",justifyLeft:"Aligner à gauche",justifyCenter:"Centrer",justifyRight:"Aligner à droite",justifyFull:"Justifier",horizontalRule:"Insérer un séparateur horizontal",fullscreen:"Plein écran",close:"Fermer",submit:"Valider",reset:"Annuler",required:"Obligatoire",description:"Description",title:"Titre",text:"Texte",target:"Cible"}; \ No newline at end of file diff --git a/dist/plugins/colors/trumbowyg.colors.js b/dist/plugins/colors/trumbowyg.colors.js index bc2add856..1e87c0cb6 100644 --- a/dist/plugins/colors/trumbowyg.colors.js +++ b/dist/plugins/colors/trumbowyg.colors.js @@ -137,8 +137,8 @@ // add free color btn var freeColorButtonName = fn + 'Free', freeColorBtnDef = { - fn: function (params, tbw) { - tbw.openModalInsert(tbw.lang[fn], + fn: function () { + trumbowyg.openModalInsert(trumbowyg.lang[fn], { color: { label: fn, @@ -147,7 +147,7 @@ }, // callback function (values) { - tbw.execCmd(fn, values.color); + trumbowyg.execCmd(fn, values.color); return true; } ); diff --git a/dist/plugins/colors/trumbowyg.colors.min.js b/dist/plugins/colors/trumbowyg.colors.min.js index d27bcb233..e4eff9cb4 100644 --- a/dist/plugins/colors/trumbowyg.colors.min.js +++ b/dist/plugins/colors/trumbowyg.colors.min.js @@ -1 +1 @@ -!function(o){"use strict";function r(o){return("0"+parseInt(o).toString(16)).slice(-2)}function e(o){return-1===o.search("rgb")?o.replace("#",""):"rgba(0, 0, 0, 0)"===o?"transparent":(o=o.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+))?\)$/),r(o[1])+r(o[2])+r(o[3]))}function f(o,r){var f=[];if(""!==o.style.backgroundColor){var c=e(o.style.backgroundColor);r.o.plugins.colors.colorList.indexOf(c)>=0?f.push("backColor"+c):f.push("backColorFree")}var a;return""!==o.style.color?a=e(o.style.color):o.hasAttribute("color")&&(a=e(o.getAttribute("color"))),a&&(r.o.plugins.colors.colorList.indexOf(a)>=0?f.push("foreColor"+a):f.push("foreColorFree")),f}function c(r,e){var f=[];o.each(e.o.plugins.colors.colorList,function(o,c){var a=r+c,d={fn:r,forceCss:!0,param:"#"+c,style:"background-color: #"+c+";"};e.addBtnDef(a,d),f.push(a)});var c=r+"Remove",a={fn:"removeFormat",param:r,style:"background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAG0lEQVQIW2NkQAAfEJMRmwBYhoGBYQtMBYoAADziAp0jtJTgAAAAAElFTkSuQmCC);"};e.addBtnDef(c,a),f.push(c);var d=r+"Free",t={fn:function(o,e){e.openModalInsert(e.lang[r],{color:{label:r,value:"#FFFFFF"}},function(o){return e.execCmd(r,o.color),!0})},text:"#",style:"text-indent: 0;line-height: 20px;padding: 0 5px;"};return e.addBtnDef(d,t),f.push(d),f}o.extend(!0,o.trumbowyg,{langs:{cs:{foreColor:"Barva textu",backColor:"Barva pozadí"},en:{foreColor:"Text color",backColor:"Background color"},fr:{foreColor:"Couleur du texte",backColor:"Couleur de fond"},sk:{foreColor:"Farba textu",backColor:"Farba pozadia"},zh_cn:{foreColor:"文字颜色",backColor:"背景颜色"}}});var a={colorList:["ffffff","000000","eeece1","1f497d","4f81bd","c0504d","9bbb59","8064a2","4bacc6","f79646","ffff00","f2f2f2","7f7f7f","ddd9c3","c6d9f0","dbe5f1","f2dcdb","ebf1dd","e5e0ec","dbeef3","fdeada","fff2ca","d8d8d8","595959","c4bd97","8db3e2","b8cce4","e5b9b7","d7e3bc","ccc1d9","b7dde8","fbd5b5","ffe694","bfbfbf","3f3f3f","938953","548dd4","95b3d7","d99694","c3d69b","b2a2c7","b7dde8","fac08f","f2c314","a5a5a5","262626","494429","17365d","366092","953734","76923c","5f497a","92cddc","e36c09","c09100","7f7f7f","0c0c0c","1d1b10","0f243e","244061","632423","4f6128","3f3151","31859b","974806","7f6000"]};o.extend(!0,o.trumbowyg,{plugins:{color:{init:function(r){r.o.plugins.colors=o.extend(!0,{},a,r.o.plugins.colors||{});var e={dropdown:c("foreColor",r)},f={dropdown:c("backColor",r)};r.addBtnDef("foreColor",e),r.addBtnDef("backColor",f)},tagHandler:f}}})}(jQuery); \ No newline at end of file +!function(o){"use strict";function r(o){return("0"+parseInt(o).toString(16)).slice(-2)}function e(o){return-1===o.search("rgb")?o.replace("#",""):"rgba(0, 0, 0, 0)"===o?"transparent":(o=o.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+))?\)$/),r(o[1])+r(o[2])+r(o[3]))}function f(o,r){var f=[];if(""!==o.style.backgroundColor){var c=e(o.style.backgroundColor);r.o.plugins.colors.colorList.indexOf(c)>=0?f.push("backColor"+c):f.push("backColorFree")}var a;return""!==o.style.color?a=e(o.style.color):o.hasAttribute("color")&&(a=e(o.getAttribute("color"))),a&&(r.o.plugins.colors.colorList.indexOf(a)>=0?f.push("foreColor"+a):f.push("foreColorFree")),f}function c(r,e){var f=[];o.each(e.o.plugins.colors.colorList,function(o,c){var a=r+c,d={fn:r,forceCss:!0,param:"#"+c,style:"background-color: #"+c+";"};e.addBtnDef(a,d),f.push(a)});var c=r+"Remove",a={fn:"removeFormat",param:r,style:"background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAG0lEQVQIW2NkQAAfEJMRmwBYhoGBYQtMBYoAADziAp0jtJTgAAAAAElFTkSuQmCC);"};e.addBtnDef(c,a),f.push(c);var d=r+"Free",t={fn:function(){e.openModalInsert(e.lang[r],{color:{label:r,value:"#FFFFFF"}},function(o){return e.execCmd(r,o.color),!0})},text:"#",style:"text-indent: 0;line-height: 20px;padding: 0 5px;"};return e.addBtnDef(d,t),f.push(d),f}o.extend(!0,o.trumbowyg,{langs:{cs:{foreColor:"Barva textu",backColor:"Barva pozadí"},en:{foreColor:"Text color",backColor:"Background color"},fr:{foreColor:"Couleur du texte",backColor:"Couleur de fond"},sk:{foreColor:"Farba textu",backColor:"Farba pozadia"},zh_cn:{foreColor:"文字颜色",backColor:"背景颜色"}}});var a={colorList:["ffffff","000000","eeece1","1f497d","4f81bd","c0504d","9bbb59","8064a2","4bacc6","f79646","ffff00","f2f2f2","7f7f7f","ddd9c3","c6d9f0","dbe5f1","f2dcdb","ebf1dd","e5e0ec","dbeef3","fdeada","fff2ca","d8d8d8","595959","c4bd97","8db3e2","b8cce4","e5b9b7","d7e3bc","ccc1d9","b7dde8","fbd5b5","ffe694","bfbfbf","3f3f3f","938953","548dd4","95b3d7","d99694","c3d69b","b2a2c7","b7dde8","fac08f","f2c314","a5a5a5","262626","494429","17365d","366092","953734","76923c","5f497a","92cddc","e36c09","c09100","7f7f7f","0c0c0c","1d1b10","0f243e","244061","632423","4f6128","3f3151","31859b","974806","7f6000"]};o.extend(!0,o.trumbowyg,{plugins:{color:{init:function(r){r.o.plugins.colors=o.extend(!0,{},a,r.o.plugins.colors||{});var e={dropdown:c("foreColor",r)},f={dropdown:c("backColor",r)};r.addBtnDef("foreColor",e),r.addBtnDef("backColor",f)},tagHandler:f}}})}(jQuery); \ No newline at end of file diff --git a/dist/plugins/colors/ui/sass/trumbowyg.colors.scss b/dist/plugins/colors/ui/sass/trumbowyg.colors.scss index 1fda35905..0ad7ad1d8 100644 --- a/dist/plugins/colors/ui/sass/trumbowyg.colors.scss +++ b/dist/plugins/colors/ui/sass/trumbowyg.colors.scss @@ -1,5 +1,5 @@ /** - * Trumbowyg v2.0.0-beta.8 - A lightweight WYSIWYG editor + * Trumbowyg v2.0.0 - A lightweight WYSIWYG editor * Colors plugin stylesheet for Trumbowyg editor * ------------------------ * @link http://alex-d.github.io/Trumbowyg diff --git a/dist/plugins/colors/ui/trumbowyg.colors.css b/dist/plugins/colors/ui/trumbowyg.colors.css index e3dcad513..07a957d83 100644 --- a/dist/plugins/colors/ui/trumbowyg.colors.css +++ b/dist/plugins/colors/ui/trumbowyg.colors.css @@ -1,5 +1,5 @@ /** - * Trumbowyg v2.0.0-beta.8 - A lightweight WYSIWYG editor + * Trumbowyg v2.0.0 - A lightweight WYSIWYG editor * Colors plugin stylesheet for Trumbowyg editor * ------------------------ * @link http://alex-d.github.io/Trumbowyg diff --git a/dist/plugins/colors/ui/trumbowyg.colors.min.css b/dist/plugins/colors/ui/trumbowyg.colors.min.css index 0511d8e3e..638c2489c 100644 --- a/dist/plugins/colors/ui/trumbowyg.colors.min.css +++ b/dist/plugins/colors/ui/trumbowyg.colors.min.css @@ -1,2 +1,2 @@ -/** Trumbowyg v2.0.0-beta.8 - A lightweight WYSIWYG editor - alex-d.github.io/Trumbowyg - License MIT - Author : Alexandre Demode (Alex-D) / alex-d.fr */ +/** Trumbowyg v2.0.0 - A lightweight WYSIWYG editor - alex-d.github.io/Trumbowyg - License MIT - Author : Alexandre Demode (Alex-D) / alex-d.fr */ .trumbowyg-dropdown-backColor,.trumbowyg-dropdown-foreColor{width:276px;padding:7px 5px}.trumbowyg-dropdown-backColor svg,.trumbowyg-dropdown-foreColor svg{display:none!important}.trumbowyg-dropdown-backColor button,.trumbowyg-dropdown-foreColor button{display:block;position:relative;float:left;text-indent:-9999px;height:20px;width:20px;border:1px solid #333;padding:0;margin:2px}.trumbowyg-dropdown-backColor button:focus::after,.trumbowyg-dropdown-backColor button:hover::after,.trumbowyg-dropdown-foreColor button:focus::after,.trumbowyg-dropdown-foreColor button:hover::after{content:" ";display:block;position:absolute;top:-5px;left:-5px;height:27px;width:27px;background:inherit;border:1px solid #FFF;box-shadow:#000 0 0 2px;z-index:10} \ No newline at end of file diff --git a/dist/plugins/noembed/trumbowyg.noembed.js b/dist/plugins/noembed/trumbowyg.noembed.js index 8eabe8050..7d2c58806 100644 --- a/dist/plugins/noembed/trumbowyg.noembed.js +++ b/dist/plugins/noembed/trumbowyg.noembed.js @@ -85,8 +85,7 @@ }); } ); - }, - ico: 'insertImage' + } }; trumbowyg.addBtnDef('noembed', btnDef); diff --git a/dist/plugins/noembed/trumbowyg.noembed.min.js b/dist/plugins/noembed/trumbowyg.noembed.min.js index f00f67781..e97ebc053 100644 --- a/dist/plugins/noembed/trumbowyg.noembed.min.js +++ b/dist/plugins/noembed/trumbowyg.noembed.min.js @@ -1 +1 @@ -!function(e){"use strict";var n={proxy:"https://noembed.com/embed?nowrap=on",urlFiled:"url",data:[],success:void 0,error:void 0};e.extend(!0,e.trumbowyg,{langs:{en:{noembed:"noEmbed",noembedError:"Error"},sk:{noembedError:"Chyba"},fr:{noembed:"noEmbed",noembedError:"Erreur"},cs:{noembedError:"Chyba"}},plugins:{noembed:{init:function(o){o.o.plugins.noembed=e.extend(!0,{},n,o.o.plugins.noembed||{});var r={fn:function(){var n=o.openModalInsert(o.lang.noembed,{url:{label:"URL",required:!0}},function(r){e.ajax({url:o.o.plugins.noembed.proxy,type:"GET",data:r,cache:!1,dataType:"json",success:o.o.plugins.noembed.success||function(r){r.html?(o.execCmd("insertHTML",e(r.html).unwrap().html()),setTimeout(function(){o.closeModal()},250)):o.addErrorOnModalField(e("input[type=text]",n),r.error)},error:o.o.plugins.noembed.error||function(){o.addErrorOnModalField(e("input[type=text]",n),o.lang.noembedError)}})})},ico:"insertImage"};o.addBtnDef("noembed",r)}}}})}(jQuery); \ No newline at end of file +!function(e){"use strict";var n={proxy:"https://noembed.com/embed?nowrap=on",urlFiled:"url",data:[],success:void 0,error:void 0};e.extend(!0,e.trumbowyg,{langs:{en:{noembed:"noEmbed",noembedError:"Error"},sk:{noembedError:"Chyba"},fr:{noembed:"noEmbed",noembedError:"Erreur"},cs:{noembedError:"Chyba"}},plugins:{noembed:{init:function(o){o.o.plugins.noembed=e.extend(!0,{},n,o.o.plugins.noembed||{});var r={fn:function(){var n=o.openModalInsert(o.lang.noembed,{url:{label:"URL",required:!0}},function(r){e.ajax({url:o.o.plugins.noembed.proxy,type:"GET",data:r,cache:!1,dataType:"json",success:o.o.plugins.noembed.success||function(r){r.html?(o.execCmd("insertHTML",e(r.html).unwrap().html()),setTimeout(function(){o.closeModal()},250)):o.addErrorOnModalField(e("input[type=text]",n),r.error)},error:o.o.plugins.noembed.error||function(){o.addErrorOnModalField(e("input[type=text]",n),o.lang.noembedError)}})})}};o.addBtnDef("noembed",r)}}}})}(jQuery); \ No newline at end of file diff --git a/dist/trumbowyg.js b/dist/trumbowyg.js index 00da39897..5ea905238 100644 --- a/dist/trumbowyg.js +++ b/dist/trumbowyg.js @@ -1,5 +1,5 @@ /** - * Trumbowyg v2.0.0-beta.8 - A lightweight WYSIWYG editor + * Trumbowyg v2.0.0 - A lightweight WYSIWYG editor * Trumbowyg core file * ------------------------ * @link http://alex-d.github.io/Trumbowyg @@ -14,6 +14,9 @@ jQuery.trumbowyg = { en: { viewHTML: 'View HTML', + undo: 'Undo', + redo: 'Redo', + formatting: 'Formatting', p: 'Paragraph', blockquote: 'Quote', @@ -190,12 +193,24 @@ jQuery.trumbowyg = { * title: this.lang.foo * } */ - var h = t.lang.header; // Header translation + var h = t.lang.header, // Header translation + isBlinkFunction = function () { + return (window.chrome || (window.Intl && Intl.v8BreakIterator)) && 'CSS' in window; + }; t.btnsDef = { viewHTML: { fn: 'toggle' }, + undo: { + isSupported: isBlinkFunction, + key: 'Z' + }, + redo: { + isSupported: isBlinkFunction, + key: 'Y' + }, + p: { fn: 'formatBlock' }, @@ -331,6 +346,7 @@ jQuery.trumbowyg = { }, btns: [ ['viewHTML'], + ['undo', 'redo'], ['formatting'], 'btnGrp-semantic', ['superscript', 'subscript'], @@ -426,7 +442,9 @@ jQuery.trumbowyg = { t.buildOverlay(); - t.$c.trigger('tbwinit'); + setTimeout(function () { + t.$c.trigger('tbwinit'); + }); }, addBtnDef: function (btnName, btnDef) { @@ -732,7 +750,7 @@ jQuery.trumbowyg = { // Check if button is supported isSupportedBtn: function (b) { try { - return this.o.btnsDef[b].isSupported(); + return this.btnsDef[b].isSupported(); } catch (c) { } return true; @@ -1144,7 +1162,7 @@ jQuery.trumbowyg = { cmd(param); } catch (e2) { if (cmd === 'insertHorizontalRule') { - param = null; + param = undefined; } else if (cmd === 'formatBlock' && (navigator.userAgent.indexOf('MSIE') !== -1 || navigator.appVersion.indexOf('Trident/') !== -1)) { param = '<' + param + '>'; } diff --git a/dist/trumbowyg.min.js b/dist/trumbowyg.min.js index 91b152703..a787f9534 100644 --- a/dist/trumbowyg.min.js +++ b/dist/trumbowyg.min.js @@ -1,2 +1,2 @@ -/** Trumbowyg v2.0.0-beta.8 - A lightweight WYSIWYG editor - alex-d.github.io/Trumbowyg - License MIT - Author : Alexandre Demode (Alex-D) / alex-d.fr */ -jQuery.trumbowyg={langs:{en:{viewHTML:"View HTML",formatting:"Formatting",p:"Paragraph",blockquote:"Quote",code:"Code",header:"Header",bold:"Bold",italic:"Italic",strikethrough:"Stroke",underline:"Underline",strong:"Strong",em:"Emphasis",del:"Deleted",superscript:"Superscript",subscript:"Subscript",unorderedList:"Unordered list",orderedList:"Ordered list",insertImage:"Insert Image",link:"Link",createLink:"Insert link",unlink:"Remove link",justifyLeft:"Align Left",justifyCenter:"Align Center",justifyRight:"Align Right",justifyFull:"Align Justify",horizontalRule:"Insert horizontal rule",removeformat:"Remove format",fullscreen:"Fullscreen",close:"Close",submit:"Confirm",reset:"Cancel",required:"Required",description:"Description",title:"Title",text:"Text",target:"Target"}},plugins:{}},function(e,t,n,a){"use strict";a.fn.trumbowyg=function(e,t){var n="trumbowyg";if(e===Object(e)||!e)return this.each(function(){a(this).data(n)||a(this).data(n,new o(this,e))});if(1===this.length)try{var r=a(this).data(n);switch(e){case"execCmd":return r.execCmd(t.cmd,t.param,t.forceCss);case"openModal":return r.openModal(t.title,t.content);case"closeModal":return r.closeModal();case"openModalInsert":return r.openModalInsert(t.title,t.fields,t.callback);case"saveRange":return r.saveRange();case"getRange":return r.range;case"getRangeText":return r.getRangeText();case"restoreRange":return r.restoreRange();case"destroy":return r.destroy();case"empty":return r.empty();case"html":return r.html(t)}}catch(i){}return!1};var o=function(e,t){var o=this,r="trumbowyg-icons";if(o.doc=e.ownerDocument||n,o.$ta=a(e),o.$c=a(e),t=t||{},null!=t.lang||null!=a.trumbowyg.langs[t.lang]?o.lang=a.extend(!0,{},a.trumbowyg.langs.en,a.trumbowyg.langs[t.lang]):o.lang=a.trumbowyg.langs.en,0===a("#"+r,o.doc).length){var i=t.svgPath;if(null==i)try{throw new Error}catch(s){var l=s.stack.split("\n");for(var d in l)if(l[d].match(/http[s]?:\/\//)){i=l[Number(d)].match(/((http[s]?:\/\/.+\/)([^\/]+\.js)):/)[1].split("/"),i.pop(),i=i.join("/")+"/ui/icons.svg";break}}var c=o.doc.createElement("div");c.id=r,o.doc.body.insertBefore(c,o.doc.body.childNodes[0]),a.get(i,function(e){c.innerHTML=(new XMLSerializer).serializeToString(e.documentElement)})}var u=o.lang.header;o.btnsDef={viewHTML:{fn:"toggle"},p:{fn:"formatBlock"},blockquote:{fn:"formatBlock"},h1:{fn:"formatBlock",title:u+" 1"},h2:{fn:"formatBlock",title:u+" 2"},h3:{fn:"formatBlock",title:u+" 3"},h4:{fn:"formatBlock",title:u+" 4"},subscript:{tag:"sub"},superscript:{tag:"sup"},bold:{key:"B"},italic:{key:"I"},underline:{tag:"u"},strikethrough:{tag:"strike"},strong:{fn:"bold",key:"B"},em:{fn:"italic",key:"I"},del:{fn:"strikethrough"},createLink:{key:"K",tag:"a"},unlink:{},insertImage:{},justifyLeft:{tag:"left",forceCss:!0},justifyCenter:{tag:"center",forceCss:!0},justifyRight:{tag:"right",forceCss:!0},justifyFull:{tag:"justify",forceCss:!0},unorderedList:{fn:"insertUnorderedList",tag:"ul"},orderedList:{fn:"insertOrderedList",tag:"ol"},horizontalRule:{fn:"insertHorizontalRule"},removeformat:{},fullscreen:{"class":"trumbowyg-not-disable"},close:{fn:"destroy","class":"trumbowyg-not-disable"},formatting:{dropdown:["p","blockquote","h1","h2","h3","h4"],ico:"p"},link:{dropdown:["createLink","unlink"]}},o.o=a.extend(!0,{},{lang:"en",fixedBtnPane:!1,fixedFullWidth:!1,autogrow:!1,prefix:"trumbowyg-",semantic:!0,resetCss:!1,removeformatPasted:!1,tagsToRemove:[],btnsGrps:{design:["bold","italic","underline","strikethrough"],semantic:["strong","em","del"],justify:["justifyLeft","justifyCenter","justifyRight","justifyFull"],lists:["unorderedList","orderedList"]},btns:[["viewHTML"],["formatting"],"btnGrp-semantic",["superscript","subscript"],["link"],["insertImage"],"btnGrp-justify","btnGrp-lists",["horizontalRule"],["removeformat"],["fullscreen"]],btnsDef:{},inlineElementsSelector:"a,abbr,acronym,b,caption,cite,code,col,dfn,dir,dt,dd,em,font,hr,i,kbd,li,q,span,strikeout,strong,sub,sup,u",pasteHandlers:[],imgDblClickHandler:function(){var e=a(this),t=e.attr("src"),n="(Base64)";return 0===t.indexOf("data:image")&&(t=n),o.openModalInsert(o.lang.insertImage,{url:{label:"URL",value:t,required:!0},alt:{label:o.lang.description,value:e.attr("alt")}},function(t){return t.src!==n&&e.attr({src:t.src}),e.attr({alt:t.alt}),!0}),!1},plugins:{}},t),t.btns?o.o.btns=t.btns:o.o.semantic||(o.o.btns[4]="btnGrp-design"),a.each(o.o.btnsDef,function(e,t){o.addBtnDef(e,t)}),o.keys=[],o.tagToButton={},o.tagHandlers=[],o.pasteHandlers=[].concat(o.o.pasteHandlers),o.init()};o.prototype={init:function(){var e=this;e.height=e.$ta.height(),e.initPlugins(),e.doc.execCommand("enableObjectResizing",!1,!1),e.doc.execCommand("defaultParagraphSeparator",!1,"p"),e.buildEditor(),e.buildBtnPane(),e.fixedBtnPaneEvents(),e.buildOverlay(),e.$c.trigger("tbwinit")},addBtnDef:function(e,t){this.btnsDef[e]=t},buildEditor:function(){var e=this,n=e.o.prefix,o="";e.$box=a("
",{"class":n+"box "+n+"editor-visible "+n+e.o.lang+" trumbowyg"}),e.isTextarea=e.$ta.is("textarea"),e.isTextarea?(o=e.$ta.val(),e.$ed=a("
"),e.$box.insertAfter(e.$ta).append(e.$ed,e.$ta)):(e.$ed=e.$ta,o=e.$ed.html(),e.$ta=a("