diff --git a/dist/langs/de.js b/dist/langs/de.js index 4af424afd..8afc2e210 100644 --- a/dist/langs/de.js +++ b/dist/langs/de.js @@ -10,7 +10,7 @@ jQuery.trumbowyg.langs.de = { viewHTML: 'HTML anzeigen', - formatting: 'Formatieren', + formatting: 'Formatierung', p: 'Absatz', blockquote: 'Zitat', code: 'Code', @@ -41,8 +41,8 @@ jQuery.trumbowyg.langs.de = { justifyFull: 'Blocksatz', horizontalRule: 'Horizontale Linie einfügen', - removeformat: 'Format entfernen', - + removeformat: 'Formatierung entfernen', + fullscreen: 'Vollbild', close: 'Schließen', diff --git a/dist/langs/de.min.js b/dist/langs/de.min.js index f0f0d91c2..37f7fbbfe 100644 --- a/dist/langs/de.min.js +++ b/dist/langs/de.min.js @@ -6,4 +6,4 @@ * Author : Manfred Timm * Github : https://github.com/Manfred62 */ -jQuery.trumbowyg.langs.de={viewHTML:"HTML anzeigen",formatting:"Formatieren",p:"Absatz",blockquote:"Zitat",code:"Code",header:"Überschrift",bold:"Fett",italic:"Kursiv",strikethrough:"Durchgestrichen",underline:"Unterstrichen",strong:"Wichtig",em:"Betont",del:"Gelöscht",unorderedList:"Ungeordnete Liste",orderedList:"Geordnete Liste",image:"Bild",insertImage:"Bild einfügen",insertVideo:"Video einfügen",link:"Link",createLink:"Link einfügen",unlink:"Link entfernen",justifyLeft:"Links ausrichten",justifyCenter:"Zentrieren",justifyRight:"Rechts ausrichten",justifyFull:"Blocksatz",horizontalRule:"Horizontale Linie einfügen",removeformat:"Format entfernen",fullscreen:"Vollbild",close:"Schließen",submit:"Bestätigen",reset:"Abbrechen",required:"Erforderlich",description:"Beschreibung",title:"Titel",text:"Text"}; \ No newline at end of file +jQuery.trumbowyg.langs.de={viewHTML:"HTML anzeigen",formatting:"Formatierung",p:"Absatz",blockquote:"Zitat",code:"Code",header:"Überschrift",bold:"Fett",italic:"Kursiv",strikethrough:"Durchgestrichen",underline:"Unterstrichen",strong:"Wichtig",em:"Betont",del:"Gelöscht",unorderedList:"Ungeordnete Liste",orderedList:"Geordnete Liste",image:"Bild",insertImage:"Bild einfügen",insertVideo:"Video einfügen",link:"Link",createLink:"Link einfügen",unlink:"Link entfernen",justifyLeft:"Links ausrichten",justifyCenter:"Zentrieren",justifyRight:"Rechts ausrichten",justifyFull:"Blocksatz",horizontalRule:"Horizontale Linie einfügen",removeformat:"Formatierung entfernen",fullscreen:"Vollbild",close:"Schließen",submit:"Bestätigen",reset:"Abbrechen",required:"Erforderlich",description:"Beschreibung",title:"Titel",text:"Text"}; \ No newline at end of file diff --git a/dist/langs/ru.js b/dist/langs/ru.js index 9388007af..8c483ba14 100644 --- a/dist/langs/ru.js +++ b/dist/langs/ru.js @@ -1,6 +1,6 @@ /* =========================================================== * ru.js - * Russion translation for Trumbowyg + * Russian translation for Trumbowyg * http://alex-d.github.com/Trumbowyg * =========================================================== * Author : Yuri Lya diff --git a/dist/langs/ru.min.js b/dist/langs/ru.min.js index a8feee2a8..d20d8d134 100644 --- a/dist/langs/ru.min.js +++ b/dist/langs/ru.min.js @@ -1,6 +1,6 @@ /* =========================================================== * ru.js - * Russion translation for Trumbowyg + * Russian translation for Trumbowyg * http://alex-d.github.com/Trumbowyg * =========================================================== * Author : Yuri Lya diff --git a/dist/langs/th.js b/dist/langs/th.js index 5d51eedd1..90db2e06a 100644 --- a/dist/langs/th.js +++ b/dist/langs/th.js @@ -7,7 +7,7 @@ * Github : https://github.com/gonateek */ -jQuery.trumbowyg.langs.de = { +jQuery.trumbowyg.langs.th = { viewHTML: 'ดู HTML', formatting: 'จัดรูปแบบ', diff --git a/dist/langs/th.min.js b/dist/langs/th.min.js index c4a6e4ce2..14bee1266 100644 --- a/dist/langs/th.min.js +++ b/dist/langs/th.min.js @@ -6,4 +6,4 @@ * Author : Gonatee Klanktong * Github : https://github.com/gonateek */ -jQuery.trumbowyg.langs.de={viewHTML:"ดู HTML",formatting:"จัดรูปแบบ",p:"ย่อหน้า",blockquote:"อ้างอิง",code:"โค๊ด",header:"ส่วนหัว",bold:"หนา",italic:"เอียง",strikethrough:"ขีดทับ",underline:"เส้นใต้",strong:"สำคัญ",em:"เน้น",del:"ลบ",unorderedList:"รายการ",orderedList:"รายการ(ตัวเลข)",insertImage:"ใส่รูป",insertVideo:"ใส่วิดีโอ",link:"ลิงค์",createLink:"สร้างลิงค์",unlink:"ยกเลิกลิงค์",justifyLeft:"ชิดซ้าย",justifyCenter:"กลาง",justifyRight:"ชิดขวา",justifyFull:"เต็มบรรทัด",horizontalRule:"เส้นแนวนอน",fullscreen:"เต็มหน้าจอ",close:"ปิด",submit:"ตกลง",reset:"เริ่มใหม่",required:"จำเป็น",description:"คำอธิบาย",title:"หัวเรื่อง",text:"ข้อความ"}; \ No newline at end of file +jQuery.trumbowyg.langs.th={viewHTML:"ดู HTML",formatting:"จัดรูปแบบ",p:"ย่อหน้า",blockquote:"อ้างอิง",code:"โค๊ด",header:"ส่วนหัว",bold:"หนา",italic:"เอียง",strikethrough:"ขีดทับ",underline:"เส้นใต้",strong:"สำคัญ",em:"เน้น",del:"ลบ",unorderedList:"รายการ",orderedList:"รายการ(ตัวเลข)",insertImage:"ใส่รูป",insertVideo:"ใส่วิดีโอ",link:"ลิงค์",createLink:"สร้างลิงค์",unlink:"ยกเลิกลิงค์",justifyLeft:"ชิดซ้าย",justifyCenter:"กลาง",justifyRight:"ชิดขวา",justifyFull:"เต็มบรรทัด",horizontalRule:"เส้นแนวนอน",fullscreen:"เต็มหน้าจอ",close:"ปิด",submit:"ตกลง",reset:"เริ่มใหม่",required:"จำเป็น",description:"คำอธิบาย",title:"หัวเรื่อง",text:"ข้อความ"}; \ 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 e6b1c4b6e..7d2d1a3da 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.18.0 - A lightweight WYSIWYG editor + * Trumbowyg v2.19.0 - A lightweight WYSIWYG editor * Default stylesheet for Trumbowyg editor plugin * ------------------------ * @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 d2a2e0067..f64798faa 100644 --- a/dist/plugins/colors/ui/trumbowyg.colors.css +++ b/dist/plugins/colors/ui/trumbowyg.colors.css @@ -1,5 +1,5 @@ /** - * Trumbowyg v2.18.0 - A lightweight WYSIWYG editor + * Trumbowyg v2.19.0 - A lightweight WYSIWYG editor * Trumbowyg plugin stylesheet * ------------------------ * @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 2d15f3723..bf4ffd402 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.18.0 - A lightweight WYSIWYG editor - alex-d.github.io/Trumbowyg - License MIT - Author : Alexandre Demode (Alex-D) / alex-d.fr */ +/** Trumbowyg v2.19.0 - A lightweight WYSIWYG editor - alex-d.github.io/Trumbowyg - License MIT - Author : Alexandre Demode (Alex-D) / alex-d.fr */ .trumbowyg-dropdown-backColor:not(.trumbowyg-dropdown--color-list),.trumbowyg-dropdown-foreColor:not(.trumbowyg-dropdown--color-list){max-width:276px;padding:7px 5px;overflow:initial}.trumbowyg-dropdown-backColor:not(.trumbowyg-dropdown--color-list) button,.trumbowyg-dropdown-foreColor:not(.trumbowyg-dropdown--color-list) 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:not(.trumbowyg-dropdown--color-list) button:focus::after,.trumbowyg-dropdown-backColor:not(.trumbowyg-dropdown--color-list) button:hover::after,.trumbowyg-dropdown-foreColor:not(.trumbowyg-dropdown--color-list) button:focus::after,.trumbowyg-dropdown-foreColor:not(.trumbowyg-dropdown--color-list) button:hover::after{content:" ";display:block;position:absolute;top:-5px;left:-5px;width:27px;height:27px;background:inherit;border:1px solid #fff;box-shadow:#000 0 0 2px;z-index:10}.trumbowyg-dropdown-backColor.trumbowyg-dropdown--color-list button:not(.trumbowyg-backColorRemove-dropdown-button){position:relative;color:#fff!important}.trumbowyg-dropdown-backColor.trumbowyg-dropdown--color-list button:not(.trumbowyg-backColorRemove-dropdown-button):focus::after,.trumbowyg-dropdown-backColor.trumbowyg-dropdown--color-list button:not(.trumbowyg-backColorRemove-dropdown-button):hover::after{content:" ";display:block;position:absolute;top:13px;left:0;width:0;height:0;border:5px solid transparent;border-left-color:#fff} \ No newline at end of file diff --git a/dist/plugins/emoji/ui/sass/trumbowyg.emoji.scss b/dist/plugins/emoji/ui/sass/trumbowyg.emoji.scss index 4aeb4d2d3..6991d76cd 100644 --- a/dist/plugins/emoji/ui/sass/trumbowyg.emoji.scss +++ b/dist/plugins/emoji/ui/sass/trumbowyg.emoji.scss @@ -1,5 +1,5 @@ /** - * Trumbowyg v2.18.0 - A lightweight WYSIWYG editor + * Trumbowyg v2.19.0 - A lightweight WYSIWYG editor * Default stylesheet for Trumbowyg editor plugin * ------------------------ * @link http://alex-d.github.io/Trumbowyg diff --git a/dist/plugins/emoji/ui/trumbowyg.emoji.css b/dist/plugins/emoji/ui/trumbowyg.emoji.css index c7b3af10e..4a2384e22 100644 --- a/dist/plugins/emoji/ui/trumbowyg.emoji.css +++ b/dist/plugins/emoji/ui/trumbowyg.emoji.css @@ -1,5 +1,5 @@ /** - * Trumbowyg v2.18.0 - A lightweight WYSIWYG editor + * Trumbowyg v2.19.0 - A lightweight WYSIWYG editor * Trumbowyg plugin stylesheet * ------------------------ * @link http://alex-d.github.io/Trumbowyg diff --git a/dist/plugins/emoji/ui/trumbowyg.emoji.min.css b/dist/plugins/emoji/ui/trumbowyg.emoji.min.css index 0c195f89e..f753133db 100644 --- a/dist/plugins/emoji/ui/trumbowyg.emoji.min.css +++ b/dist/plugins/emoji/ui/trumbowyg.emoji.min.css @@ -1,2 +1,2 @@ -/** Trumbowyg v2.18.0 - A lightweight WYSIWYG editor - alex-d.github.io/Trumbowyg - License MIT - Author : Alexandre Demode (Alex-D) / alex-d.fr */ +/** Trumbowyg v2.19.0 - A lightweight WYSIWYG editor - alex-d.github.io/Trumbowyg - License MIT - Author : Alexandre Demode (Alex-D) / alex-d.fr */ .trumbowyg-dropdown-emoji{width:265px;padding:7px 0 7px 5px}.trumbowyg-dropdown-emoji svg{display:none!important}.trumbowyg-dropdown-emoji button{display:block;position:relative;float:left;height:26px;width:26px;padding:0;margin:2px;line-height:24px;text-align:center}.trumbowyg-dropdown-emoji button:focus::after,.trumbowyg-dropdown-emoji button:hover::after{display:block;position:absolute;top:-5px;left:-5px;height:27px;width:27px;background:inherit;box-shadow:#000 0 0 2px;z-index:10;background-color:transparent}.trumbowyg .emoji{width:22px;height:22px;display:inline-block} \ No newline at end of file diff --git a/dist/plugins/fontfamily/trumbowyg.fontfamily.js b/dist/plugins/fontfamily/trumbowyg.fontfamily.js index d2fb965a4..b23f860c3 100644 --- a/dist/plugins/fontfamily/trumbowyg.fontfamily.js +++ b/dist/plugins/fontfamily/trumbowyg.fontfamily.js @@ -41,17 +41,17 @@ var defaultOptions = { fontList: [ {name: 'Arial', family: 'Arial, Helvetica, sans-serif'}, - {name: 'Arial Black', family: '\'Arial Black\', Gadget, sans-serif'}, - {name: 'Comic Sans', family: '\'Comic Sans MS\', Textile, cursive, sans-serif'}, - {name: 'Courier New', family: '\'Courier New\', Courier, monospace'}, + {name: 'Arial Black', family: 'Arial Black, Gadget, sans-serif'}, + {name: 'Comic Sans', family: 'Comic Sans MS, Textile, cursive, sans-serif'}, + {name: 'Courier New', family: 'Courier New, Courier, monospace'}, {name: 'Georgia', family: 'Georgia, serif'}, {name: 'Impact', family: 'Impact, Charcoal, sans-serif'}, - {name: 'Lucida Console', family: '\'Lucida Console\', Monaco, monospace'}, - {name: 'Lucida Sans', family: '\'Lucida Sans Uncide\', \'Lucida Grande\', sans-serif'}, - {name: 'Palatino', family: '\'Palatino Linotype\', \'Book Antiqua\', Palatino, serif'}, + {name: 'Lucida Console', family: 'Lucida Console, Monaco, monospace'}, + {name: 'Lucida Sans', family: 'Lucida Sans Uncide, Lucida Grande, sans-serif'}, + {name: 'Palatino', family: 'Palatino Linotype, Book Antiqua, Palatino, serif'}, {name: 'Tahoma', family: 'Tahoma, Geneva, sans-serif'}, - {name: 'Times New Roman', family: '\'Times New Roman\', Times, serif'}, - {name: 'Trebuchet', family: '\'Trebuchet MS\', Helvetica, sans-serif'}, + {name: 'Times New Roman', family: 'Times New Roman, Times, serif'}, + {name: 'Trebuchet', family: 'Trebuchet MS, Helvetica, sans-serif'}, {name: 'Verdana', family: 'Verdana, Geneva, sans-serif'} ] }; diff --git a/dist/plugins/fontfamily/trumbowyg.fontfamily.min.js b/dist/plugins/fontfamily/trumbowyg.fontfamily.min.js index 127dd8f56..1ee141f64 100644 --- a/dist/plugins/fontfamily/trumbowyg.fontfamily.min.js +++ b/dist/plugins/fontfamily/trumbowyg.fontfamily.min.js @@ -1 +1 @@ -!function(a){"use strict";function n(n){var i=[];return a.each(n.o.plugins.fontfamily.fontList,function(a,e){n.addBtnDef("fontfamily_"+a,{title:''+e.name+"",hasIcon:!1,fn:function(){n.execCmd("fontName",e.family,!0)}}),i.push("fontfamily_"+a)}),i}a.extend(!0,a.trumbowyg,{langs:{en:{fontFamily:"Font"},es:{fontFamily:"Fuente"},da:{fontFamily:"Skrifttype"},fr:{fontFamily:"Police"},de:{fontFamily:"Schriftart"},nl:{fontFamily:"Lettertype"},tr:{fontFamily:"Yazı Tipi"},zh_tw:{fontFamily:"字體"},pt_br:{fontFamily:"Fonte"},ko:{fontFamily:"글꼴"}}});var i={fontList:[{name:"Arial",family:"Arial, Helvetica, sans-serif"},{name:"Arial Black",family:"'Arial Black', Gadget, sans-serif"},{name:"Comic Sans",family:"'Comic Sans MS', Textile, cursive, sans-serif"},{name:"Courier New",family:"'Courier New', Courier, monospace"},{name:"Georgia",family:"Georgia, serif"},{name:"Impact",family:"Impact, Charcoal, sans-serif"},{name:"Lucida Console",family:"'Lucida Console', Monaco, monospace"},{name:"Lucida Sans",family:"'Lucida Sans Uncide', 'Lucida Grande', sans-serif"},{name:"Palatino",family:"'Palatino Linotype', 'Book Antiqua', Palatino, serif"},{name:"Tahoma",family:"Tahoma, Geneva, sans-serif"},{name:"Times New Roman",family:"'Times New Roman', Times, serif"},{name:"Trebuchet",family:"'Trebuchet MS', Helvetica, sans-serif"},{name:"Verdana",family:"Verdana, Geneva, sans-serif"}]};a.extend(!0,a.trumbowyg,{plugins:{fontfamily:{init:function(e){e.o.plugins.fontfamily=a.extend({},i,e.o.plugins.fontfamily||{}),e.addBtnDef("fontfamily",{dropdown:n(e),hasIcon:!1,text:e.lang.fontFamily})}}}})}(jQuery); \ No newline at end of file +!function(a){"use strict";function n(n){var i=[];return a.each(n.o.plugins.fontfamily.fontList,function(a,e){n.addBtnDef("fontfamily_"+a,{title:''+e.name+"",hasIcon:!1,fn:function(){n.execCmd("fontName",e.family,!0)}}),i.push("fontfamily_"+a)}),i}a.extend(!0,a.trumbowyg,{langs:{en:{fontFamily:"Font"},es:{fontFamily:"Fuente"},da:{fontFamily:"Skrifttype"},fr:{fontFamily:"Police"},de:{fontFamily:"Schriftart"},nl:{fontFamily:"Lettertype"},tr:{fontFamily:"Yazı Tipi"},zh_tw:{fontFamily:"字體"},pt_br:{fontFamily:"Fonte"},ko:{fontFamily:"글꼴"}}});var i={fontList:[{name:"Arial",family:"Arial, Helvetica, sans-serif"},{name:"Arial Black",family:"Arial Black, Gadget, sans-serif"},{name:"Comic Sans",family:"Comic Sans MS, Textile, cursive, sans-serif"},{name:"Courier New",family:"Courier New, Courier, monospace"},{name:"Georgia",family:"Georgia, serif"},{name:"Impact",family:"Impact, Charcoal, sans-serif"},{name:"Lucida Console",family:"Lucida Console, Monaco, monospace"},{name:"Lucida Sans",family:"Lucida Sans Uncide, Lucida Grande, sans-serif"},{name:"Palatino",family:"Palatino Linotype, Book Antiqua, Palatino, serif"},{name:"Tahoma",family:"Tahoma, Geneva, sans-serif"},{name:"Times New Roman",family:"Times New Roman, Times, serif"},{name:"Trebuchet",family:"Trebuchet MS, Helvetica, sans-serif"},{name:"Verdana",family:"Verdana, Geneva, sans-serif"}]};a.extend(!0,a.trumbowyg,{plugins:{fontfamily:{init:function(e){e.o.plugins.fontfamily=a.extend({},i,e.o.plugins.fontfamily||{}),e.addBtnDef("fontfamily",{dropdown:n(e),hasIcon:!1,text:e.lang.fontFamily})}}}})}(jQuery); \ No newline at end of file diff --git a/dist/plugins/fontsize/trumbowyg.fontsize.js b/dist/plugins/fontsize/trumbowyg.fontsize.js index 289b62533..16cef5318 100644 --- a/dist/plugins/fontsize/trumbowyg.fontsize.js +++ b/dist/plugins/fontsize/trumbowyg.fontsize.js @@ -64,7 +64,7 @@ } }, de: { - fontsize: 'Font size', + fontsize: 'Schriftgröße', fontsizes: { 'x-small': 'Sehr klein', 'small': 'Klein', diff --git a/dist/plugins/fontsize/trumbowyg.fontsize.min.js b/dist/plugins/fontsize/trumbowyg.fontsize.min.js index b9f4e19cd..caa64e4a4 100644 --- a/dist/plugins/fontsize/trumbowyg.fontsize.min.js +++ b/dist/plugins/fontsize/trumbowyg.fontsize.min.js @@ -1 +1 @@ -!function(e){"use strict";function t(t){var l=[];if(e.each(t.o.plugins.fontsize.sizeList,function(e,a){t.addBtnDef("fontsize_"+a,{text:''+(t.lang.fontsizes[a]||a)+"",hasIcon:!1,fn:function(){t.execCmd("fontSize",e+1,!0)}}),l.push("fontsize_"+a)}),t.o.plugins.fontsize.allowCustomSize){var a="fontsize_custom",s={fn:function(){t.openModalInsert(t.lang.fontCustomSize.title,{size:{label:t.lang.fontCustomSize.label,value:t.lang.fontCustomSize.value}},function(l){var a=t.range.startContainer.parentElement,s=t.getRangeText();if(e(a).html()===s)e(a).css("font-size",l.size);else{t.range.deleteContents();var o=''+s+"",n=e(o)[0];t.range.insertNode(n)}return t.saveRange(),!0})},text:''+t.lang.fontsizes.custom+"",hasIcon:!1};t.addBtnDef(a,s),l.push(a)}return l}e.extend(!0,e.trumbowyg,{langs:{en:{fontsize:"Font size",fontsizes:{"x-small":"Extra small",small:"Small",medium:"Regular",large:"Large","x-large":"Extra large",custom:"Custom"},fontCustomSize:{title:"Custom Font Size",label:"Font Size",value:"48px"}},es:{fontsize:"Tamaño de Fuente",fontsizes:{"x-small":"Extra pequeña",small:"Pegueña",medium:"Regular",large:"Grande","x-large":"Extra Grande",custom:"Customizada"},fontCustomSize:{title:"Tamaño de Fuente Customizada",label:"Tamaño de Fuente",value:"48px"}},da:{fontsize:"Skriftstørrelse",fontsizes:{"x-small":"Ekstra lille",small:"Lille",medium:"Normal",large:"Stor","x-large":"Ekstra stor",custom:"Brugerdefineret"}},fr:{fontsize:"Taille de la police",fontsizes:{"x-small":"Très petit",small:"Petit",medium:"Normal",large:"Grand","x-large":"Très grand",custom:"Taille personnalisée"},fontCustomSize:{title:"Taille de police personnalisée",label:"Taille de la police",value:"48px"}},de:{fontsize:"Font size",fontsizes:{"x-small":"Sehr klein",small:"Klein",medium:"Normal",large:"Groß","x-large":"Sehr groß",custom:"Benutzerdefiniert"},fontCustomSize:{title:"Benutzerdefinierte Schriftgröße",label:"Schriftgröße",value:"48px"}},nl:{fontsize:"Lettergrootte",fontsizes:{"x-small":"Extra klein",small:"Klein",medium:"Normaal",large:"Groot","x-large":"Extra groot",custom:"Tilpasset"}},tr:{fontsize:"Yazı Boyutu",fontsizes:{"x-small":"Çok Küçük",small:"Küçük",medium:"Normal",large:"Büyük","x-large":"Çok Büyük",custom:"Görenek"}},zh_tw:{fontsize:"字體大小",fontsizes:{"x-small":"最小",small:"小",medium:"中",large:"大","x-large":"最大",custom:"自訂大小"},fontCustomSize:{title:"自訂義字體大小",label:"字體大小",value:"48px"}},pt_br:{fontsize:"Tamanho da fonte",fontsizes:{"x-small":"Extra pequeno",small:"Pequeno",regular:"Médio",large:"Grande","x-large":"Extra grande",custom:"Personalizado"},fontCustomSize:{title:"Tamanho de Fonte Personalizado",label:"Tamanho de Fonte",value:"48px"}},it:{fontsize:"Dimensioni del testo",fontsizes:{"x-small":"Molto piccolo",small:"piccolo",regular:"normale",large:"grande","x-large":"Molto grande",custom:"Personalizzato"},fontCustomSize:{title:"Dimensioni del testo personalizzato",label:"Dimensioni del testo",value:"48px"}},ko:{fontsize:"글꼴 크기",fontsizes:{"x-small":"아주 작게",small:"작게",medium:"보통",large:"크게","x-large":"아주 크게",custom:"사용자 지정"},fontCustomSize:{title:"사용자 지정 글꼴 크기",label:"글꼴 크기",value:"48px"}}}});var l={sizeList:["x-small","small","medium","large","x-large"],allowCustomSize:!0};e.extend(!0,e.trumbowyg,{plugins:{fontsize:{init:function(a){a.o.plugins.fontsize=e.extend({},l,a.o.plugins.fontsize||{}),a.addBtnDef("fontsize",{dropdown:t(a)})}}}})}(jQuery); \ No newline at end of file +!function(e){"use strict";function t(t){var l=[];if(e.each(t.o.plugins.fontsize.sizeList,function(e,a){t.addBtnDef("fontsize_"+a,{text:''+(t.lang.fontsizes[a]||a)+"",hasIcon:!1,fn:function(){t.execCmd("fontSize",e+1,!0)}}),l.push("fontsize_"+a)}),t.o.plugins.fontsize.allowCustomSize){var a="fontsize_custom",s={fn:function(){t.openModalInsert(t.lang.fontCustomSize.title,{size:{label:t.lang.fontCustomSize.label,value:t.lang.fontCustomSize.value}},function(l){var a=t.range.startContainer.parentElement,s=t.getRangeText();if(e(a).html()===s)e(a).css("font-size",l.size);else{t.range.deleteContents();var o=''+s+"",n=e(o)[0];t.range.insertNode(n)}return t.saveRange(),!0})},text:''+t.lang.fontsizes.custom+"",hasIcon:!1};t.addBtnDef(a,s),l.push(a)}return l}e.extend(!0,e.trumbowyg,{langs:{en:{fontsize:"Font size",fontsizes:{"x-small":"Extra small",small:"Small",medium:"Regular",large:"Large","x-large":"Extra large",custom:"Custom"},fontCustomSize:{title:"Custom Font Size",label:"Font Size",value:"48px"}},es:{fontsize:"Tamaño de Fuente",fontsizes:{"x-small":"Extra pequeña",small:"Pegueña",medium:"Regular",large:"Grande","x-large":"Extra Grande",custom:"Customizada"},fontCustomSize:{title:"Tamaño de Fuente Customizada",label:"Tamaño de Fuente",value:"48px"}},da:{fontsize:"Skriftstørrelse",fontsizes:{"x-small":"Ekstra lille",small:"Lille",medium:"Normal",large:"Stor","x-large":"Ekstra stor",custom:"Brugerdefineret"}},fr:{fontsize:"Taille de la police",fontsizes:{"x-small":"Très petit",small:"Petit",medium:"Normal",large:"Grand","x-large":"Très grand",custom:"Taille personnalisée"},fontCustomSize:{title:"Taille de police personnalisée",label:"Taille de la police",value:"48px"}},de:{fontsize:"Schriftgröße",fontsizes:{"x-small":"Sehr klein",small:"Klein",medium:"Normal",large:"Groß","x-large":"Sehr groß",custom:"Benutzerdefiniert"},fontCustomSize:{title:"Benutzerdefinierte Schriftgröße",label:"Schriftgröße",value:"48px"}},nl:{fontsize:"Lettergrootte",fontsizes:{"x-small":"Extra klein",small:"Klein",medium:"Normaal",large:"Groot","x-large":"Extra groot",custom:"Tilpasset"}},tr:{fontsize:"Yazı Boyutu",fontsizes:{"x-small":"Çok Küçük",small:"Küçük",medium:"Normal",large:"Büyük","x-large":"Çok Büyük",custom:"Görenek"}},zh_tw:{fontsize:"字體大小",fontsizes:{"x-small":"最小",small:"小",medium:"中",large:"大","x-large":"最大",custom:"自訂大小"},fontCustomSize:{title:"自訂義字體大小",label:"字體大小",value:"48px"}},pt_br:{fontsize:"Tamanho da fonte",fontsizes:{"x-small":"Extra pequeno",small:"Pequeno",regular:"Médio",large:"Grande","x-large":"Extra grande",custom:"Personalizado"},fontCustomSize:{title:"Tamanho de Fonte Personalizado",label:"Tamanho de Fonte",value:"48px"}},it:{fontsize:"Dimensioni del testo",fontsizes:{"x-small":"Molto piccolo",small:"piccolo",regular:"normale",large:"grande","x-large":"Molto grande",custom:"Personalizzato"},fontCustomSize:{title:"Dimensioni del testo personalizzato",label:"Dimensioni del testo",value:"48px"}},ko:{fontsize:"글꼴 크기",fontsizes:{"x-small":"아주 작게",small:"작게",medium:"보통",large:"크게","x-large":"아주 크게",custom:"사용자 지정"},fontCustomSize:{title:"사용자 지정 글꼴 크기",label:"글꼴 크기",value:"48px"}}}});var l={sizeList:["x-small","small","medium","large","x-large"],allowCustomSize:!0};e.extend(!0,e.trumbowyg,{plugins:{fontsize:{init:function(a){a.o.plugins.fontsize=e.extend({},l,a.o.plugins.fontsize||{}),a.addBtnDef("fontsize",{dropdown:t(a)})}}}})}(jQuery); \ No newline at end of file diff --git a/dist/plugins/giphy/trumbowyg.giphy.js b/dist/plugins/giphy/trumbowyg.giphy.js new file mode 100644 index 000000000..a061df46a --- /dev/null +++ b/dist/plugins/giphy/trumbowyg.giphy.js @@ -0,0 +1,148 @@ +(function ($) { + 'use strict'; + + $.extend(true, $.trumbowyg, { + langs: { + // jshint camelcase:false + en: { + giphy: 'Insert GIF', + }, + fr: { + giphy: 'Insérer un GIF', + }, + } + }); + // jshint camelcase:true + + var giphyLogo = ''; + + var CANCEL_EVENT = 'tbwcancel'; + + // Throttle helper + function trumbowygThrottle(callback, delay) { + var last; + var timer; + + return function () { + var context = this; + var now = +new Date(); + var args = arguments; + + if (last && now < last + delay) { + clearTimeout(timer); + timer = setTimeout(function () { + last = now; + callback.apply(context, args); + }, delay); + } else { + last = now; + callback.apply(context, args); + } + }; + } + + // Fills modal with response gifs + function renderGifs(response, $giphyModal, trumbowyg, mustEmpty) { + mustEmpty = mustEmpty === true; + var width = ($giphyModal.width() - 20) / 3; + + var html = response.data + .filter(function (gifData) { + return gifData.images.downsized.url !== ''; + }) + .map(function (gifData) { + var image = gifData.images.downsized, + imageRatio = image.height / image.width; + + return '
'; + }) + .join('') + ; + + if (mustEmpty) { + $giphyModal.empty(); + } + $giphyModal.append(html); + $('img', $giphyModal).on('click', function () { + trumbowyg.restoreRange(); + trumbowyg.execCmd('insertImage', $(this).attr('src'), false, true); + $('img', $giphyModal).off(); + trumbowyg.closeModal(); + }); + } + + var defaultOptions = { + rating: 'g', + apiKey: null, + }; + + // Add dropdown with font sizes + $.extend(true, $.trumbowyg, { + plugins: { + giphy: { + init: function (trumbowyg) { + trumbowyg.o.plugins.giphy = $.extend({}, + defaultOptions, + trumbowyg.o.plugins.giphy || {} + ); + + if (trumbowyg.o.plugins.giphy.apiKey === null) { + throw new Error('You must set a Giphy API Key'); + } + + trumbowyg.addBtnDef('giphy', { + fn: function() { + var BASE_URL = 'https://api.giphy.com/v1/gifs/search?api_key=' + trumbowyg.o.plugins.giphy.apiKey; + var DEFAULT_URL = BASE_URL.replace('/search', '/trending'); + var previousAjaxCall = {abort: function () {}}; + + // Create and open the modal + var searchInput = ''; + var poweredByGiphy = '
Powered by' + giphyLogo + '
'; + var giphyModalHtml = searchInput + poweredByGiphy + '
'; + trumbowyg + .openModal(null, giphyModalHtml, false) + .one(CANCEL_EVENT, function () { + try { + previousAjaxCall.abort(); + } catch (e) {} + + trumbowyg.closeModal(); + }); + var $giphyInput = $('.' + trumbowyg.o.prefix + 'giphy-search'); + var $giphyModal = $('.' + trumbowyg.o.prefix + 'giphy-modal'); + + // Load trending gifs as default + $.ajax({ + url: DEFAULT_URL, + dataType: 'json', + + success: function(response) { + renderGifs(response, $giphyModal, trumbowyg, true); + } + }); + + var searchGifsOnInput = function () { + try { + previousAjaxCall.abort(); + } catch (e) {} + + previousAjaxCall = $.ajax({ + url: BASE_URL + '&q=' + encodeURIComponent($giphyInput.val()), + dataType: 'json', + + success: function(response) { + renderGifs(response, $giphyModal, trumbowyg, true); + } + }); + }; + var throttledInputRequest = trumbowygThrottle(searchGifsOnInput, 300); + + $giphyInput.on('input', throttledInputRequest); + }, + }); + } + } + } + }); +})(jQuery); diff --git a/dist/plugins/giphy/trumbowyg.giphy.min.js b/dist/plugins/giphy/trumbowyg.giphy.min.js new file mode 100644 index 000000000..40ef0ef3f --- /dev/null +++ b/dist/plugins/giphy/trumbowyg.giphy.min.js @@ -0,0 +1 @@ +!function(i){"use strict";function e(i,e){var n,c;return function(){var o=this,a=+new Date,t=arguments;n&&a'}).join("");o&&n.empty(),n.append(t),i("img",n).on("click",function(){c.restoreRange(),c.execCmd("insertImage",i(this).attr("src"),!1,!0),i("img",n).off(),c.closeModal()})}i.extend(!0,i.trumbowyg,{langs:{en:{giphy:"Insert GIF"},fr:{giphy:"Insérer un GIF"}}});var c='',o="tbwcancel",a={rating:"g",apiKey:null};i.extend(!0,i.trumbowyg,{plugins:{giphy:{init:function(t){if(t.o.plugins.giphy=i.extend({},a,t.o.plugins.giphy||{}),null===t.o.plugins.giphy.apiKey)throw new Error("You must set a Giphy API Key");t.addBtnDef("giphy",{fn:function(){var a="https://api.giphy.com/v1/gifs/search?api_key="+t.o.plugins.giphy.apiKey,l=a.replace("/search","/trending"),r={abort:function(){}},s='',p='
Powered by'+c+"
",u=s+p+'
';t.openModal(null,u,!1).one(o,function(){try{r.abort()}catch(i){}t.closeModal()});var d=i("."+t.o.prefix+"giphy-search"),g=i("."+t.o.prefix+"giphy-modal");i.ajax({url:l,dataType:"json",success:function(i){n(i,g,t,!0)}});var h=function(){try{r.abort()}catch(e){}r=i.ajax({url:a+"&q="+encodeURIComponent(d.val()),dataType:"json",success:function(i){n(i,g,t,!0)}})},f=e(h,300);d.on("input",f)}})}}}})}(jQuery); \ No newline at end of file diff --git a/dist/plugins/giphy/ui/sass/trumbowyg.giphy.scss b/dist/plugins/giphy/ui/sass/trumbowyg.giphy.scss new file mode 100644 index 000000000..919fd8896 --- /dev/null +++ b/dist/plugins/giphy/ui/sass/trumbowyg.giphy.scss @@ -0,0 +1,78 @@ +/** + * Trumbowyg v2.19.0 - A lightweight WYSIWYG editor + * Default stylesheet for Trumbowyg editor plugin + * ------------------------ + * @link http://alex-d.github.io/Trumbowyg + * @license MIT + * @author Alexandre Demode (Alex-D) + * Twitter : @AlexandreDemode + * Website : alex-d.fr + */ + +.trumbowyg-giphy-button svg { + transform: scale(1.22); +} + +.trumbowyg-powered-by-giphy { + position: absolute; + top: calc(5% + 12px); + right: calc(5% + 10px); + pointer-events: none; + user-select: none; + + span { + text-transform: uppercase; + font-weight: bold; + font-size: 10px; + opacity: 0.6; + } + + svg { + width: 66px; + height: auto; + vertical-align: bottom; + margin-left: 6px; + opacity: 0.45; + } +} + +.trumbowyg-giphy-search { + width: 90%; + margin: 5%; + padding-left: 10px; + padding-right: 150px; +} + +.trumbowyg-giphy-modal-scroll { + overflow: auto; + overflow-x: hidden; + height: 240px; +} + +.trumbowyg-giphy-modal { + padding: 0 5%; + columns: 3; + column-gap: 10px; +} + +.trumbowyg-giphy-modal .img-container { + width: 100%; + margin-bottom: 10px; + background-color: #ecf0f1; + + img { + width: 100%; + cursor: pointer; + opacity: 0; + transition: opacity 150ms; + + &:hover, + &:focus { + border: #2ecc71 solid 3px; + } + } + + img.tbw-loaded { + opacity: 1; + } +} diff --git a/dist/plugins/giphy/ui/trumbowyg.giphy.css b/dist/plugins/giphy/ui/trumbowyg.giphy.css new file mode 100644 index 000000000..f6ae092f8 --- /dev/null +++ b/dist/plugins/giphy/ui/trumbowyg.giphy.css @@ -0,0 +1,66 @@ +/** + * Trumbowyg v2.19.0 - A lightweight WYSIWYG editor + * Trumbowyg plugin stylesheet + * ------------------------ + * @link http://alex-d.github.io/Trumbowyg + * @license MIT + * @author Alexandre Demode (Alex-D) + * Twitter : @AlexandreDemode + * Website : alex-d.fr + */ + +.trumbowyg-giphy-button svg { + transform: scale(1.22); } + +.trumbowyg-powered-by-giphy { + position: absolute; + top: calc(5% + 12px); + right: calc(5% + 10px); + pointer-events: none; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; } + .trumbowyg-powered-by-giphy span { + text-transform: uppercase; + font-weight: bold; + font-size: 10px; + opacity: 0.6; } + .trumbowyg-powered-by-giphy svg { + width: 66px; + height: auto; + vertical-align: bottom; + margin-left: 6px; + opacity: 0.45; } + +.trumbowyg-giphy-search { + width: 90%; + margin: 5%; + padding-left: 10px; + padding-right: 150px; } + +.trumbowyg-giphy-modal-scroll { + overflow: auto; + overflow-x: hidden; + height: 240px; } + +.trumbowyg-giphy-modal { + padding: 0 5%; + -moz-columns: 3; + columns: 3; + -moz-column-gap: 10px; + column-gap: 10px; } + +.trumbowyg-giphy-modal .img-container { + width: 100%; + margin-bottom: 10px; + background-color: #ecf0f1; } + .trumbowyg-giphy-modal .img-container img { + width: 100%; + cursor: pointer; + opacity: 0; + transition: opacity 150ms; } + .trumbowyg-giphy-modal .img-container img:hover, .trumbowyg-giphy-modal .img-container img:focus { + border: #2ecc71 solid 3px; } + .trumbowyg-giphy-modal .img-container img.tbw-loaded { + opacity: 1; } diff --git a/dist/plugins/giphy/ui/trumbowyg.giphy.min.css b/dist/plugins/giphy/ui/trumbowyg.giphy.min.css new file mode 100644 index 000000000..204ad8ce5 --- /dev/null +++ b/dist/plugins/giphy/ui/trumbowyg.giphy.min.css @@ -0,0 +1,2 @@ +/** Trumbowyg v2.19.0 - A lightweight WYSIWYG editor - alex-d.github.io/Trumbowyg - License MIT - Author : Alexandre Demode (Alex-D) / alex-d.fr */ +.trumbowyg-giphy-button svg{transform:scale(1.22)}.trumbowyg-powered-by-giphy{position:absolute;top:calc(5% + 12px);right:calc(5% + 10px);pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.trumbowyg-powered-by-giphy span{text-transform:uppercase;font-weight:700;font-size:10px;opacity:.6}.trumbowyg-powered-by-giphy svg{width:66px;height:auto;vertical-align:bottom;margin-left:6px;opacity:.45}.trumbowyg-giphy-search{width:90%;margin:5%;padding-left:10px;padding-right:150px}.trumbowyg-giphy-modal-scroll{overflow:auto;overflow-x:hidden;height:240px}.trumbowyg-giphy-modal{padding:0 5%;-moz-columns:3;columns:3;-moz-column-gap:10px;column-gap:10px}.trumbowyg-giphy-modal .img-container{width:100%;margin-bottom:10px;background-color:#ecf0f1}.trumbowyg-giphy-modal .img-container img{width:100%;cursor:pointer;opacity:0;transition:opacity 150ms}.trumbowyg-giphy-modal .img-container img:focus,.trumbowyg-giphy-modal .img-container img:hover{border:3px solid #2ecc71}.trumbowyg-giphy-modal .img-container img.tbw-loaded{opacity:1} \ No newline at end of file diff --git a/dist/plugins/highlight/trumbowyg.highlight.js b/dist/plugins/highlight/trumbowyg.highlight.js index 1f412d18a..95c51ee66 100644 --- a/dist/plugins/highlight/trumbowyg.highlight.js +++ b/dist/plugins/highlight/trumbowyg.highlight.js @@ -69,7 +69,7 @@ highlight: '코드 문법 하이라이트' }, }, - // Add our plugin to Trumbowyg registred plugins + // Add our plugin to Trumbowyg registered plugins plugins: { highlight: { init: function (trumbowyg) { diff --git a/dist/plugins/highlight/ui/sass/trumbowyg.highlight.scss b/dist/plugins/highlight/ui/sass/trumbowyg.highlight.scss index 0b593a98b..521dc842d 100644 --- a/dist/plugins/highlight/ui/sass/trumbowyg.highlight.scss +++ b/dist/plugins/highlight/ui/sass/trumbowyg.highlight.scss @@ -1,5 +1,5 @@ /** - * Trumbowyg v2.18.0 - A lightweight WYSIWYG editor + * Trumbowyg v2.19.0 - A lightweight WYSIWYG editor * Default stylesheet for Trumbowyg editor plugin * ------------------------ * @link http://alex-d.github.io/Trumbowyg diff --git a/dist/plugins/highlight/ui/trumbowyg.highlight.css b/dist/plugins/highlight/ui/trumbowyg.highlight.css index e57e10e8b..4e97a504f 100644 --- a/dist/plugins/highlight/ui/trumbowyg.highlight.css +++ b/dist/plugins/highlight/ui/trumbowyg.highlight.css @@ -1,5 +1,5 @@ /** - * Trumbowyg v2.18.0 - A lightweight WYSIWYG editor + * Trumbowyg v2.19.0 - A lightweight WYSIWYG editor * Trumbowyg plugin stylesheet * ------------------------ * @link http://alex-d.github.io/Trumbowyg diff --git a/dist/plugins/highlight/ui/trumbowyg.highlight.min.css b/dist/plugins/highlight/ui/trumbowyg.highlight.min.css index 19634ad50..d66ad17e0 100644 --- a/dist/plugins/highlight/ui/trumbowyg.highlight.min.css +++ b/dist/plugins/highlight/ui/trumbowyg.highlight.min.css @@ -1,2 +1,2 @@ -/** Trumbowyg v2.18.0 - A lightweight WYSIWYG editor - alex-d.github.io/Trumbowyg - License MIT - Author : Alexandre Demode (Alex-D) / alex-d.fr */ +/** Trumbowyg v2.19.0 - A lightweight WYSIWYG editor - alex-d.github.io/Trumbowyg - License MIT - Author : Alexandre Demode (Alex-D) / alex-d.fr */ .trumbowyg-highlight-form-group{margin:15px 10px}.trumbowyg-highlight-form-group .trumbowyg-highlight-form-control{width:100%;border:1px solid #DEDEDE;font-size:14px;padding:7px}.trumbowyg-highlight-form-group .trumbowyg-highlight-form-control.code{height:200px} \ No newline at end of file diff --git a/dist/plugins/history/trumbowyg.history.js b/dist/plugins/history/trumbowyg.history.js index b0e1b94d9..16e6828e2 100644 --- a/dist/plugins/history/trumbowyg.history.js +++ b/dist/plugins/history/trumbowyg.history.js @@ -141,7 +141,7 @@ t.o.plugins.history._stack = stack.slice( 0, t.o.plugins.history._index ); - // now add new state to modifed history + // now add new state to modified history t.o.plugins.history._stack.push(newState); } else { // modify last stack entry diff --git a/dist/plugins/mathml/trumbowyg.mathml.js b/dist/plugins/mathml/trumbowyg.mathml.js index 43b9a0b9d..f3fee8a46 100644 --- a/dist/plugins/mathml/trumbowyg.mathml.js +++ b/dist/plugins/mathml/trumbowyg.mathml.js @@ -73,14 +73,14 @@ }; var mathmlCallback = function(v) { - var delimitor = v.inline ? '$' : '$$'; + var delimiter = v.inline ? '$' : '$$'; if (trumbowyg.currentMathNode) { $(trumbowyg.currentMathNode) - .html(delimitor + ' ' + v.formulas + ' ' + delimitor) + .html(delimiter + ' ' + v.formulas + ' ' + delimiter) .attr('formulas', v.formulas) .attr('inline', (v.inline ? 'true' : 'false')); } else { - var html = '' + delimitor + ' ' + v.formulas + ' ' + delimitor + ''; + var html = '' + delimiter + ' ' + v.formulas + ' ' + delimiter + ''; var node = $(html)[0]; node.onclick = function() { trumbowyg.currentMathNode = this; diff --git a/dist/plugins/mathml/ui/sass/trumbowyg.mathml.scss b/dist/plugins/mathml/ui/sass/trumbowyg.mathml.scss index 512a46012..d7f5e462e 100644 --- a/dist/plugins/mathml/ui/sass/trumbowyg.mathml.scss +++ b/dist/plugins/mathml/ui/sass/trumbowyg.mathml.scss @@ -1,5 +1,5 @@ /** - * Trumbowyg v2.18.0 - A lightweight WYSIWYG editor + * Trumbowyg v2.19.0 - A lightweight WYSIWYG editor * Default stylesheet for Trumbowyg editor plugin * ------------------------ * @link http://alex-d.github.io/Trumbowyg @@ -10,7 +10,6 @@ */ .mathMlContainer { - position: relative; &[inline="false"] { @@ -20,17 +19,18 @@ &:hover { pointer-events: none; - &:after { + + &::after { content: '\270E'; - pointer-events: auto; position: absolute; - left: 0px; - top: 0px; - background-color: #ffffffd4; + top: 0; + right: 0; + bottom: 0; + left: 0; + background-color: rgba(255, 255, 255, 0.83); + box-shadow: 0 0 5px 5px rgba(255, 255, 255, 0.83); cursor: pointer; - bottom: 0px; - right: 0px; - box-shadow: 0 0 5px 5px #ffffffd4; + pointer-events: auto; } } } diff --git a/dist/plugins/mathml/ui/trumbowyg.mathml.css b/dist/plugins/mathml/ui/trumbowyg.mathml.css index b6235ecd2..6b9deea1c 100644 --- a/dist/plugins/mathml/ui/trumbowyg.mathml.css +++ b/dist/plugins/mathml/ui/trumbowyg.mathml.css @@ -1,5 +1,5 @@ /** - * Trumbowyg v2.18.0 - A lightweight WYSIWYG editor + * Trumbowyg v2.19.0 - A lightweight WYSIWYG editor * Trumbowyg plugin stylesheet * ------------------------ * @link http://alex-d.github.io/Trumbowyg @@ -16,14 +16,14 @@ width: 100%; } .mathMlContainer:hover { pointer-events: none; } - .mathMlContainer:hover:after { + .mathMlContainer:hover::after { content: '\270E'; - pointer-events: auto; position: absolute; - left: 0px; - top: 0px; - background-color: #ffffffd4; + top: 0; + right: 0; + bottom: 0; + left: 0; + background-color: rgba(255, 255, 255, 0.83); + box-shadow: 0 0 5px 5px rgba(255, 255, 255, 0.83); cursor: pointer; - bottom: 0px; - right: 0px; - box-shadow: 0 0 5px 5px #ffffffd4; } + pointer-events: auto; } diff --git a/dist/plugins/mathml/ui/trumbowyg.mathml.min.css b/dist/plugins/mathml/ui/trumbowyg.mathml.min.css index 13d1ee24b..61fc4e6e2 100644 --- a/dist/plugins/mathml/ui/trumbowyg.mathml.min.css +++ b/dist/plugins/mathml/ui/trumbowyg.mathml.min.css @@ -1,2 +1,2 @@ -/** Trumbowyg v2.18.0 - A lightweight WYSIWYG editor - alex-d.github.io/Trumbowyg - License MIT - Author : Alexandre Demode (Alex-D) / alex-d.fr */ -.mathMlContainer{position:relative}.mathMlContainer[inline=false]{display:block;width:100%}.mathMlContainer:hover{pointer-events:none}.mathMlContainer:hover:after{content:'\270E';pointer-events:auto;position:absolute;left:0;top:0;background-color:#fffd4;cursor:pointer;bottom:0;right:0;box-shadow:0 0 5px 5px #fffd4} \ No newline at end of file +/** Trumbowyg v2.19.0 - A lightweight WYSIWYG editor - alex-d.github.io/Trumbowyg - License MIT - Author : Alexandre Demode (Alex-D) / alex-d.fr */ +.mathMlContainer{position:relative}.mathMlContainer[inline=false]{display:block;width:100%}.mathMlContainer:hover{pointer-events:none}.mathMlContainer:hover::after{content:'\270E';position:absolute;top:0;right:0;bottom:0;left:0;background-color:rgba(255,255,255,.83);box-shadow:0 0 5px 5px rgba(255,255,255,.83);cursor:pointer;pointer-events:auto} \ No newline at end of file diff --git a/dist/plugins/mention/ui/sass/trumbowyg.mention.scss b/dist/plugins/mention/ui/sass/trumbowyg.mention.scss index 8d55ccdcb..6a8c6486f 100644 --- a/dist/plugins/mention/ui/sass/trumbowyg.mention.scss +++ b/dist/plugins/mention/ui/sass/trumbowyg.mention.scss @@ -1,5 +1,5 @@ /** - * Trumbowyg v2.18.0 - A lightweight WYSIWYG editor + * Trumbowyg v2.19.0 - A lightweight WYSIWYG editor * Default stylesheet for Trumbowyg editor plugin * ------------------------ * @link http://alex-d.github.io/Trumbowyg diff --git a/dist/plugins/mention/ui/trumbowyg.mention.css b/dist/plugins/mention/ui/trumbowyg.mention.css index fd62da8f1..fc48b1105 100644 --- a/dist/plugins/mention/ui/trumbowyg.mention.css +++ b/dist/plugins/mention/ui/trumbowyg.mention.css @@ -1,5 +1,5 @@ /** - * Trumbowyg v2.18.0 - A lightweight WYSIWYG editor + * Trumbowyg v2.19.0 - A lightweight WYSIWYG editor * Trumbowyg plugin stylesheet * ------------------------ * @link http://alex-d.github.io/Trumbowyg diff --git a/dist/plugins/mention/ui/trumbowyg.mention.min.css b/dist/plugins/mention/ui/trumbowyg.mention.min.css index eaaaa54de..69de3cbbb 100644 --- a/dist/plugins/mention/ui/trumbowyg.mention.min.css +++ b/dist/plugins/mention/ui/trumbowyg.mention.min.css @@ -1,2 +1,2 @@ -/** Trumbowyg v2.18.0 - A lightweight WYSIWYG editor - alex-d.github.io/Trumbowyg - License MIT - Author : Alexandre Demode (Alex-D) / alex-d.fr */ +/** Trumbowyg v2.19.0 - A lightweight WYSIWYG editor - alex-d.github.io/Trumbowyg - License MIT - Author : Alexandre Demode (Alex-D) / alex-d.fr */ .trumbowyg-dropdown-mention button{position:relative;white-space:nowrap}.trumbowyg-dropdown-mention button:after{content:"";position:absolute;top:0;right:0;width:15%;height:100%;background-size:100%;background-image:linear-gradient(to right,rgba(255,255,255,0) 0,#fff 80%,#fff 100%);pointer-events:none} \ No newline at end of file diff --git a/dist/plugins/specialchars/ui/sass/trumbowyg.specialchars.scss b/dist/plugins/specialchars/ui/sass/trumbowyg.specialchars.scss index fe72255b2..b5e5d7f4b 100644 --- a/dist/plugins/specialchars/ui/sass/trumbowyg.specialchars.scss +++ b/dist/plugins/specialchars/ui/sass/trumbowyg.specialchars.scss @@ -1,5 +1,5 @@ /** - * Trumbowyg v2.18.0 - A lightweight WYSIWYG editor + * Trumbowyg v2.19.0 - A lightweight WYSIWYG editor * Default stylesheet for Trumbowyg editor plugin * ------------------------ * @link http://alex-d.github.io/Trumbowyg diff --git a/dist/plugins/specialchars/ui/trumbowyg.specialchars.css b/dist/plugins/specialchars/ui/trumbowyg.specialchars.css index d74fb632c..98e8e2876 100644 --- a/dist/plugins/specialchars/ui/trumbowyg.specialchars.css +++ b/dist/plugins/specialchars/ui/trumbowyg.specialchars.css @@ -1,5 +1,5 @@ /** - * Trumbowyg v2.18.0 - A lightweight WYSIWYG editor + * Trumbowyg v2.19.0 - A lightweight WYSIWYG editor * Trumbowyg plugin stylesheet * ------------------------ * @link http://alex-d.github.io/Trumbowyg diff --git a/dist/plugins/specialchars/ui/trumbowyg.specialchars.min.css b/dist/plugins/specialchars/ui/trumbowyg.specialchars.min.css index 7bed5e6fc..9c01f4f52 100644 --- a/dist/plugins/specialchars/ui/trumbowyg.specialchars.min.css +++ b/dist/plugins/specialchars/ui/trumbowyg.specialchars.min.css @@ -1,2 +1,2 @@ -/** Trumbowyg v2.18.0 - A lightweight WYSIWYG editor - alex-d.github.io/Trumbowyg - License MIT - Author : Alexandre Demode (Alex-D) / alex-d.fr */ +/** Trumbowyg v2.19.0 - A lightweight WYSIWYG editor - alex-d.github.io/Trumbowyg - License MIT - Author : Alexandre Demode (Alex-D) / alex-d.fr */ .trumbowyg-symbol-\ -dropdown-button{display:none!important}.trumbowyg-symbol-\ -dropdown-button+button{clear:both}.trumbowyg-dropdown-specialChars{width:248px;padding:5px 3px 3px}.trumbowyg-dropdown-specialChars button{display:block;position:relative;float:left;height:26px;width:26px;padding:0;margin:2px;line-height:24px;text-align:center}.trumbowyg-dropdown-specialChars button:focus::after,.trumbowyg-dropdown-specialChars button:hover::after{display:block;position:absolute;top:-5px;left:-5px;height:27px;width:27px;background:inherit;box-shadow:#000 0 0 2px;z-index:10;background-color:transparent}.trumbowyg .specialChars{width:22px;height:22px;display:inline-block} \ No newline at end of file diff --git a/dist/plugins/table/trumbowyg.table.js b/dist/plugins/table/trumbowyg.table.js index 0612c5d96..f04f5a42c 100644 --- a/dist/plugins/table/trumbowyg.table.js +++ b/dist/plugins/table/trumbowyg.table.js @@ -21,39 +21,49 @@ en: { table: 'Insert table', tableAddRow: 'Add row', - tableAddColumn: 'Add column', + tableAddRowAbove: 'Add row above', + tableAddColumnLeft: 'Add column to the left', + tableAddColumn: 'Add column to the right', tableDeleteRow: 'Delete row', tableDeleteColumn: 'Delete column', tableDestroy: 'Delete table', error: 'Error' }, da: { - table: 'Indsæt tabel', - tableAddRow: 'Tilføj række', - tableAddColumn: 'Tilføj kolonne', - tableDeleteRow: 'Slet række', - tableDeleteColumn: 'Slet kolonne', - tableDestroy: 'Slet tabel', - error: 'Fejl' + table: 'Indsæt tabel', + tableAddRow: 'Tilføj række', + tableAddRowAbove: 'Tilføj række', + tableAddColumnLeft: 'Tilføj kolonne', + tableAddColumn: 'Tilføj kolonne', + tableDeleteRow: 'Slet række', + tableDeleteColumn: 'Slet kolonne', + tableDestroy: 'Slet tabel', + error: 'Fejl' }, de: { - table: 'Tabelle einfügen', - tableAddRow: 'Zeile hinzufügen', - tableAddColumn: 'Spalte hinzufügen', - tableDeleteRow: 'Zeile löschen', - tableDeleteColumn: 'Spalte löschen', - tableDestroy: 'Tabelle löschen', - error: 'Error' + table: 'Tabelle einfügen', + tableAddRow: 'Zeile hinzufügen', + tableAddRowAbove: 'Zeile hinzufügen', + tableAddColumnLeft: 'Spalte hinzufügen', + tableAddColumn: 'Spalte hinzufügen', + tableDeleteRow: 'Zeile löschen', + tableDeleteColumn: 'Spalte löschen', + tableDestroy: 'Tabelle löschen', + error: 'Error' }, sk: { table: 'Vytvoriť tabuľky', tableAddRow: 'Pridať riadok', + tableAddRowAbove: 'Pridať riadok', + tableAddColumnLeft: 'Pridať stĺpec', tableAddColumn: 'Pridať stĺpec', error: 'Chyba' }, fr: { table: 'Insérer un tableau', tableAddRow: 'Ajouter des lignes', + tableAddRowAbove: 'Ajouter des lignes', + tableAddColumnLeft: 'Ajouter des colonnes', tableAddColumn: 'Ajouter des colonnes', tableDeleteRow: 'Effacer la ligne', tableDeleteColumn: 'Effacer la colonne', @@ -63,12 +73,16 @@ cs: { table: 'Vytvořit příkaz Table', tableAddRow: 'Přidat řádek', + tableAddRowAbove: 'Přidat řádek', + tableAddColumnLeft: 'Přidat sloupec', tableAddColumn: 'Přidat sloupec', error: 'Chyba' }, ru: { table: 'Вставить таблицу', tableAddRow: 'Добавить строку', + tableAddRowAbove: 'Добавить строку', + tableAddColumnLeft: 'Добавить столбец', tableAddColumn: 'Добавить столбец', tableDeleteRow: 'Удалить строку', tableDeleteColumn: 'Удалить столбец', @@ -78,27 +92,35 @@ ja: { table: '表の挿入', tableAddRow: '行の追加', + tableAddRowAbove: '行の追加', + tableAddColumnLeft: '列の追加', tableAddColumn: '列の追加', error: 'エラー' }, tr: { table: 'Tablo ekle', tableAddRow: 'Satır ekle', + tableAddRowAbove: 'Satır ekle', + tableAddColumnLeft: 'Kolon ekle', tableAddColumn: 'Kolon ekle', error: 'Hata' }, zh_tw: { - table: '插入表格', - tableAddRow: '加入行', - tableAddColumn: '加入列', - tableDeleteRow: '刪除行', - tableDeleteColumn: '刪除列', - tableDestroy: '刪除表格', - error: '錯誤' + table: '插入表格', + tableAddRow: '加入行', + tableAddRowAbove: '加入行', + tableAddColumnLeft: '加入列', + tableAddColumn: '加入列', + tableDeleteRow: '刪除行', + tableDeleteColumn: '刪除列', + tableDestroy: '刪除表格', + error: '錯誤' }, id: { table: 'Sisipkan tabel', tableAddRow: 'Sisipkan baris', + tableAddRowAbove: 'Sisipkan baris', + tableAddColumnLeft: 'Sisipkan kolom', tableAddColumn: 'Sisipkan kolom', tableDeleteRow: 'Hapus baris', tableDeleteColumn: 'Hapus kolom', @@ -108,6 +130,8 @@ pt_br: { table: 'Inserir tabela', tableAddRow: 'Adicionar linha', + tableAddRowAbove: 'Adicionar linha', + tableAddColumnLeft: 'Adicionar coluna', tableAddColumn: 'Adicionar coluna', tableDeleteRow: 'Deletar linha', tableDeleteColumn: 'Deletar coluna', @@ -117,6 +141,8 @@ ko: { table: '표 넣기', tableAddRow: '줄 추가', + tableAddRowAbove: '줄 추가', + tableAddColumnLeft: '칸 추가', tableAddColumn: '칸 추가', tableDeleteRow: '줄 삭제', tableDeleteColumn: '칸 삭제', @@ -139,8 +165,8 @@ var dropdownPrefix = t.o.prefix + 'dropdown', dropdownOptions = { // the dropdown - class: dropdownPrefix + '-' + btnName + ' ' + dropdownPrefix + ' ' + t.o.prefix + 'fixed-top' - }; + class: dropdownPrefix + '-' + btnName + ' ' + dropdownPrefix + ' ' + t.o.prefix + 'fixed-top' + }; dropdownOptions['data-' + dropdownPrefix] = btnName; var $dropdown = $('
', dropdownOptions); @@ -155,13 +181,16 @@ // when active table show AddRow / AddColumn if (t.$box.find('.' + t.o.prefix + 'table-button').hasClass(t.o.prefix + 'active-button')) { + $dropdown.append(t.buildSubBtn('tableAddRowAbove')); $dropdown.append(t.buildSubBtn('tableAddRow')); + $dropdown.append(t.buildSubBtn('tableAddColumnLeft')); $dropdown.append(t.buildSubBtn('tableAddColumn')); $dropdown.append(t.buildSubBtn('tableDeleteRow')); $dropdown.append(t.buildSubBtn('tableDeleteColumn')); $dropdown.append(t.buildSubBtn('tableDestroy')); } else { var tableSelect = $(''); + $('').appendTo(tableSelect); for (var i = 0; i < t.o.plugins.table.rows; i += 1) { var row = $('').appendTo(tableSelect); for (var j = 0; j < t.o.plugins.table.columns; j += 1) { @@ -202,8 +231,9 @@ t.saveRange(); var tabler = $('
'); + $('').appendTo(tabler); if (t.o.plugins.table.styler) { - tabler.attr('class', t.o.plugins.table.styler); + tabler.attr('class', t.o.plugins.table.styler); } var colIndex = this.cellIndex, @@ -230,6 +260,7 @@ t.saveRange(); var node = t.doc.getSelection().focusNode; + var focusedRow = $(node).closest('tr'); var table = $(node).closest('table'); if(table.length > 0) { @@ -239,7 +270,33 @@ $(''); + // add columns according to current columns count + for (var i = 0; i < table.find('tr')[0].childElementCount; i += 1) { + $(''); + }); + } + + t.syncCode(); + } + }; + + var addColumnLeft = { + title: t.lang.tableAddColumnLeft, + text: t.lang.tableAddColumnLeft, + ico: 'col-left', + + fn: function () { + t.saveRange(); + + var node = t.doc.getSelection().focusNode; + var focusedCol = $(node).closest('td'); var table = $(node).closest('table'); + var focusedColIdx = focusedCol.index(); if(table.length > 0) { $(table).find('tr').each(function() { - $(this).find('td:last').after(''); + $($(this).children()[focusedColIdx]).before(''); }); } @@ -323,7 +405,9 @@ }; t.addBtnDef('table', buildButtonDef); + t.addBtnDef('tableAddRowAbove', addRowAbove); t.addBtnDef('tableAddRow', addRow); + t.addBtnDef('tableAddColumnLeft', addColumnLeft); t.addBtnDef('tableAddColumn', addColumn); t.addBtnDef('tableDeleteRow', deleteRow); t.addBtnDef('tableDeleteColumn', deleteColumn); diff --git a/dist/plugins/table/trumbowyg.table.min.js b/dist/plugins/table/trumbowyg.table.min.js index 78f1e7081..a4234c337 100644 --- a/dist/plugins/table/trumbowyg.table.min.js +++ b/dist/plugins/table/trumbowyg.table.min.js @@ -1 +1 @@ -!function(e){"use strict";var t={rows:8,columns:8,styler:"table"};e.extend(!0,e.trumbowyg,{langs:{en:{table:"Insert table",tableAddRow:"Add row",tableAddColumn:"Add column",tableDeleteRow:"Delete row",tableDeleteColumn:"Delete column",tableDestroy:"Delete table",error:"Error"},da:{table:"Indsæt tabel",tableAddRow:"Tilføj række",tableAddColumn:"Tilføj kolonne",tableDeleteRow:"Slet række",tableDeleteColumn:"Slet kolonne",tableDestroy:"Slet tabel",error:"Fejl"},de:{table:"Tabelle einfügen",tableAddRow:"Zeile hinzufügen",tableAddColumn:"Spalte hinzufügen",tableDeleteRow:"Zeile löschen",tableDeleteColumn:"Spalte löschen",tableDestroy:"Tabelle löschen",error:"Error"},sk:{table:"Vytvoriť tabuľky",tableAddRow:"Pridať riadok",tableAddColumn:"Pridať stĺpec",error:"Chyba"},fr:{table:"Insérer un tableau",tableAddRow:"Ajouter des lignes",tableAddColumn:"Ajouter des colonnes",tableDeleteRow:"Effacer la ligne",tableDeleteColumn:"Effacer la colonne",tableDestroy:"Effacer le tableau",error:"Erreur"},cs:{table:"Vytvořit příkaz Table",tableAddRow:"Přidat řádek",tableAddColumn:"Přidat sloupec",error:"Chyba"},ru:{table:"Вставить таблицу",tableAddRow:"Добавить строку",tableAddColumn:"Добавить столбец",tableDeleteRow:"Удалить строку",tableDeleteColumn:"Удалить столбец",tableDestroy:"Удалить таблицу",error:"Ошибка"},ja:{table:"表の挿入",tableAddRow:"行の追加",tableAddColumn:"列の追加",error:"エラー"},tr:{table:"Tablo ekle",tableAddRow:"Satır ekle",tableAddColumn:"Kolon ekle",error:"Hata"},zh_tw:{table:"插入表格",tableAddRow:"加入行",tableAddColumn:"加入列",tableDeleteRow:"刪除行",tableDeleteColumn:"刪除列",tableDestroy:"刪除表格",error:"錯誤"},id:{table:"Sisipkan tabel",tableAddRow:"Sisipkan baris",tableAddColumn:"Sisipkan kolom",tableDeleteRow:"Hapus baris",tableDeleteColumn:"Hapus kolom",tableDestroy:"Hapus tabel",error:"Galat"},pt_br:{table:"Inserir tabela",tableAddRow:"Adicionar linha",tableAddColumn:"Adicionar coluna",tableDeleteRow:"Deletar linha",tableDeleteColumn:"Deletar coluna",tableDestroy:"Deletar tabela",error:"Erro"},ko:{table:"표 넣기",tableAddRow:"줄 추가",tableAddColumn:"칸 추가",tableDeleteRow:"줄 삭제",tableDeleteColumn:"칸 삭제",tableDestroy:"표 지우기",error:"에러"}},plugins:{table:{init:function(l){l.o.plugins.table=e.extend(!0,{},t,l.o.plugins.table||{});var a={fn:function(){l.saveRange();var t="table",a=l.o.prefix+"dropdown",d={"class":a+"-"+t+" "+a+" "+l.o.prefix+"fixed-top"};d["data-"+a]=t;var r=e("
",d);if(0===l.$box.find("."+a+"-"+t).length?l.$box.append(r.hide()):r=l.$box.find("."+a+"-"+t),r.html(""),l.$box.find("."+l.o.prefix+"table-button").hasClass(l.o.prefix+"active-button"))r.append(l.buildSubBtn("tableAddRow")),r.append(l.buildSubBtn("tableAddColumn")),r.append(l.buildSubBtn("tableDeleteRow")),r.append(l.buildSubBtn("tableDeleteColumn")),r.append(l.buildSubBtn("tableDestroy"));else{for(var b=e("
').appendTo(row); } // add row to table - row.appendTo(table); + focusedRow.after(row); + } + + t.syncCode(); + } + }; + + var addRowAbove = { + title: t.lang.tableAddRowAbove, + text: t.lang.tableAddRowAbove, + ico: 'row-above', + + fn: function () { + t.saveRange(); + + var node = t.doc.getSelection().focusNode; + var focusedRow = $(node).closest('tr'); + var table = $(node).closest('table'); + + if(table.length > 0) { + var row = $('
').appendTo(row); + } + // add row to table + focusedRow.before(row); } t.syncCode(); @@ -255,11 +312,36 @@ t.saveRange(); var node = t.doc.getSelection().focusNode; + var focusedCol = $(node).closest('td'); + var table = $(node).closest('table'); + var focusedColIdx = focusedCol.index(); + + if(table.length > 0) { + $(table).find('tr').each(function() { + $($(this).children()[focusedColIdx]).after('
"),i=0;i").appendTo(b),u=0;u").appendTo(s);b.find("td").on("mouseover",o),b.find("td").on("mousedown",n),r.append(b),r.append(e('
1x1
'))}l.dropdown(t)}},o=function(t){var l=e(t.target),a=l.closest("table"),o=this.cellIndex,n=this.parentNode.rowIndex;a.find("td").removeClass("active");for(var d=0;d<=n;d+=1)for(var r=0;r<=o;r+=1)a.find("tr:nth-of-type("+(d+1)+")").find("td:nth-of-type("+(r+1)+")").addClass("active");a.next(".trumbowyg-table-size").html(o+1+"x"+(n+1))},n=function(){l.saveRange();var t=e("
");l.o.plugins.table.styler&&t.attr("class",l.o.plugins.table.styler);for(var a=this.cellIndex,o=this.parentNode.rowIndex,n=0;n<=o;n+=1)for(var d=e("").appendTo(t),r=0;r<=a;r+=1)e(""),n=0;n").appendTo(o);o.appendTo(a)}l.syncCode()}},r={title:l.lang.tableAddColumn,text:l.lang.tableAddColumn,ico:"col-right",fn:function(){l.saveRange();var t=l.doc.getSelection().focusNode,a=e(t).closest("table");a.length>0&&e(a).find("tr").each(function(){e(this).find("td:last").after("")}),l.syncCode()}},b={title:l.lang.tableDestroy,text:l.lang.tableDestroy,ico:"table-delete",fn:function(){l.saveRange();var t=l.doc.getSelection().focusNode,a=e(t).closest("table");a.remove(),l.syncCode()}},i={title:l.lang.tableDeleteRow,text:l.lang.tableDeleteRow,ico:"row-delete",fn:function(){l.saveRange();var t=l.doc.getSelection().focusNode,a=e(t).closest("tr");a.remove(),l.syncCode()}},s={title:l.lang.tableDeleteColumn,text:l.lang.tableDeleteColumn,ico:"col-delete",fn:function(){l.saveRange();var t=l.doc.getSelection().focusNode,a=e(t).closest("table"),o=e(t).closest("td"),n=o.index();e(a).find("tr").each(function(){e(this).find("td:eq("+n+")").remove()}),l.syncCode()}};l.addBtnDef("table",a),l.addBtnDef("tableAddRow",d),l.addBtnDef("tableAddColumn",r),l.addBtnDef("tableDeleteRow",i),l.addBtnDef("tableDeleteColumn",s),l.addBtnDef("tableDestroy",b)}}}})}(jQuery); \ No newline at end of file +!function(e){"use strict";var t={rows:8,columns:8,styler:"table"};e.extend(!0,e.trumbowyg,{langs:{en:{table:"Insert table",tableAddRow:"Add row",tableAddRowAbove:"Add row above",tableAddColumnLeft:"Add column to the left",tableAddColumn:"Add column to the right",tableDeleteRow:"Delete row",tableDeleteColumn:"Delete column",tableDestroy:"Delete table",error:"Error"},da:{table:"Indsæt tabel",tableAddRow:"Tilføj række",tableAddRowAbove:"Tilføj række",tableAddColumnLeft:"Tilføj kolonne",tableAddColumn:"Tilføj kolonne",tableDeleteRow:"Slet række",tableDeleteColumn:"Slet kolonne",tableDestroy:"Slet tabel",error:"Fejl"},de:{table:"Tabelle einfügen",tableAddRow:"Zeile hinzufügen",tableAddRowAbove:"Zeile hinzufügen",tableAddColumnLeft:"Spalte hinzufügen",tableAddColumn:"Spalte hinzufügen",tableDeleteRow:"Zeile löschen",tableDeleteColumn:"Spalte löschen",tableDestroy:"Tabelle löschen",error:"Error"},sk:{table:"Vytvoriť tabuľky",tableAddRow:"Pridať riadok",tableAddRowAbove:"Pridať riadok",tableAddColumnLeft:"Pridať stĺpec",tableAddColumn:"Pridať stĺpec",error:"Chyba"},fr:{table:"Insérer un tableau",tableAddRow:"Ajouter des lignes",tableAddRowAbove:"Ajouter des lignes",tableAddColumnLeft:"Ajouter des colonnes",tableAddColumn:"Ajouter des colonnes",tableDeleteRow:"Effacer la ligne",tableDeleteColumn:"Effacer la colonne",tableDestroy:"Effacer le tableau",error:"Erreur"},cs:{table:"Vytvořit příkaz Table",tableAddRow:"Přidat řádek",tableAddRowAbove:"Přidat řádek",tableAddColumnLeft:"Přidat sloupec",tableAddColumn:"Přidat sloupec",error:"Chyba"},ru:{table:"Вставить таблицу",tableAddRow:"Добавить строку",tableAddRowAbove:"Добавить строку",tableAddColumnLeft:"Добавить столбец",tableAddColumn:"Добавить столбец",tableDeleteRow:"Удалить строку",tableDeleteColumn:"Удалить столбец",tableDestroy:"Удалить таблицу",error:"Ошибка"},ja:{table:"表の挿入",tableAddRow:"行の追加",tableAddRowAbove:"行の追加",tableAddColumnLeft:"列の追加",tableAddColumn:"列の追加",error:"エラー"},tr:{table:"Tablo ekle",tableAddRow:"Satır ekle",tableAddRowAbove:"Satır ekle",tableAddColumnLeft:"Kolon ekle",tableAddColumn:"Kolon ekle",error:"Hata"},zh_tw:{table:"插入表格",tableAddRow:"加入行",tableAddRowAbove:"加入行",tableAddColumnLeft:"加入列",tableAddColumn:"加入列",tableDeleteRow:"刪除行",tableDeleteColumn:"刪除列",tableDestroy:"刪除表格",error:"錯誤"},id:{table:"Sisipkan tabel",tableAddRow:"Sisipkan baris",tableAddRowAbove:"Sisipkan baris",tableAddColumnLeft:"Sisipkan kolom",tableAddColumn:"Sisipkan kolom",tableDeleteRow:"Hapus baris",tableDeleteColumn:"Hapus kolom",tableDestroy:"Hapus tabel",error:"Galat"},pt_br:{table:"Inserir tabela",tableAddRow:"Adicionar linha",tableAddRowAbove:"Adicionar linha",tableAddColumnLeft:"Adicionar coluna",tableAddColumn:"Adicionar coluna",tableDeleteRow:"Deletar linha",tableDeleteColumn:"Deletar coluna",tableDestroy:"Deletar tabela",error:"Erro"},ko:{table:"표 넣기",tableAddRow:"줄 추가",tableAddRowAbove:"줄 추가",tableAddColumnLeft:"칸 추가",tableAddColumn:"칸 추가",tableDeleteRow:"줄 삭제",tableDeleteColumn:"칸 삭제",tableDestroy:"표 지우기",error:"에러"}},plugins:{table:{init:function(l){l.o.plugins.table=e.extend(!0,{},t,l.o.plugins.table||{});var o={fn:function(){l.saveRange();var t="table",o=l.o.prefix+"dropdown",n={"class":o+"-"+t+" "+o+" "+l.o.prefix+"fixed-top"};n["data-"+o]=t;var b=e("
",n);if(0===l.$box.find("."+o+"-"+t).length?l.$box.append(b.hide()):b=l.$box.find("."+o+"-"+t),b.html(""),l.$box.find("."+l.o.prefix+"table-button").hasClass(l.o.prefix+"active-button"))b.append(l.buildSubBtn("tableAddRowAbove")),b.append(l.buildSubBtn("tableAddRow")),b.append(l.buildSubBtn("tableAddColumnLeft")),b.append(l.buildSubBtn("tableAddColumn")),b.append(l.buildSubBtn("tableDeleteRow")),b.append(l.buildSubBtn("tableDeleteColumn")),b.append(l.buildSubBtn("tableDestroy"));else{var r=e("
").appendTo(d);l.range.deleteContents(),l.range.insertNode(t[0]),l.$c.trigger("tbwchange")},d={title:l.lang.tableAddRow,text:l.lang.tableAddRow,ico:"row-below",fn:function(){l.saveRange();var t=l.doc.getSelection().focusNode,a=e(t).closest("table");if(a.length>0){for(var o=e("
");e("").appendTo(r);for(var i=0;i").appendTo(r),u=0;u").appendTo(s);r.find("td").on("mouseover",a),r.find("td").on("mousedown",d),b.append(r),b.append(e('
1x1
'))}l.dropdown(t)}},a=function(t){var l=e(t.target),o=l.closest("table"),a=this.cellIndex,d=this.parentNode.rowIndex;o.find("td").removeClass("active");for(var n=0;n<=d;n+=1)for(var b=0;b<=a;b+=1)o.find("tr:nth-of-type("+(n+1)+")").find("td:nth-of-type("+(b+1)+")").addClass("active");o.next(".trumbowyg-table-size").html(a+1+"x"+(d+1))},d=function(){l.saveRange();var t=e("
");e("").appendTo(t),l.o.plugins.table.styler&&t.attr("class",l.o.plugins.table.styler);for(var o=this.cellIndex,a=this.parentNode.rowIndex,d=0;d<=a;d+=1)for(var n=e("").appendTo(t),b=0;b<=o;b+=1)e(""),n=0;n").appendTo(d);o.after(d)}l.syncCode()}},b={title:l.lang.tableAddRowAbove,text:l.lang.tableAddRowAbove,ico:"row-above",fn:function(){l.saveRange();var t=l.doc.getSelection().focusNode,o=e(t).closest("tr"),a=e(t).closest("table");if(a.length>0){for(var d=e(""),n=0;n").appendTo(d);o.before(d)}l.syncCode()}},r={title:l.lang.tableAddColumn,text:l.lang.tableAddColumn,ico:"col-right",fn:function(){l.saveRange();var t=l.doc.getSelection().focusNode,o=e(t).closest("td"),a=e(t).closest("table"),d=o.index();a.length>0&&e(a).find("tr").each(function(){e(e(this).children()[d]).after("")}),l.syncCode()}},i={title:l.lang.tableAddColumnLeft,text:l.lang.tableAddColumnLeft,ico:"col-left",fn:function(){l.saveRange();var t=l.doc.getSelection().focusNode,o=e(t).closest("td"),a=e(t).closest("table"),d=o.index();a.length>0&&e(a).find("tr").each(function(){e(e(this).children()[d]).before("")}),l.syncCode()}},s={title:l.lang.tableDestroy,text:l.lang.tableDestroy,ico:"table-delete",fn:function(){l.saveRange();var t=l.doc.getSelection().focusNode,o=e(t).closest("table");o.remove(),l.syncCode()}},u={title:l.lang.tableDeleteRow,text:l.lang.tableDeleteRow,ico:"row-delete",fn:function(){l.saveRange();var t=l.doc.getSelection().focusNode,o=e(t).closest("tr");o.remove(),l.syncCode()}},c={title:l.lang.tableDeleteColumn,text:l.lang.tableDeleteColumn,ico:"col-delete",fn:function(){l.saveRange();var t=l.doc.getSelection().focusNode,o=e(t).closest("table"),a=e(t).closest("td"),d=a.index();e(o).find("tr").each(function(){e(this).find("td:eq("+d+")").remove()}),l.syncCode()}};l.addBtnDef("table",o),l.addBtnDef("tableAddRowAbove",b),l.addBtnDef("tableAddRow",n),l.addBtnDef("tableAddColumnLeft",i),l.addBtnDef("tableAddColumn",r),l.addBtnDef("tableDeleteRow",u),l.addBtnDef("tableDeleteColumn",c),l.addBtnDef("tableDestroy",s)}}}})}(jQuery); \ No newline at end of file diff --git a/dist/plugins/table/ui/sass/trumbowyg.table.scss b/dist/plugins/table/ui/sass/trumbowyg.table.scss index 10fdc1ae2..50cf35eba 100644 --- a/dist/plugins/table/ui/sass/trumbowyg.table.scss +++ b/dist/plugins/table/ui/sass/trumbowyg.table.scss @@ -1,5 +1,5 @@ /** - * Trumbowyg v2.18.0 - A lightweight WYSIWYG editor + * Trumbowyg v2.19.0 - A lightweight WYSIWYG editor * Default stylesheet for Trumbowyg editor plugin * ------------------------ * @link http://alex-d.github.io/Trumbowyg diff --git a/dist/plugins/table/ui/trumbowyg.table.css b/dist/plugins/table/ui/trumbowyg.table.css index 675e68539..74d967822 100644 --- a/dist/plugins/table/ui/trumbowyg.table.css +++ b/dist/plugins/table/ui/trumbowyg.table.css @@ -1,5 +1,5 @@ /** - * Trumbowyg v2.18.0 - A lightweight WYSIWYG editor + * Trumbowyg v2.19.0 - A lightweight WYSIWYG editor * Trumbowyg plugin stylesheet * ------------------------ * @link http://alex-d.github.io/Trumbowyg diff --git a/dist/plugins/table/ui/trumbowyg.table.min.css b/dist/plugins/table/ui/trumbowyg.table.min.css index 3ebcaaa55..f2c52b371 100644 --- a/dist/plugins/table/ui/trumbowyg.table.min.css +++ b/dist/plugins/table/ui/trumbowyg.table.min.css @@ -1,2 +1,2 @@ -/** Trumbowyg v2.18.0 - A lightweight WYSIWYG editor - alex-d.github.io/Trumbowyg - License MIT - Author : Alexandre Demode (Alex-D) / alex-d.fr */ +/** Trumbowyg v2.19.0 - A lightweight WYSIWYG editor - alex-d.github.io/Trumbowyg - License MIT - Author : Alexandre Demode (Alex-D) / alex-d.fr */ .trumbowyg-editor table{width:100%}.trumbowyg-editor table td{border:1px dotted #e7eaec;padding:8px}.trumbowyg-dropdown-table table{margin:10px;display:inline-block}.trumbowyg-dropdown-table table td{display:inline-block;height:20px;width:20px;margin:1px;padding:0;background-color:#fff;box-shadow:0 0 0 1px #cecece inset}.trumbowyg-dropdown-table table td.active{background-color:#00b393;box-shadow:none;cursor:pointer}.trumbowyg-dropdown-table .trumbowyg-table-size{text-align:center} \ No newline at end of file diff --git a/dist/plugins/template/trumbowyg.template.js b/dist/plugins/template/trumbowyg.template.js index 8d01ef705..b2f874aac 100644 --- a/dist/plugins/template/trumbowyg.template.js +++ b/dist/plugins/template/trumbowyg.template.js @@ -10,6 +10,9 @@ da: { template: 'Skabelon' }, + de: { + template: 'Vorlage' + }, fr: { template: 'Patron' }, diff --git a/dist/plugins/template/trumbowyg.template.min.js b/dist/plugins/template/trumbowyg.template.min.js index bec541905..76a72fbac 100644 --- a/dist/plugins/template/trumbowyg.template.min.js +++ b/dist/plugins/template/trumbowyg.template.min.js @@ -1 +1 @@ -!function(t){"use strict";function e(e){var n=e.o.plugins.templates,a=[];return t.each(n,function(t,n){e.addBtnDef("template_"+t,{fn:function(){e.html(n.html)},hasIcon:!1,title:n.name}),a.push("template_"+t)}),a}t.extend(!0,t.trumbowyg,{langs:{en:{template:"Template"},da:{template:"Skabelon"},fr:{template:"Patron"},nl:{template:"Sjabloon"},ru:{template:"Шаблон"},ja:{template:"テンプレート"},tr:{template:"Şablon"},zh_tw:{template:"模板"},pt_br:{template:"Modelo"},ko:{template:"서식"}}}),t.extend(!0,t.trumbowyg,{plugins:{template:{shouldInit:function(t){return t.o.plugins.hasOwnProperty("templates")},init:function(t){t.addBtnDef("template",{dropdown:e(t),hasIcon:!1,text:t.lang.template})}}}})}(jQuery); \ No newline at end of file +!function(t){"use strict";function e(e){var n=e.o.plugins.templates,a=[];return t.each(n,function(t,n){e.addBtnDef("template_"+t,{fn:function(){e.html(n.html)},hasIcon:!1,title:n.name}),a.push("template_"+t)}),a}t.extend(!0,t.trumbowyg,{langs:{en:{template:"Template"},da:{template:"Skabelon"},de:{template:"Vorlage"},fr:{template:"Patron"},nl:{template:"Sjabloon"},ru:{template:"Шаблон"},ja:{template:"テンプレート"},tr:{template:"Şablon"},zh_tw:{template:"模板"},pt_br:{template:"Modelo"},ko:{template:"서식"}}}),t.extend(!0,t.trumbowyg,{plugins:{template:{shouldInit:function(t){return t.o.plugins.hasOwnProperty("templates")},init:function(t){t.addBtnDef("template",{dropdown:e(t),hasIcon:!1,text:t.lang.template})}}}})}(jQuery); \ No newline at end of file diff --git a/dist/trumbowyg.js b/dist/trumbowyg.js index 821f8a97f..7cdb0a154 100644 --- a/dist/trumbowyg.js +++ b/dist/trumbowyg.js @@ -1,5 +1,5 @@ /** - * Trumbowyg v2.18.0 - A lightweight WYSIWYG editor + * Trumbowyg v2.19.0 - A lightweight WYSIWYG editor * Trumbowyg core file * ------------------------ * @link http://alex-d.github.io/Trumbowyg @@ -151,7 +151,7 @@ Object.defineProperty(jQuery.trumbowyg, 'defaultOptions', { switch (options) { // Exec command case 'execCmd': - return t.execCmd(params.cmd, params.param, params.forceCss); + return t.execCmd(params.cmd, params.param, params.forceCss, params.skipTrumbowyg); // Modal box case 'openModal': @@ -599,13 +599,12 @@ Object.defineProperty(jQuery.trumbowyg, 'defaultOptions', { if ((e.ctrlKey || e.metaKey) && !e.altKey) { ctrl = true; var key = t.keys[String.fromCharCode(e.which).toUpperCase()]; - + try { t.execCmd(key.fn, key.param); return false; } catch (c) {} } else { - if (t.o.tabToIndent && e.key === 'Tab') { try { if (e.shiftKey) { @@ -663,7 +662,7 @@ Object.defineProperty(jQuery.trumbowyg, 'defaultOptions', { .on('focus blur', function (e) { t.$c.trigger('tbw' + e.type); if (e.type === 'blur') { - t.clearButtonPaneStatus() + t.clearButtonPaneStatus(); } if (t.o.autogrowOnEnter) { if (t.autogrowOnEnterDontClose) { @@ -733,8 +732,8 @@ Object.defineProperty(jQuery.trumbowyg, 'defaultOptions', { }, 0); }); - t.$box.on('keydown', function (e) { - if (e.which === 27 && $('.' + prefix + 'modal-box', t.$box).length === 1) { + $(t.doc.body).on('keydown', function (e) { + if (e.which === 27 && $('.' + prefix + 'modal-box').length >= 1) { t.closeModal(); return false; } @@ -1121,7 +1120,7 @@ Object.defineProperty(jQuery.trumbowyg, 'defaultOptions', { } else { // wrap the content in a div it's easier to get the innerhtml var html = $('
').html(t.$ta.val()); - //scrub the html before loading into the doc + // scrub the html before loading into the doc var safe = $('
').append(html); $(t.o.tagsToRemove.join(','), safe).remove(); t.$ed.html(safe.contents().html()); @@ -1135,7 +1134,6 @@ Object.defineProperty(jQuery.trumbowyg, 'defaultOptions', { } } if (t.o.autogrowOnEnter) { - // t.autogrowEditorOnEnter(); t.$ed.height('auto'); var totalheight = t.autogrowOnEnterWasFocused ? t.$ed[0].scrollHeight : t.$ed.css('min-height'); if (totalheight !== t.$ta.css('height')) { @@ -1457,10 +1455,12 @@ Object.defineProperty(jQuery.trumbowyg, 'defaultOptions', { // Open a modal box - openModal: function (title, content) { + openModal: function (title, content, buildForm) { var t = this, prefix = t.o.prefix; + buildForm = buildForm !== false; + // No open a modal box when exist other modal box if ($('.' + prefix + 'modal-box', t.$box).length > 0) { return false; @@ -1490,33 +1490,39 @@ Object.defineProperty(jQuery.trumbowyg, 'defaultOptions', { }); // Build the form - var $form = $('
', { - action: '', - html: content - }) - .on('submit', function () { - $modal.trigger(CONFIRM_EVENT); - return false; + var formOrContent; + if (buildForm) { + formOrContent = $('', { + action: '', + html: content }) - .on('reset', function () { - $modal.trigger(CANCEL_EVENT); - return false; - }) - .on('submit reset', function () { - if (t.o.autogrowOnEnter) { - t.autogrowOnEnterDontClose = false; - } - }); + .on('submit', function () { + $modal.trigger(CONFIRM_EVENT); + return false; + }) + .on('reset', function () { + $modal.trigger(CANCEL_EVENT); + return false; + }) + .on('submit reset', function () { + if (t.o.autogrowOnEnter) { + t.autogrowOnEnterDontClose = false; + } + }); + } else { + formOrContent = content; + } // Build ModalBox and animate to show them var $box = $('
', { class: prefix + 'modal-box', - html: $form + html: formOrContent }) .css({ top: '-' + t.$btnPane.outerHeight(), - opacity: 0 + opacity: 0, + paddingBottom: buildForm ? null : '5%', }) .appendTo($modal) .animate({ @@ -1526,22 +1532,23 @@ Object.defineProperty(jQuery.trumbowyg, 'defaultOptions', { // Append title - $('', { - text: title, - class: prefix + 'modal-title' - }).prependTo($box); - - $modal.height($box.outerHeight() + 10); - - - // Focus in modal box - $('input:first', $box).focus(); + if (title) { + $('', { + text: title, + class: prefix + 'modal-title' + }).prependTo($box); + } + if (buildForm) { + // Focus in modal box + $('input:first', $box).focus(); - // Append Confirm and Cancel buttons - t.buildModalBtn('submit', $box); - t.buildModalBtn('reset', $box); + // Append Confirm and Cancel buttons + t.buildModalBtn('submit', $box); + t.buildModalBtn('reset', $box); + $modal.height($box.outerHeight() + 10); + } $(window).trigger('scroll'); @@ -1578,7 +1585,7 @@ Object.defineProperty(jQuery.trumbowyg, 'defaultOptions', { t.restoreRange(); }, - // Preformatted build and management modal + // Pre-formatted build and management modal openModalInsert: function (title, fields, cmd) { var t = this, prefix = t.o.prefix, @@ -1802,7 +1809,7 @@ Object.defineProperty(jQuery.trumbowyg, 'defaultOptions', { documentSelection.removeAllRanges(); } catch (e) { } - + documentSelection.addRange(range || savedRange); }, getRangeText: function () { diff --git a/dist/trumbowyg.min.js b/dist/trumbowyg.min.js index a8fcab665..64243fadc 100644 --- a/dist/trumbowyg.min.js +++ b/dist/trumbowyg.min.js @@ -1,2 +1,2 @@ -/** Trumbowyg v2.18.0 - 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",undo:"Undo",redo:"Redo",formatting:"Formatting",p:"Paragraph",blockquote:"Quote",code:"Code",header:"Header",bold:"Bold",italic:"Italic",strikethrough:"Strikethrough",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",width:"Width"}},plugins:{},svgPath:null,hideButtonTexts:null},Object.defineProperty(jQuery.trumbowyg,"defaultOptions",{value:{lang:"en",fixedBtnPane:!1,fixedFullWidth:!1,autogrow:!1,autogrowOnEnter:!1,imageWidthModalEdit:!1,prefix:"trumbowyg-",semantic:!0,semanticKeepAttributes:!1,resetCss:!1,removeformatPasted:!1,tabToIndent:!1,tagsToRemove:[],tagsToKeep:["hr","img","embed","iframe","input"],btns:[["viewHTML"],["undo","redo"],["formatting"],["strong","em","del"],["superscript","subscript"],["link"],["insertImage"],["justifyLeft","justifyCenter","justifyRight","justifyFull"],["unorderedList","orderedList"],["horizontalRule"],["removeformat"],["fullscreen"]],btnsDef:{},changeActiveDropdownIcon:!1,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:[],plugins:{},urlProtocol:!1,minimalLinks:!1},writable:!1,enumerable:!0,configurable:!1}),function(e,t,n,a){"use strict";var o="tbwconfirm",r="tbwcancel";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 i(this,e))});if(1===this.length)try{var o=a(this).data(n);switch(e){case"execCmd":return o.execCmd(t.cmd,t.param,t.forceCss);case"openModal":return o.openModal(t.title,t.content);case"closeModal":return o.closeModal();case"openModalInsert":return o.openModalInsert(t.title,t.fields,t.callback);case"saveRange":return o.saveRange();case"getRange":return o.range;case"getRangeText":return o.getRangeText();case"restoreRange":return o.restoreRange();case"enable":return o.setDisabled(!1);case"disable":return o.setDisabled(!0);case"toggle":return o.toggle();case"destroy":return o.destroy();case"empty":return o.empty();case"html":return o.html(t)}}catch(r){}return!1};var i=function(o,r){var i=this,s="trumbowyg-icons",l=a.trumbowyg;i.doc=o.ownerDocument||n,i.$ta=a(o),i.$c=a(o),r=r||{},null!=r.lang||null!=l.langs[r.lang]?i.lang=a.extend(!0,{},l.langs.en,l.langs[r.lang]):i.lang=l.langs.en,i.hideButtonTexts=null!=l.hideButtonTexts?l.hideButtonTexts:r.hideButtonTexts;var d=null!=l.svgPath?l.svgPath:r.svgPath;if(i.hasSvg=d!==!1,i.svgPath=i.doc.querySelector("base")?t.location.href.split("#")[0]:"",0===a("#"+s,i.doc).length&&d!==!1){if(null==d){for(var c=n.getElementsByTagName("script"),u=0;u",{"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("
").appendTo(n);l.range.deleteContents(),l.range.insertNode(t[0]),l.$c.trigger("tbwchange")},n={title:l.lang.tableAddRow,text:l.lang.tableAddRow,ico:"row-below",fn:function(){l.saveRange();var t=l.doc.getSelection().focusNode,o=e(t).closest("tr"),a=e(t).closest("table");if(a.length>0){for(var d=e("