Added trumbowyg into the backend section (#480).

This commit is contained in:
alext 2018-06-24 15:07:22 +02:00
parent 53b754c52d
commit 37cb57ac94
112 changed files with 8118 additions and 512 deletions

1027
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -38,6 +38,7 @@
"jquery-ui": "^1.12.0",
"moment": "^2.21.0",
"qtip2": "^3.0.3",
"sticky-table-headers": "^0.1.19"
"sticky-table-headers": "^0.1.19",
"trumbowyg": "^2.10.0"
}
}

View File

@ -10,6 +10,7 @@
<link rel="stylesheet" type="text/css" href="<?= asset_url('assets/ext/bootstrap/css/bootstrap.min.css') ?>">
<link rel="stylesheet" type="text/css" href="<?= asset_url('assets/ext/jquery-ui/jquery-ui.min.css') ?>">
<link rel="stylesheet" type="text/css" href="<?= asset_url('assets/ext/jquery-qtip/jquery.qtip.min.css') ?>">
<link rel="stylesheet" type="text/css" href="<?= asset_url('assets/ext/trumbowyg/ui/trumbowyg.min.css') ?>">
<link rel="stylesheet" type="text/css" href="<?= asset_url('assets/css/backend.css') ?>">
<link rel="stylesheet" type="text/css" href="<?= asset_url('assets/css/general.css') ?>">
@ -19,6 +20,7 @@
<script src="<?= asset_url('assets/ext/jquery-qtip/jquery.qtip.min.js') ?>"></script>
<script src="<?= asset_url('assets/ext/datejs/date.js') ?>"></script>
<script src="<?= asset_url('assets/ext/jquery-mousewheel/jquery.mousewheel.js') ?>"></script>
<script src="<?= asset_url('assets/ext/trumbowyg/trumbowyg.min.js') ?>"></script>
<script>
// Global JavaScript Variables - Used in all backend pages.

View File

@ -0,0 +1,11 @@
/* ===========================================================
* ar.js
* Arabic translation for Trumbowyg
* http://alex-d.github.com/Trumbowyg
* ===========================================================
* Author : Abo Mokh ahmed (abomokhahmed)
* Github : https://github.com/abomokhahmed
* Reviewed by : Abdellah Chadidi (chadidi)
* Github : https://github.com/chadidi
*/
jQuery.trumbowyg.langs.ar={_dir:"rtl",viewHTML:"إعرض-HTML",undo:"تراجع",redo:"إعادة",formatting:"تنسيق",p:"فقرة",blockquote:"اقتباس",code:"كود",header:"رأس",bold:"عريض",italic:"مائل",strikethrough:"مشطوب",underline:"خطّ سفلي",strong:"بارز",em:"تغميق",del:"حذف",superscript:"الأس",subscript:"أس سفلي",unorderedList:"قائمة غير مرتّبة",orderedList:"قائمة مرتّبة",insertImage:"إدراج صورة",insertVideo:"إدراج فيديو",link:"رابط",createLink:"انشاء رابط",unlink:"حذف رابط",justifyLeft:"تصحيح للشمال",justifyCenter:"توسيط",justifyRight:"تصحيح لليمين",justifyFull:"تصحيح لكلا الإتّجاهين",horizontalRule:"إدراج خطّ أفقي",fullscreen:"ملء الشاشة",close:"إغلاق",submit:"إرسال",reset:"إعادة تعيين",required:"إلزامي",description:"وصف",title:"عنوان",text:"نصّ",target:"الهدف"};

View File

@ -0,0 +1,8 @@
/* ===========================================================
* bg.js
* Bulgarian translation for Trumbowyg
* http://alex-d.github.com/Trumbowyg
* ===========================================================
* Author : Aleksandar Dimitrov
*/
jQuery.trumbowyg.langs.bg={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:"Текст"};

View File

@ -0,0 +1,8 @@
/* ===========================================================
* by.js
* Belarusian translation for Trumbowyg
* http://alex-d.github.com/Trumbowyg
* ===========================================================
* Author : Yury Karalkou
*/
jQuery.trumbowyg.langs.by={viewHTML:"Паглядзець HTML",undo:"Скасаваць",redo:"Паўтарыць",formatting:"Фарматаванне",p:"Звычайны",blockquote:"Цытата",code:"Код",header:"Загаловак",bold:"Паўтлусты",italic:"Курсіў",strikethrough:"Закрэслены",underline:"Падкрэслены",strong:"Паўтлусты",em:"Курсіў",del:"Закрэслены",superscript:"Верхні індэкс",subscript:"Індэкс",unorderedList:"Звычайны спіс",orderedList:"Нумараваны спіс",insertImage:"Уставіць выяву",insertVideo:"Уставіць відэа",link:"Спасылка",createLink:"Уставіць спасылку",unlink:"Выдаліць спасылку",justifyLeft:"Па леваму боку",justifyCenter:"У цэнтры",justifyRight:"Па праваму боку",justifyFull:"Па шырыні",horizontalRule:"Гарызантальная лінія",removeformat:"Ачысціць фарматаванне",fullscreen:"На ўвесь экран",close:"Зачыніць",submit:"Уставіць",reset:"Скасаваць",required:"Абавязкова",description:"Апісанне",title:"Падказка",text:"Тэкст"};

View File

@ -0,0 +1,11 @@
/* ===========================================================
* ca.js
* Catalan translation for Trumbowyg
* http://alex-d.github.com/Trumbowyg
* ===========================================================
* Author : Àlfons Sánchez (alsanan)
* Twitter : @alsanan
* Website : about.me/alsanan
* Github : https://github.com/alsanan
*/
jQuery.trumbowyg.langs.ca={viewHTML:"Veure HTML",formatting:"Formatar",p:"Paragraf",blockquote:"Citació",code:"Codi",header:"Títol",bold:"Negreta",italic:"Itàlica",strikethrough:"Suprimir",underline:"Subratllat",strong:"Forta",em:"Èmfasi",del:"Apagar",unorderedList:"Lista desordenada",orderedList:"Lista ordenada",insertImage:"Inserir imatge",insertVideo:"Inserir vídeo",link:"Enllaç",createLink:"Crear un enllaç",unlink:"Eliminar enllaç",justifyLeft:"Alinear a esquerra",justifyCenter:"Centrar",justifyRight:"Alinear a dreta",justifyFull:"Justificar",horizontalRule:"Inserir separador horitzontal",fullscreen:"Pantalla completa",close:"Tancar",submit:"Enviar",reset:"Reiniciar",required:"Obligatori",description:"Descripció",title:"Títol",text:"Text"};

View File

@ -0,0 +1,8 @@
/* ===========================================================
* cs.js
* Czech translation for Trumbowyg
* http://alex-d.github.com/Trumbowyg
* ===========================================================
* Author : Jan Svoboda (https://github.com/svoboda-jan)
*/
jQuery.trumbowyg.langs.cs={viewHTML:"Zobrazit HTML",formatting:"Formátování",p:"Odstavec",blockquote:"Citace",code:"Kód",header:"Nadpis",bold:"Tučné",italic:"Kurzíva",strikethrough:"Přeškrtnuté",underline:"Podtržené",strong:"Tučné",em:"Zvýraznit",del:"Smazat",unorderedList:"Netříděný seznam",orderedList:"Tříděný seznam",insertImage:"Vložit obrázek",insertVideo:"Vložit video",link:"Odkaz",createLink:"Vložit odkaz",unlink:"Smazat odkaz",justifyLeft:"Zarovnat doleva",justifyCenter:"Zarovnat na střed",justifyRight:"Zarovnat doprava",justifyFull:"Zarovnat do bloku",horizontalRule:"Vložit vodorovnou čáru",fullscreen:"Režim celé obrazovky",close:"Zavřít",submit:"Potvrdit",reset:"Zrušit",required:"Povinné",description:"Popis",title:"Nadpis",text:"Text"};

View File

@ -0,0 +1,9 @@
/* ===========================================================
* da.js
* Danish translation for Trumbowyg
* http://alex-d.github.com/Trumbowyg
* ===========================================================
* Author : Christian Pedersen
* Github : https://github.com/chripede
*/
jQuery.trumbowyg.langs.da={viewHTML:"Vis HTML",formatting:"Formatter",p:"Afsnit",blockquote:"Citat",code:"Kode",header:"Overskrift",bold:"Fed",italic:"Kursiv",strikethrough:"Gennemstreg",underline:"Understreg",strong:"Vigtig",em:"Fremhæv",del:"Slettet",unorderedList:"Uordnet liste",orderedList:"Ordnet liste",insertImage:"Indsæt billede",insertVideo:"Indsæt video",link:"Link",createLink:"Indsæt link",unlink:"Fjern link",justifyLeft:"Venstrestil",justifyCenter:"Centrer",justifyRight:"Højrestil",justifyFull:"Lige margener",horizontalRule:"Horisontal linie",fullscreen:"Fuld skærm",close:"Luk",submit:"Bekræft",reset:"Annuller",required:"Påkrævet",description:"Beskrivelse",title:"Titel",text:"Tekst"};

View File

@ -0,0 +1,9 @@
/* ===========================================================
* de.js
* German translation for Trumbowyg
* http://alex-d.github.com/Trumbowyg
* ===========================================================
* 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",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",fullscreen:"Vollbild",close:"Schliessen",submit:"Bestätigen",reset:"Zurücksetzen",required:"Erforderlich",description:"Beschreibung",title:"Titel",text:"Text"};

View File

@ -0,0 +1,12 @@
/* ===========================================================
* el.js
* Greek translation for Trumbowyg
* http://alex-d.github.com/Trumbowyg
* ===========================================================
* Author : Merianos Nikos
* Twitter : @_webresources
* Website : http://www.wp-lion.com
* LinkedIn: https://gr.linkedin.com/in/merianosnikos
* Behance: https://www.behance.net/web_design_blog
*/
jQuery.trumbowyg.langs.el={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:"Οριζόντια γραμμή",removeformat:"Καθαρισμός μορφοποίησης",fullscreen:"Πλήρης οθόνη",close:"Κλείσιμο",submit:"Υποβολή",reset:"Επαναφορά",required:"Απαραίτητο",description:"Περιγραφή",title:"Τίτλος",text:"Κείμενο"};

View File

@ -0,0 +1,9 @@
/* ===========================================================
* es.js
* Spanish translation for Trumbowyg
* http://alex-d.github.com/Trumbowyg
* ===========================================================
* Author : Moisés Márquez
* Email : moises.marquez.g@gmail.com
*/
jQuery.trumbowyg.langs.es={viewHTML:"Ver HTML",undo:"Deshacer",redo:"Rehacer",formatting:"Formato",p:"Párrafo",blockquote:"Cita",code:"Código",header:"Título",bold:"Negrita",italic:"Cursiva",strikethrough:"Tachado",underline:"Subrayado",strong:"Negrita",em:"Énfasis",del:"Borrar",superscript:"Sobrescrito",subscript:"Subíndice",unorderedList:"Lista Desordenada",orderedList:"Lista Ordenada",insertImage:"Insertar una imagen",insertVideo:"Insertar un vídeo",link:"Enlace",createLink:"Insertar un enlace",unlink:"Suprimir un enlace",justifyLeft:"Izquierda",justifyCenter:"Centrar",justifyRight:"Derecha",justifyFull:"Justificado",horizontalRule:"Insertar separador horizontal",removeformat:"Eliminar formato",fullscreen:"Pantalla completa",close:"Cerrar",submit:"Enviar",reset:"Cancelar",required:"Obligatorio",description:"Descripción",title:"Título",text:"Texto",target:"Target"};

View File

@ -0,0 +1,10 @@
/* ===========================================================
* es_ar.js
* Spanish (Argentina) translation for Trumbowyg
* http://alex-d.github.com/Trumbowyg
* ===========================================================
* Author : Félix Vera
* Email : felix.vera@gmail.com
*/
// jshint camelcase:false
jQuery.trumbowyg.langs.es_ar={viewHTML:"Ver HTML",formatting:"Formato",p:"Párrafo",blockquote:"Cita",code:"Código",header:"Título",bold:"Negrita",italic:"Itálica",strikethrough:"Tachado",underline:"Subrayado",strong:"Fuere",em:"Énfasis",del:"Borrar",unorderedList:"Lista Desordenada",orderedList:"Lista Ordenada",insertImage:"Insertar una imagen",insertVideo:"Insertar un video",link:"Vínculo",createLink:"Insertar un vínculo",unlink:"Suprimir un vínculo",justifyLeft:"Alinear a la Izquierda",justifyCenter:"Centrar",justifyRight:"Alinear a la Derecha",justifyFull:"Justificado",horizontalRule:"Insertar separado Horizontal",fullscreen:"Pantalla Completa",close:"Cerrar",submit:"Enviar",reset:"Cancelar",required:"Obligatorio",description:"Descripción",title:"Título",text:"Texto"};

View File

@ -0,0 +1,10 @@
/* ===========================================================
* fa.js
* Persian translation for Trumbowyg
* http://alex-d.github.com/Trumbowyg
* ===========================================================
* Author : Kiarash Soleimanzadeh
* Github : https://github.com/kiyarash
* Email : kiarash.s@hotmail.com
*/
jQuery.trumbowyg.langs.fa={_dir:"rtl",viewHTML:"نمایش کد اچ تی ام ال",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:"متن"};

View File

@ -0,0 +1,9 @@
/* ===========================================================
* fi.js
* Finnish translation for Trumbowyg
* http://alex-d.github.com/Trumbowyg
* ===========================================================
* Author : Teppo Koivula (teppokoivula)
* Github : https://github.com/teppokoivula
*/
jQuery.trumbowyg.langs.fi={viewHTML:"Näytä HTML",undo:"Kumoa",redo:"Tee uudelleen",formatting:"Muotoilu",p:"Kappale",blockquote:"Lainaus",code:"Koodi",header:"Otsikko",bold:"Lihavointi",italic:"Kursivointi",strikethrough:"Yliviivaus",underline:"Allevivaus",strong:"Vahvennus",em:"Painotus",del:"Poistettu",unorderedList:"Luettelo",orderedList:"Numeroitu luettelo",insertImage:"Lisää kuva",insertVideo:"Lisää video",link:"Linkki",createLink:"Luo linkki",unlink:"Poista linkki",justifyLeft:"Tasaa vasemmalle",justifyCenter:"Keskitä",justifyRight:"Tasaa oikealle",justifyFull:"Tasaa",horizontalRule:"Vaakaviiva",fullscreen:"Kokoruutu",close:"Sulje",submit:"Lisää",reset:"Palauta",required:"Pakollinen",description:"Kuvaus",title:"Otsikko",text:"Teksti"};

View File

@ -0,0 +1,10 @@
/* ===========================================================
* fr.js
* French translation for Trumbowyg
* http://alex-d.github.com/Trumbowyg
* ===========================================================
* Author : Alexandre Demode (Alex-D)
* Twitter : @AlexandreDemode
* Website : alex-d.fr
*/
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",removeformat:"Supprimer formatage",fullscreen:"Plein écran",close:"Fermer",submit:"Valider",reset:"Annuler",required:"Obligatoire",description:"Description",title:"Titre",text:"Texte",target:"Cible"};

View File

@ -0,0 +1,9 @@
/* ===========================================================
* he.js
* Hebrew translation for Trumbowyg
* http://alex-d.github.com/Trumbowyg
* ===========================================================
* Author : Udi Doron (udidoron)
* Github : https://github.com/udidoron
*/
jQuery.trumbowyg.langs.he={_dir:"rtl",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:"טקסט"};

View File

@ -0,0 +1,9 @@
/* ===========================================================
* hr.js
* Croatian translation for Trumbowyg
* https://www.github.com/Buda9
* ===========================================================
* Author : Davor Budimir (https://www.github.com/Buda9)
*/
// jshint camelcase:false
jQuery.trumbowyg.langs.hr={viewHTML:"Poglеdaj HTML kód",formatting:"Formatiranjе",p:"Odlomak",blockquote:"Citat",code:"Kód",header:"Zaglavlje",bold:"Podеbljano",italic:"Nakošeno",strikethrough:"Prеcrtano",underline:"Podvučеno",strong:"Podеbljano",em:"Istaknuto",del:"Obrisano",unorderedList:"Neuređen popis",orderedList:"Uređen popis",insertImage:"Dodaj sliku",insertVideo:"Dodaj vidеo",link:"Povezica",createLink:"Dodaj povezicu",unlink:"Ukloni povezicu",justifyLeft:"Lijеvo poravnanjе",justifyCenter:"Središnje poravnanjе",justifyRight:"Dеsno poravnanjе",justifyFull:"Obostrano poravnanjе",horizontalRule:"Horizontalna crta",fullscreen:"Puni zaslon",close:"Zatvori",submit:"Unеsi",reset:"Otkaži",required:"Obavеzno poljе",description:"Opis",title:"Naslov",text:"Tеkst"};

View File

@ -0,0 +1,10 @@
/* ===========================================================
* hu.js
* Hungarian translation for Trumbowyg
* http://alex-d.github.com/Trumbowyg
* ===========================================================
* Author : Peter MATO
* Web: http://fixme.hu
* GitHub: https://github.com/matopeter
*/
jQuery.trumbowyg.langs.hu={viewHTML:"HTML nézet",formatting:"Stílusok",p:"Bekezdés",blockquote:"Idézet",code:"Kód",header:"Címsor",bold:"Félkövér",italic:"Dőlt",strikethrough:"Áthúzott",underline:"Aláhúzott",strong:"Vastag",em:"Kiemelt",del:"Törölt",unorderedList:"Felsorolás",orderedList:"Számozás",insertImage:"Kép beszúrása",insertVideo:"Video beszúrása",link:"Link",createLink:"Link létrehozása",unlink:"Link eltávolítása",justifyLeft:"Balra igazítás",justifyCenter:"Középre igazítás",justifyRight:"Jobbra igazítás",justifyFull:"Sorkizárt",horizontalRule:"Vízszintes vonal",fullscreen:"Teljes képernyő",close:"Bezár",submit:"Beküldés",reset:"Alaphelyzet",required:"Kötelező",description:"Leírás",title:"Cím",text:"Szöveg",removeformat:"Formázás eltávolítása"};

View File

@ -0,0 +1,11 @@
/* ===========================================================
* id.js
* Indonesian translation for Trumbowyg
* http://alex-d.github.com/Trumbowyg
* ===========================================================
* Author : Rezha Julio (kimiamania)
* Twitter : @kimiamania
* Website : http://rezhajulio.web.id
* Github : https://github.com/kimiamania
*/
jQuery.trumbowyg.langs.id={viewHTML:"Lihat HTML",formatting:"Penyusunan",p:"Paragraf",blockquote:"Kutipan",code:"Kode",header:"Kepala",bold:"Tebal",italic:"Miring",strikethrough:"Coret",underline:"Garis bawah",strong:"Tebal",em:"Miring",del:"Dicoret",unorderedList:"Daftar tak teratur",orderedList:"Daftar teratur",insertImage:"Sisipkan gambar",insertVideo:"Sisipkan video",link:"Tautan",createLink:"Sisipkan Tautan",unlink:"Singkirkan tautan",justifyLeft:"Rata kiri",justifyCenter:"Rata Tengah",justifyRight:"Rata kanan",justifyFull:"Rata kiri dan kanan",horizontalRule:"Sisipkan garis mendatar",fullscreen:"Layar penuh",close:"Tutup",submit:"Setuju",reset:"Batal",required:"Diperlukan",description:"Deskripsi",title:"Judul",text:"Teks"};

View File

@ -0,0 +1,8 @@
/* ===========================================================
* it.js
* Italian translation for Trumbowyg
* http://alex-d.github.com/Trumbowyg
* ===========================================================
* Author : Mirko Buffoni
*/
jQuery.trumbowyg.langs.it={viewHTML:"Mostra HTML",formatting:"Formattazione",p:"Paragrafo",blockquote:"Citazione",code:"Codice",header:"Intestazione",bold:"Grassetto",italic:"Italico",strikethrough:"Barrato",underline:"Sottolineato",strong:"Rafforza",em:"Enfatizza",del:"Cancella",unorderedList:"Elenco puntato",orderedList:"Elenco numerato",insertImage:"Inserisci immagine",insertVideo:"Inserisci video",link:"Collegamento",createLink:"Crea un collegamento",unlink:"Elimina collegamento",justifyLeft:"Allinea a sinistra",justifyCenter:"Centra",justifyRight:"Allinea a destra",justifyFull:"Giustifica",horizontalRule:"Inserisci un separatore orizzontale",fullscreen:"Schermo intero",close:"Chiudi",submit:"Invia",reset:"Annulla",required:"Obbligatorio",description:"Descrizione",title:"Titolo",text:"Testo",removeformat:"Rimuovi Formattazione",superscript:"Apice",subscript:"Pedice"};

View File

@ -0,0 +1,10 @@
/* ===========================================================
* ja.js
* Japanese translation for Trumbowyg
* http://alex-d.github.com/Trumbowyg
* ===========================================================
* Author : Kouta Fukuhara (foo9)
* Twitter : @foo9
* Website : https://github.com/foo9
*/
jQuery.trumbowyg.langs.ja={viewHTML:"HTML表示",undo:"元に戻す",redo:"やり直す",formatting:"フォーマット",p:"段落",blockquote:"引用",code:"コード",header:"見出し",bold:"太字",italic:"斜体",strikethrough:"取り消し線",underline:"下線",strong:"太字",em:"斜体",del:"取り消し線",superscript:"上付き文字",subscript:"下付き文字",unorderedList:"順序なしリスト",orderedList:"順序ありリスト",insertImage:"画像の挿入",link:"リンク",createLink:"リンクの作成",unlink:"リンクの削除",justifyLeft:"左揃え",justifyCenter:"中央揃え",justifyRight:"右揃え",justifyFull:"両端揃え",horizontalRule:"横罫線",removeformat:"フォーマットの削除",fullscreen:"全画面表示",close:"閉じる",submit:"送信",reset:"キャンセル",required:"必須",description:"説明",title:"タイトル",text:"テキスト",target:"ターゲット"};

View File

@ -0,0 +1,10 @@
/* ===========================================================
* ko.js
* Korean translation for Trumbowyg
* http://alex-d.github.com/Trumbowyg
* ===========================================================
* Author : JoongSeob Vito Kim (dorajistyle)
* Blog : http://dorajistyle.pe.kr
* Github : https://github.com/dorajistyle
*/
jQuery.trumbowyg.langs.ko={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:"본문 내용"};

View File

@ -0,0 +1,8 @@
/* ===========================================================
* lt.js
* Lithuanian translation for Trumbowyg
* http://alex-d.github.com/Trumbowyg
* ===========================================================
* Author : Justas Brazauskas
*/
jQuery.trumbowyg.langs.lt={viewHTML:"Žiūrėti HTML",formatting:"Formatuoti",p:"Paragrafas",blockquote:"Citata",code:"Kodas",header:"Antraštė",bold:"Paryškinti",italic:"Kursyvuoti",strikethrough:"Perbraukti",underline:"Pabrėžti",strong:"Paryškinti",em:"Pabrėžti",del:"Trinti",unorderedList:"Sąrašas",orderedList:"Numeruotas sąrašas",insertImage:"Pridėti vaizdą",insertVideo:"Pridėti video",link:"Nuoroda",createLink:"Kurti nuorodą",unlink:"Ištrinti nuorodą",justifyLeft:"Lyginti kairėn",justifyCenter:"Lygiuoti Centre",justifyRight:"Lyginti dešinėn",justifyFull:"Centruoti",horizontalRule:"Horizontali linija",fullscreen:"Pilnas ekranas",close:"Uždaryti",submit:"Siųsti",reset:"Atšaukti",required:"Privaloma",description:"Aprašymas",title:"Pavadinimas",text:"Tekstas",removeformat:"Pašalinti formatavimą",superscript:"Viršutinis indeksas",subscript:"Apatinis indeksas"};

View File

@ -0,0 +1,8 @@
/* ===========================================================
* mn.js
* Mongolian translation for Trumbowyg
* http://alex-d.github.com/Trumbowyg
* ===========================================================
* Author : Ganbayar.B (ganbayar13)
*/
jQuery.trumbowyg.langs.mn={viewHTML:"HTML харах",undo:"Буцаах",redo:"Дахих",formatting:"Формат",p:"Догол мөр",blockquote:"Ишлэл",code:"Код",header:"Гарчиг",bold:"Тод",italic:"Налуу",strikethrough:"Дундуур зураас",underline:"Доогуур зураас",strong:"Тод",em:"Налуу",del:"Дундуур зураас",superscript:"Дээд индекс",subscript:"Доод индекс",unorderedList:"Дугаарлаагүй жагсаалт",orderedList:"Дугаарласан жагсаалт",insertImage:"Зураг оруулах",insertVideo:"Видео оруулах",link:"Холбоос",createLink:"Холбоос үүсгэх",unlink:"Холбоос цуцлах",justifyLeft:"Зүүн тийш шахах",justifyCenter:"Голлуулах",justifyRight:"Баруун Баруун тийш шахах",justifyFull:"Тэгшитгэх",horizontalRule:"Хөндлөн шугам",removeformat:"Формат арилгах",fullscreen:"Дэлгэц дүүргэх",close:"Хаах",submit:"Оруулах",reset:"Цуцлах",required:"Шаардлагатай",description:"Тайлбар",title:"Гарчиг",text:"Текст",target:"Бай"};

View File

@ -0,0 +1,8 @@
/* ===========================================================
* my.js
* Malaysian translation for Trumbowyg
* http://alex-d.github.com/Trumbowyg
* ===========================================================
* Author : JohnPozy
*/
jQuery.trumbowyg.langs.id={viewHTML:"Lihat HTML",formatting:"Pemformatan",p:"Perenggan",blockquote:"Blockquote",code:"Kod",header:"Pengepala",bold:"Tebal",italic:"Condong",strikethrough:"Garis batal",underline:"Garis bawah",strong:"Kuat",em:"Condong",del:"Hapus",unorderedList:"Senarai tidak tertib",orderedList:"Senarai tertib",insertImage:"Masukkan imej",insertVideo:"Masukkan video",link:"Pautan",createLink:"Cipta pautan",unlink:"Hapus pautan",justifyLeft:"Mengimbangkan ke kiri",justifyCenter:"Mengimbangkan ke tengah",justifyRight:"Mengimbangkan ke kanan",justifyFull:"Mengimbangkan ke kiri dan kanan",horizontalRule:"Masukkan garis mendatar",fullscreen:"Skrin penuh",close:"Tutup",submit:"Hantar",reset:"Batal",required:"Diperlukan",description:"Perihal",title:"Tajuk",text:"Teks"};

View File

@ -0,0 +1,9 @@
/* ===========================================================
* nl.js
* Dutch translation for Trumbowyg
* http://alex-d.github.com/Trumbowyg
* ===========================================================
* Author : Danny Hiemstra
* Github : https://github.com/dhiemstra
*/
jQuery.trumbowyg.langs.nl={viewHTML:"HTML bekijken",formatting:"Opmaak",p:"Paragraaf",blockquote:"Citaat",code:"Code",header:"Kop",bold:"Vet",italic:"Cursief",strikethrough:"Doorhalen",underline:"Onderlijnen",strong:"Sterk",em:"Nadruk",del:"Verwijderd",unorderedList:"Ongenummerde lijst",orderedList:"Genummerde lijst",insertImage:"Afbeelding invoegen",insertVideo:"Video invoegen",link:"Link",createLink:"Link maken",unlink:"Link verwijderen",justifyLeft:"Links uitlijnen",justifyCenter:"Centreren",justifyRight:"Rechts uitlijnen",justifyFull:"Uitvullen",horizontalRule:"Horizontale lijn",removeFormat:"Opmaak verwijderen",fullscreen:"Volledig scherm",close:"Sluiten",submit:"Verzenden",reset:"Herstellen",required:"Verplicht",description:"Omschrijving",title:"Titel",text:"Tekst"};

View File

@ -0,0 +1,10 @@
/* ===========================================================
* no_nb.js
* Norwegian Bokmål translation for Trumbowyg
* http://alex-d.github.com/Trumbowyg
* ===========================================================
* Author : Jon Severin Eivik Jakobsen
* Github : https://github.com/jsejakobsen
*/
// jshint camelcase:false
jQuery.trumbowyg.langs.no_nb={viewHTML:"Vis HTML",formatting:"Formater",p:"Avsnitt",blockquote:"Sitat",code:"Kode",header:"Overskrift",bold:"Fet",italic:"Kursiv",strikethrough:"Gjennomstreking",underline:"Understreking",strong:"Viktig",em:"Fremhevet",del:"Slettet",unorderedList:"Uordnet liste",orderedList:"Ordnet liste",insertImage:"Sett inn bilde",insertVideo:"Sett inn video",link:"Lenke",createLink:"Sett inn lenke",unlink:"Fjern lenke",justifyLeft:"Venstrejuster",justifyCenter:"Midtstill",justifyRight:"Høyrejuster",justifyFull:"Blokkjuster",horizontalRule:"Horisontal linje",fullscreen:"Full skjerm",close:"Lukk",submit:"Bekreft",reset:"Avbryt",required:"Påkrevd",description:"Beskrivelse",title:"Tittel",text:"Tekst"};

View File

@ -0,0 +1,8 @@
/* ===========================================================
* ph.js
* Filipino translation for Trumbowyg
* http://alex-d.github.com/Trumbowyg
* ===========================================================
* Author : @leogono
*/
jQuery.trumbowyg.langs.ph={viewHTML:"Tumingin sa HTML",formatting:"Formatting",p:"Talata",blockquote:"Blockquote",code:"Kowd",header:"Header",bold:"Makapal",italic:"Hilig",strikethrough:"Strikethrough",underline:"Salungguhit",strong:"Malakas",em:"Hilig",del:"Tinanggal",unorderedList:"Hindi nakahanay na listahan",orderedList:"Nakahanay na listahan",insertImage:"Ilagay ang larawan",insertVideo:"Ilagay ang video",link:"Koneksyon",createLink:"Iugnay",unlink:"Tanggalin ang koneksyon",justifyLeft:"Ihanay sa kaliwa",justifyCenter:"Ihanay sa gitna",justifyRight:"Ihanay sa kanan",justifyFull:"Ihanay sa kaliwa at kanan",horizontalRule:"Pahalang na linya",fullscreen:"Fullscreen",close:"Isara",submit:"Ipasa",reset:"I-reset",required:"Kailangan",description:"Paglalarawan",title:"Pamagat",text:"Teksto"};

View File

@ -0,0 +1,9 @@
/* ===========================================================
* pl.js
* Polish translation for Trumbowyg
* http://alex-d.github.com/Trumbowyg
* ===========================================================
* Author : Paweł Abramowicz
* Github : https://github.com/pawelabrams
*/
jQuery.trumbowyg.langs.pl={viewHTML:"Pokaż HTML",formatting:"Format",p:"Akapit",blockquote:"Cytat",code:"Kod",header:"Nagłówek",bold:"Pogrubienie",italic:"Pochylenie",strikethrough:"Przekreślenie",underline:"Podkreślenie",strong:"Wytłuszczenie",em:"Uwydatnienie",del:"Usunięte",unorderedList:"Lista nieuporządkowana",orderedList:"Lista uporządkowana",insertImage:"Wstaw obraz",insertVideo:"Wstaw film",link:"Link",createLink:"Wstaw link",unlink:"Usuń link",justifyLeft:"Wyrównaj do lewej",justifyCenter:"Wyśrodkuj",justifyRight:"Wyrównaj do prawej",justifyFull:"Wyjustuj",horizontalRule:"Odkreśl linią",fullscreen:"Pełny ekran",close:"Zamknij",submit:"Zastosuj",reset:"Przywróć",required:"Wymagane",description:"Opis",title:"Tytuł",text:"Tekst"};

View File

@ -0,0 +1,11 @@
/* ===========================================================
* pt.js
* Portuguese translation for Trumbowyg
* http://alex-d.github.com/Trumbowyg
* ===========================================================
* Author : Ramiro Varandas Jr (ramirovjr)
* Twitter : @ramirovjnr
* Website : about.me/ramirovjnr
* Github : https://github.com/ramirovjr
*/
jQuery.trumbowyg.langs.pt={viewHTML:"Ver HTML",undo:"Desfazer",redo:"Refazer",formatting:"Formatar",p:"Paragráfo",blockquote:"Citação",code:"Código",header:"Título",bold:"Negrito",italic:"Itálico",strikethrough:"Suprimir",underline:"Sublinhado",strong:"Negrito",em:"Ênfase",del:"Apagar",superscript:"Sobrescrito",subscript:"Subscrito",unorderedList:"Lista não ordenada",orderedList:"Lista ordenada",insertImage:"Inserir imagem",insertVideo:"Inserir vídeo",link:"Link",createLink:"Criar um link",unlink:"Remover link",justifyLeft:"Alinhar a esquerda",justifyCenter:"Centralizar",justifyRight:"Alinhar a direita",justifyFull:"Justificar",horizontalRule:"Inserir separador horizontal",removeformat:"Remover formatação",fullscreen:"Tela cheia",close:"Fechar",submit:"Enviar",reset:"Limpar",required:"Obrigatório",description:"Descrição",title:"Título",text:"Texto",target:"Target"};

View File

@ -0,0 +1,11 @@
/* ===========================================================
* pt_br.js
* Portuguese Brazilian translation for Trumbowyg
* http://alex-d.github.com/Trumbowyg
* ===========================================================
* Author : Alex Gotardi (alexgotardi)
* Twitter : @alexgotardi
* Github : https://github.com/alexgotardi
*/
// jshint camelcase:false
jQuery.trumbowyg.langs.pt_br={viewHTML:"Ver HTML",undo:"Desfazer",redo:"Refazer",formatting:"Formatar",p:"Parágrafo",blockquote:"Citação",code:"Código",header:"Título",bold:"Negrito",italic:"Itálico",strikethrough:"Tachado",underline:"Sublinhado",strong:"Negrito",em:"Ênfase",del:"Apagar",superscript:"Sobrescrito",subscript:"Subscrito",unorderedList:"Lista não ordenada",orderedList:"Lista ordenada",insertImage:"Inserir imagem",insertVideo:"Inserir vídeo",link:"Link",createLink:"Criar um link",unlink:"Remover link",justifyLeft:"Alinhar a esquerda",justifyCenter:"Centralizar",justifyRight:"Alinhar a direita",justifyFull:"Justificar",horizontalRule:"Inserir separador horizontal",removeformat:"Remover formatação",fullscreen:"Tela cheia",close:"Fechar",submit:"Enviar",reset:"Limpar",required:"Obrigatório",description:"Descrição",title:"Título",text:"Texto",target:"Target"};

View File

@ -0,0 +1,12 @@
/* ===========================================================
* ro.js
* Romanian translation for Trumbowyg
* http://alex-d.github.com/Trumbowyg
* ===========================================================
* Author : Vladut Radulescu (pacMakaveli)
* Email: pacMakaveli90@gmail.com
* Twitter : @pacMakaveli90
* Website : creative-studio51.co.uk
* Github : https://github.com/pacMakaveli
*/
jQuery.trumbowyg.langs.ro={viewHTML:"Vizualizare HTML",formatting:"Format",p:"Paragraf",blockquote:"Citație",code:"Cod",header:"Titlu",bold:"Bold",italic:"Italic",strikethrough:"Tăiat",underline:"Subliniat",strong:"Puternic",em:"Accentuat",del:"Sterge",unorderedList:"Lista dezordonată",orderedList:"Liste ordonată",insertImage:"Adăugare Imagine",insertVideo:"Adăugare Video",link:"Link",createLink:"Crează link",unlink:"Remover link",justifyLeft:"Aliniază stânga",justifyCenter:"Aliniază centru",justifyRight:"Aliniază dreapta",justifyFull:"Justificare",horizontalRule:"Linie orizontală",fullscreen:"Tot ecranul",close:"Închide",submit:"Procesează",reset:"Resetează",required:"Obligatoriu",description:"Descriere",title:"Titlu",text:"Text"};

View File

@ -0,0 +1,8 @@
/* ===========================================================
* rs.js
* Serbian (Cyrlic) translation for Trumbowyg
* https://www.github.com/johonunu
* ===========================================================
* Author : Nikola Trifunovic (https://www.github.com/johonunu)
*/
jQuery.trumbowyg.langs.rs={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:"Текст"};

View File

@ -0,0 +1,9 @@
/* ===========================================================
* rs_latin.js
* Serbian (Latin) translation for Trumbowyg
* https://www.github.com/johonunu
* ===========================================================
* Author : Nikola Trifunovic (https://www.github.com/johonunu)
*/
// jshint camelcase:false
jQuery.trumbowyg.langs.rs_latin={viewHTML:"Poglеdaj HTML kód",formatting:"Formatiranjе",p:"Paragraf",blockquote:"Citat",code:"Kód",header:"Naslov",bold:"Podеbljano",italic:"Kurziv",strikethrough:"Prеcrtano",underline:"Podvučеno",strong:"Podеbljano",em:"Istaknuto",del:"Obrisano",unorderedList:"Nеnabrojiva lista",orderedList:"Nabrojiva lista",insertImage:"Unеsi sliku",insertVideo:"Unеsi vidеo",link:"Link",createLink:"Unеsi link",unlink:"Ukloni link",justifyLeft:"Lеvo ravnanjе",justifyCenter:"Cеntralno ravnanjе",justifyRight:"Dеsno ravnanjе",justifyFull:"Obostrano ravnanjе",horizontalRule:"Horizontalna linija",fullscreen:"Rеžim čitavog еkrana",close:"Zatvori",submit:"Unеsi",reset:"Otkaži",required:"Obavеzno poljе",description:"Opis",title:"Naslov",text:"Tеkst"};

View File

@ -0,0 +1,8 @@
/* ===========================================================
* ru.js
* Russion translation for Trumbowyg
* http://alex-d.github.com/Trumbowyg
* ===========================================================
* Author : Yuri Lya
*/
jQuery.trumbowyg.langs.ru={viewHTML:"Посмотреть HTML",undo:"Отменить",redo:"Повторить",formatting:"Форматирование",p:"Обычный",blockquote:"Цитата",code:"Код",header:"Заголовок",bold:"Полужирный",italic:"Курсив",strikethrough:"Зачеркнутый",underline:"Подчеркнутый",strong:"Полужирный",em:"Курсив",del:"Зачеркнутый",superscript:"Надстрочный",subscript:"Подстрочный",unorderedList:"Обычный список",orderedList:"Нумерованный список",insertImage:"Вставить изображение",insertVideo:"Вставить видео",link:"Ссылка",createLink:"Вставить ссылку",unlink:"Удалить ссылку",justifyLeft:"По левому краю",justifyCenter:"По центру",justifyRight:"По правому краю",justifyFull:"По ширине",horizontalRule:"Горизонтальная линия",removeformat:"Очистить форматирование",fullscreen:"Во весь экран",close:"Закрыть",submit:"Вставить",reset:"Отменить",required:"Обязательное",description:"Описание",title:"Подсказка",text:"Текст"};

View File

@ -0,0 +1,8 @@
/* ===========================================================
* sk.js
* Slovak translation for Trumbowyg
* http://alex-d.github.com/Trumbowyg
* ===========================================================
* Author : VeeeneX (https://github.com/VeeeneX)
*/
jQuery.trumbowyg.langs.sk={viewHTML:"Zobraziť HTML",formatting:"Formátovanie",p:"Paragraf",blockquote:"Citácia",code:"Kód",header:"Nadpis",bold:"Tučné",italic:"Kurzíva",strikethrough:"Preškrtnuté",underline:"Podčiarknuté",strong:"Tučné",em:"Zvýrazniť",del:"Zmazať",unorderedList:"Netriedený zoznam",orderedList:"Triedený zoznam",insertImage:"Vložiť obrázok",insertVideo:"Vložiť video",link:"Odkaz",createLink:"Vložiť odkaz",unlink:"Zmazať odkaz",justifyLeft:"Zarovnať doľava",justifyCenter:"Zarovnať na stred",justifyRight:"Zarovnať doprava",justifyFull:"Zarovnať do bloku",horizontalRule:"Vložit vodorovnú čiaru",fullscreen:"Režim celej obrazovky",close:"Zavrieť",submit:"Potvrdiť",reset:"Zrušiť",required:"Povinné",description:"Popis",title:"Nadpis",text:"Text"};

View File

@ -0,0 +1,8 @@
/* ===========================================================
* sq.js
* Albanian translation for Trumbowyg
* http://alex-d.github.com/Trumbowyg
* ===========================================================
* Author : Adalen Vladi
*/
jQuery.trumbowyg.langs.sq={viewHTML:"Shfaq HTML",undo:"Prish",redo:"Ribej",formatting:"Formatimi",p:"Paragraf",blockquote:"Citat",code:"Kodi",header:"Koka",bold:"Spikatur",italic:"Pjerret",strikethrough:"Vize ne mes",underline:"Nenvizo",strong:"I trashe",em:"I theksuar",del:"I fshire",superscript:"Indeks i sipërm",subscript:"Indeks i poshtem",unorderedList:"Liste e parenditur",orderedList:"Liste e renditur",insertImage:"Fut Foto",insertVideo:"Fut Video",link:"Link",createLink:"Krijo Link",unlink:"Hiq Link",justifyLeft:"Drejto Majtas",justifyCenter:"Drejto ne Qender",justifyRight:"Drejto Djathtas",justifyFull:"Drejto Vete",horizontalRule:"Vendos rregulloren horizontale",removeformat:"Hiq formatin",fullscreen:"Ekran i plotë",close:"Mbyll",submit:"Konfirmo",reset:"Anullo",required:"I detyrueshem",description:"Pershkrimi",title:"Titulli",text:"Tekst",target:"Objektivi",width:"Gjeresia"};

View File

@ -0,0 +1,12 @@
/* ===========================================================
* sv.js
* Swedish translation for Trumbowyg
* http://www.tim-international.net
* ===========================================================
* Author : T. Almroth
* Github : https://github.com/timint
*
* Review : M Hagberg
* Github : https://github.com/pestbarn
*/
jQuery.trumbowyg.langs.sv={viewHTML:"Visa HTML",formatting:"Formatering",p:"Paragraf",blockquote:"Citat",code:"Kod",header:"Rubrik",bold:"Fet",italic:"Kursiv",strikethrough:"Genomstruken",underline:"Understruken",strong:"Fet",em:"Kursiv",del:"Rensa formatering",unorderedList:"Punktlista",orderedList:"Numrerad lista",insertImage:"Infoga bild",insertVideo:"Infoga video",link:"Länk",createLink:"Infoga länk",unlink:"Ta bort länk",justifyLeft:"Vänsterjustera",justifyCenter:"Centrera",justifyRight:"Högerjustera",justifyFull:"Marginaljustera",horizontalRule:"Horisontell linje",fullscreen:"Fullskärm",close:"Stäng",submit:"Bekräfta",reset:"Återställ",required:"Obligatorisk",description:"Beskrivning",title:"Titel",text:"Text"};

View File

@ -0,0 +1,9 @@
/* ===========================================================
* tr.js
* Turkish translation for Trumbowyg
* http://alex-d.github.com/Trumbowyg
* ===========================================================
* Author : Emrah Bilbay (munzur)
* Github : https://github.com/munzur
*/
jQuery.trumbowyg.langs.tr={viewHTML:"HTML Kodu",formatting:"Biçimlendirme",p:"Paragraf",blockquote:"Alıntı",code:"Kod",header:"Başlık",bold:"Kalın",italic:"İtalik",strikethrough:"Üzeri çizgili",underline:"Altı çizgili",strong:"Koyu",em:"Vurgulu",del:"Üzeri çizgili",unorderedList:"Simgeli liste",orderedList:"Numaralı liste",insertImage:"Resim yerleştir",insertVideo:"Video yerleştir",link:"Link",createLink:"Link yerleştir",unlink:"Linki sil",justifyLeft:"Sola hizala",justifyCenter:"Ortaya hizala",justifyRight:"Sağa hizala",justifyFull:"Yasla",horizontalRule:"Yatay satır ekle",fullscreen:"Tam ekran",close:"Kapat",submit:"Onayla",reset:"Sıfırla",required:"Gerekli",description:"Açıklama",title:"Başlık",text:"Metin"};

View File

@ -0,0 +1,8 @@
/* ===========================================================
* ua.js
* Ukrainian translation for Trumbowyg
* http://alex-d.github.com/Trumbowyg
* ===========================================================
* Author : Igor Buksha
*/
jQuery.trumbowyg.langs.ua={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:"Текст"};

View File

@ -0,0 +1,9 @@
/* ===========================================================
* vi.js
* Vietnamese translation for Trumbowyg
* http://alex-d.github.com/Trumbowyg
* ===========================================================
* Author : heocoi
* Github: https://github.com/heocoi
*/
jQuery.trumbowyg.langs.vi={viewHTML:"Hiển thị HTML",formatting:"Định dạng",p:"Đoạn",blockquote:"Trích dẫn",code:"Code",header:"Đầu trang",bold:"In đậm",italic:"In nghiêng",strikethrough:"Gạch ngang",underline:"Gạch chân",strong:"In đậm",em:"In nghiêng",del:"Gạch ngang",unorderedList:"Danh sách không thứ tự",orderedList:"Danh sách có thứ tự",insertImage:"Chèn hình ảnh",insertVideo:"Chèn video",link:"Đường dẫn",createLink:"Tạo đường dẫn",unlink:"Hủy đường dẫn",justifyLeft:"Canh lề trái",justifyCenter:"Canh giữa",justifyRight:"Canh lề phải",justifyFull:"Canh đều",horizontalRule:"Thêm đường kẻ ngang",fullscreen:"Toàn màn hình",close:"Đóng",submit:"Đồng ý",reset:"Hủy bỏ",required:"Bắt buộc",description:"Mô tả",title:"Tiêu đề",text:"Nội dung"};

View File

@ -0,0 +1,11 @@
/* ===========================================================
* zh_cn.js
* Simplified Chinese translation for Trumbowyg
* http://alex-d.github.com/Trumbowyg
* ===========================================================
* Author : Liu Kai (akai)
* Twitter : @akai404
* Github : https://github.com/akai
*/
// jshint camelcase:false
jQuery.trumbowyg.langs.zh_cn={viewHTML:"源代码",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:"文字"};

View File

@ -0,0 +1,11 @@
/* ===========================================================
* zh_tw.js
* Traditional Chinese translation for Trumbowyg
* http://alex-d.github.com/Trumbowyg
* ===========================================================
* Author : Peter Dave Hello (PeterDaveHello)
* Twitter : @PeterDaveHello
* Github : https://github.com/PeterDaveHello
*/
// jshint camelcase:false
jQuery.trumbowyg.langs.zh_tw={viewHTML:"原始碼",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:"文字"};

View File

@ -0,0 +1,143 @@
/* ===========================================================
* trumbowyg.allowTagsFromPaste.js v1.0.2
* It cleans tags from pasted text, whilst allowing several specified tags
* http://alex-d.github.com/Trumbowyg
* ===========================================================
* Author : Fathi Anshory (0x00000F5C)
* Twitter : @fscchannl
* Notes:
* - removeformatPasted must be set to FALSE since it was applied prior to pasteHandlers, or else it will be useless
* - It is most advisable to use along with the cleanpaste plugin, or else you'd end up with dirty markup
*/
(function ($) {
'use strict';
var defaultOptions = {
allowTagsFromPaste: [
'a',
'abbr',
'address',
'b',
'bdi',
'bdo',
'blockquote',
'br',
'cite',
'code',
'del',
'dfn',
'details',
'em',
'h1',
'h2',
'h3',
'h4',
'h5',
'h6',
'hr',
'i',
'ins',
'kbd',
'mark',
'meter',
'pre',
'progress',
'q',
'rp',
'rt',
'ruby',
's',
'samp',
'small',
'span',
'strong',
'sub',
'summary',
'sup',
'time',
'u',
'var',
'wbr',
'img',
'map',
'area',
'canvas',
'figcaption',
'figure',
'picture',
'audio',
'source',
'track',
'video',
'ul',
'ol',
'li',
'dl',
'dt',
'dd',
'table',
'caption',
'th',
'tr',
'td',
'thead',
'tbody',
'tfoot',
'col',
'colgroup',
'style',
'div',
'p',
'form',
'input',
'textarea',
'button',
'select',
'optgroup',
'option',
'label',
'fieldset',
'legend',
'datalist',
'keygen',
'output',
'iframe',
'link',
'nav',
'header',
'hgroup',
'footer',
'main',
'section',
'article',
'aside',
'dialog',
'script',
'noscript',
'embed',
'object',
'param'
]
};
$.extend(true, $.trumbowyg, {
plugins: {
allowTagsFromPaste: {
init: function (trumbowyg) {
trumbowyg.o.removeformatPasted = false;
trumbowyg.o.plugins.allowTagsFromPaste = trumbowyg.o.allowTagsFromPaste ? $(defaultOptions.allowTagsFromPaste).not(trumbowyg.o.allowTagsFromPaste).get() : [];
trumbowyg.pasteHandlers.push(function () {
setTimeout(function () {
var processNodes = trumbowyg.$ed.html();
$.each(trumbowyg.o.plugins.allowTagsFromPaste, function (iterator, tagName) {
processNodes = processNodes.replace(new RegExp('<\\/?' + tagName + '(\\s[^>]*)?>', 'gi'), '');
});
trumbowyg.$ed.html(processNodes);
}, 0);
});
}
}
}
});
})(jQuery);

View File

@ -0,0 +1 @@
!function(e){"use strict";var t={allowTagsFromPaste:["a","abbr","address","b","bdi","bdo","blockquote","br","cite","code","del","dfn","details","em","h1","h2","h3","h4","h5","h6","hr","i","ins","kbd","mark","meter","pre","progress","q","rp","rt","ruby","s","samp","small","span","strong","sub","summary","sup","time","u","var","wbr","img","map","area","canvas","figcaption","figure","picture","audio","source","track","video","ul","ol","li","dl","dt","dd","table","caption","th","tr","td","thead","tbody","tfoot","col","colgroup","style","div","p","form","input","textarea","button","select","optgroup","option","label","fieldset","legend","datalist","keygen","output","iframe","link","nav","header","hgroup","footer","main","section","article","aside","dialog","script","noscript","embed","object","param"]};e.extend(!0,e.trumbowyg,{plugins:{allowTagsFromPaste:{init:function(a){a.o.removeformatPasted=!1,a.o.plugins.allowTagsFromPaste=a.o.allowTagsFromPaste?e(t.allowTagsFromPaste).not(a.o.allowTagsFromPaste).get():[],a.pasteHandlers.push(function(){setTimeout(function(){var t=a.$ed.html();e.each(a.o.plugins.allowTagsFromPaste,function(e,a){t=t.replace(new RegExp("<\\/?"+a+"(\\s[^>]*)?>","gi"),"")}),a.$ed.html(t)},0)})}}}})}(jQuery);

View File

@ -0,0 +1,129 @@
/* ===========================================================
* trumbowyg.base64.js v1.0
* Base64 plugin for Trumbowyg
* http://alex-d.github.com/Trumbowyg
* ===========================================================
* Author : Cyril Biencourt (lizardK)
*/
(function ($) {
'use strict';
var isSupported = function () {
return typeof FileReader !== 'undefined';
};
var isValidImage = function (type) {
return /^data:image\/[a-z]?/i.test(type);
};
$.extend(true, $.trumbowyg, {
langs: {
// jshint camelcase:false
en: {
base64: 'Image as base64',
file: 'File',
errFileReaderNotSupported: 'FileReader is not supported by your browser.',
errInvalidImage: 'Invalid image file.'
},
fr: {
base64: 'Image en base64',
file: 'Fichier'
},
cs: {
base64: 'Vložit obrázek',
file: 'Soubor'
},
zh_cn: {
base64: '图片Base64编码',
file: '文件'
},
nl: {
base64: 'Afbeelding inline',
file: 'Bestand',
errFileReaderNotSupported: 'Uw browser ondersteunt deze functionaliteit niet.',
errInvalidImage: 'De gekozen afbeelding is ongeldig.'
},
ru: {
base64: 'Изображение как код в base64',
file: 'Файл',
errFileReaderNotSupported: 'FileReader не поддерживается вашим браузером.',
errInvalidImage: 'Недопустимый файл изображения.'
},
ja: {
base64: '画像 (Base64形式)',
file: 'ファイル',
errFileReaderNotSupported: 'あなたのブラウザーはFileReaderをサポートしていません',
errInvalidImage: '画像形式が正しくありません'
},
tr: {
base64: 'Base64 olarak resim',
file: 'Dosya',
errFileReaderNotSupported: 'FileReader tarayıcınız tarafından desteklenmiyor.',
errInvalidImage: 'Geçersiz resim dosyası.'
}
},
// jshint camelcase:true
plugins: {
base64: {
shouldInit: isSupported,
init: function (trumbowyg) {
var btnDef = {
isSupported: isSupported,
fn: function () {
trumbowyg.saveRange();
var file;
var $modal = trumbowyg.openModalInsert(
// Title
trumbowyg.lang.base64,
// Fields
{
file: {
type: 'file',
required: true,
attributes: {
accept: 'image/*'
}
},
alt: {
label: 'description',
value: trumbowyg.getRangeText()
}
},
// Callback
function (values) {
var fReader = new FileReader();
fReader.onloadend = function (e) {
if (isValidImage(e.target.result)) {
trumbowyg.execCmd('insertImage', fReader.result);
$(['img[src="', fReader.result, '"]:not([alt])'].join(''), trumbowyg.$box).attr('alt', values.alt);
trumbowyg.closeModal();
} else {
trumbowyg.addErrorOnModalField(
$('input[type=file]', $modal),
trumbowyg.lang.errInvalidImage
);
}
};
fReader.readAsDataURL(file);
}
);
$('input[type=file]').on('change', function (e) {
file = e.target.files[0];
});
}
};
trumbowyg.addBtnDef('base64', btnDef);
}
}
}
});
})(jQuery);

View File

@ -0,0 +1 @@
!function(e){"use strict";var a=function(){return"undefined"!=typeof FileReader},r=function(e){return/^data:image\/[a-z]?/i.test(e)};e.extend(!0,e.trumbowyg,{langs:{en:{base64:"Image as base64",file:"File",errFileReaderNotSupported:"FileReader is not supported by your browser.",errInvalidImage:"Invalid image file."},fr:{base64:"Image en base64",file:"Fichier"},cs:{base64:"Vložit obrázek",file:"Soubor"},zh_cn:{base64:"图片Base64编码",file:"文件"},nl:{base64:"Afbeelding inline",file:"Bestand",errFileReaderNotSupported:"Uw browser ondersteunt deze functionaliteit niet.",errInvalidImage:"De gekozen afbeelding is ongeldig."},ru:{base64:"Изображение как код в base64",file:"Файл",errFileReaderNotSupported:"FileReader не поддерживается вашим браузером.",errInvalidImage:"Недопустимый файл изображения."},ja:{base64:"画像 (Base64形式)",file:"ファイル",errFileReaderNotSupported:"あなたのブラウザーはFileReaderをサポートしていません",errInvalidImage:"画像形式が正しくありません"},tr:{base64:"Base64 olarak resim",file:"Dosya",errFileReaderNotSupported:"FileReader tarayıcınız tarafından desteklenmiyor.",errInvalidImage:"Geçersiz resim dosyası."}},plugins:{base64:{shouldInit:a,init:function(i){var t={isSupported:a,fn:function(){i.saveRange();var a,t=i.openModalInsert(i.lang.base64,{file:{type:"file",required:!0,attributes:{accept:"image/*"}},alt:{label:"description",value:i.getRangeText()}},function(n){var l=new FileReader;l.onloadend=function(a){r(a.target.result)?(i.execCmd("insertImage",l.result),e(['img[src="',l.result,'"]:not([alt])'].join(""),i.$box).attr("alt",n.alt),i.closeModal()):i.addErrorOnModalField(e("input[type=file]",t),i.lang.errInvalidImage)},l.readAsDataURL(a)});e("input[type=file]").on("change",function(e){a=e.target.files[0]})}};i.addBtnDef("base64",t)}}}})}(jQuery);

View File

@ -0,0 +1,112 @@
/* ===========================================================
* trumbowyg.cleanpaste.js v1.0
* Font Clean paste plugin for Trumbowyg
* http://alex-d.github.com/Trumbowyg
* ===========================================================
* Authors : Eric Radin
* Todd Graham (slackwalker)
*
* This plugin will perform a "cleaning" on any paste, in particular
* it will clean pasted content of microsoft word document tags and classes.
*/
(function ($) {
'use strict';
function checkValidTags(snippet) {
var theString = snippet;
// Replace uppercase element names with lowercase
theString = theString.replace(/<[^> ]*/g, function (match) {
return match.toLowerCase();
});
// Replace uppercase attribute names with lowercase
theString = theString.replace(/<[^>]*>/g, function (match) {
match = match.replace(/ [^=]+=/g, function (match2) {
return match2.toLowerCase();
});
return match;
});
// Put quotes around unquoted attributes
theString = theString.replace(/<[^>]*>/g, function (match) {
match = match.replace(/( [^=]+=)([^"][^ >]*)/g, '$1\"$2\"');
return match;
});
return theString;
}
function cleanIt(html) {
// first make sure all tags and attributes are made valid
html = checkValidTags(html);
// Replace opening bold tags with strong
html = html.replace(/<b(\s+|>)/g, '<strong$1');
// Replace closing bold tags with closing strong
html = html.replace(/<\/b(\s+|>)/g, '</strong$1');
// Replace italic tags with em
html = html.replace(/<i(\s+|>)/g, '<em$1');
// Replace closing italic tags with closing em
html = html.replace(/<\/i(\s+|>)/g, '</em$1');
// strip out comments -cgCraft
html = html.replace(/<!(?:--[\s\S]*?--\s*)?>\s*/g, '');
// strip out &nbsp; -cgCraft
html = html.replace(/&nbsp;/gi, ' ');
// strip out extra spaces -cgCraft
html = html.replace(/ <\//gi, '</');
while (html.indexOf(' ') !== -1) {
html = html.split(' ').join(' ');
}
// strip &nbsp; -cgCraft
html = html.replace(/^\s*|\s*$/g, '');
// Strip out unaccepted attributes
html = html.replace(/<[^>]*>/g, function (match) {
match = match.replace(/ ([^=]+)="[^"]*"/g, function (match2, attributeName) {
if (['alt', 'href', 'src', 'title'].indexOf(attributeName) !== -1) {
return match2;
}
return '';
});
return match;
});
// Final cleanout for MS Word crud
html = html.replace(/<\?xml[^>]*>/g, '');
html = html.replace(/<[^ >]+:[^>]*>/g, '');
html = html.replace(/<\/[^ >]+:[^>]*>/g, '');
// remove unwanted tags
html = html.replace(/<(div|span|style|meta|link).*?>/gi, '');
return html;
}
// clean editor
// this will clean the inserted contents
// it does a compare, before and after paste to determine the
// pasted contents
$.extend(true, $.trumbowyg, {
plugins: {
cleanPaste: {
init: function (trumbowyg) {
trumbowyg.pasteHandlers.push(function () {
try {
trumbowyg.$ed.html(cleanIt(trumbowyg.$ed.html()));
} catch (c) {
}
});
}
}
}
});
})(jQuery);

View File

@ -0,0 +1 @@
!function(e){"use strict";function r(e){var r=e;return r=r.replace(/<[^> ]*/g,function(e){return e.toLowerCase()}),r=r.replace(/<[^>]*>/g,function(e){return e=e.replace(/ [^=]+=/g,function(e){return e.toLowerCase()})}),r=r.replace(/<[^>]*>/g,function(e){return e=e.replace(/( [^=]+=)([^"][^ >]*)/g,'$1"$2"')})}function n(e){for(e=r(e),e=e.replace(/<b(\s+|>)/g,"<strong$1"),e=e.replace(/<\/b(\s+|>)/g,"</strong$1"),e=e.replace(/<i(\s+|>)/g,"<em$1"),e=e.replace(/<\/i(\s+|>)/g,"</em$1"),e=e.replace(/<!(?:--[\s\S]*?--\s*)?>\s*/g,""),e=e.replace(/&nbsp;/gi," "),e=e.replace(/ <\//gi,"</");e.indexOf(" ")!==-1;)e=e.split(" ").join(" ");return e=e.replace(/^\s*|\s*$/g,""),e=e.replace(/<[^>]*>/g,function(e){return e=e.replace(/ ([^=]+)="[^"]*"/g,function(e,r){return["alt","href","src","title"].indexOf(r)!==-1?e:""})}),e=e.replace(/<\?xml[^>]*>/g,""),e=e.replace(/<[^ >]+:[^>]*>/g,""),e=e.replace(/<\/[^ >]+:[^>]*>/g,""),e=e.replace(/<(div|span|style|meta|link).*?>/gi,"")}e.extend(!0,e.trumbowyg,{plugins:{cleanPaste:{init:function(e){e.pasteHandlers.push(function(){try{e.$ed.html(n(e.$ed.html()))}catch(r){}})}}}})}(jQuery);

View File

@ -0,0 +1,185 @@
/* ===========================================================
* trumbowyg.colors.js v1.2
* Colors picker plugin for Trumbowyg
* http://alex-d.github.com/Trumbowyg
* ===========================================================
* Author : Alexandre Demode (Alex-D)
* Twitter : @AlexandreDemode
* Website : alex-d.fr
*/
(function ($) {
'use strict';
$.extend(true, $.trumbowyg, {
langs: {
// jshint camelcase:false
cs: {
foreColor: 'Barva textu',
backColor: 'Barva pozadí'
},
en: {
foreColor: 'Text color',
backColor: 'Background color'
},
fr: {
foreColor: 'Couleur du texte',
backColor: 'Couleur de fond'
},
nl: {
foreColor: 'Tekstkleur',
backColor: 'Achtergrondkleur'
},
sk: {
foreColor: 'Farba textu',
backColor: 'Farba pozadia'
},
zh_cn: {
foreColor: '文字颜色',
backColor: '背景颜色'
},
ru: {
foreColor: 'Цвет текста',
backColor: 'Цвет выделения текста'
},
ja: {
foreColor: '文字色',
backColor: '背景色'
},
tr: {
foreColor: 'Yazı rengi',
backColor: 'Arkaplan rengi'
}
}
});
// jshint camelcase:true
function hex(x) {
return ('0' + parseInt(x).toString(16)).slice(-2);
}
function colorToHex(rgb) {
if (rgb.search('rgb') === -1) {
return rgb.replace('#', '');
} else if (rgb === 'rgba(0, 0, 0, 0)') {
return 'transparent';
} else {
rgb = rgb.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+))?\)$/);
return hex(rgb[1]) + hex(rgb[2]) + hex(rgb[3]);
}
}
function colorTagHandler(element, trumbowyg) {
var tags = [];
if (!element.style) {
return tags;
}
// background color
if (element.style.backgroundColor !== '') {
var backColor = colorToHex(element.style.backgroundColor);
if (trumbowyg.o.plugins.colors.colorList.indexOf(backColor) >= 0) {
tags.push('backColor' + backColor);
} else {
tags.push('backColorFree');
}
}
// text color
var foreColor;
if (element.style.color !== '') {
foreColor = colorToHex(element.style.color);
} else if (element.hasAttribute('color')) {
foreColor = colorToHex(element.getAttribute('color'));
}
if (foreColor) {
if (trumbowyg.o.plugins.colors.colorList.indexOf(foreColor) >= 0) {
tags.push('foreColor' + foreColor);
} else {
tags.push('foreColorFree');
}
}
return tags;
}
var defaultOptions = {
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']
};
// Add all colors in two dropdowns
$.extend(true, $.trumbowyg, {
plugins: {
color: {
init: function (trumbowyg) {
trumbowyg.o.plugins.colors = trumbowyg.o.plugins.colors || defaultOptions;
var foreColorBtnDef = {
dropdown: buildDropdown('foreColor', trumbowyg)
},
backColorBtnDef = {
dropdown: buildDropdown('backColor', trumbowyg)
};
trumbowyg.addBtnDef('foreColor', foreColorBtnDef);
trumbowyg.addBtnDef('backColor', backColorBtnDef);
},
tagHandler: colorTagHandler
}
}
});
function buildDropdown(fn, trumbowyg) {
var dropdown = [];
$.each(trumbowyg.o.plugins.colors.colorList, function (i, color) {
var btn = fn + color,
btnDef = {
fn: fn,
forceCss: true,
param: '#' + color,
style: 'background-color: #' + color + ';'
};
trumbowyg.addBtnDef(btn, btnDef);
dropdown.push(btn);
});
var removeColorButtonName = fn + 'Remove',
removeColorBtnDef = {
fn: 'removeFormat',
param: fn,
style: 'background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAG0lEQVQIW2NkQAAfEJMRmwBYhoGBYQtMBYoAADziAp0jtJTgAAAAAElFTkSuQmCC);'
};
trumbowyg.addBtnDef(removeColorButtonName, removeColorBtnDef);
dropdown.push(removeColorButtonName);
// add free color btn
var freeColorButtonName = fn + 'Free',
freeColorBtnDef = {
fn: function () {
trumbowyg.openModalInsert(trumbowyg.lang[fn],
{
color: {
label: fn,
value: '#FFFFFF'
}
},
// callback
function (values) {
trumbowyg.execCmd(fn, values.color);
return true;
}
);
},
text: '#',
// style adjust for displaying the text
style: 'text-indent: 0;line-height: 20px;padding: 0 5px;'
};
trumbowyg.addBtnDef(freeColorButtonName, freeColorBtnDef);
dropdown.push(freeColorButtonName);
return dropdown;
}
})(jQuery);

View File

@ -0,0 +1 @@
!function(o){"use strict";function r(o){return("0"+parseInt(o).toString(16)).slice(-2)}function e(o){return o.search("rgb")===-1?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 a(o,r){var a=[];if(!o.style)return a;if(""!==o.style.backgroundColor){var f=e(o.style.backgroundColor);r.o.plugins.colors.colorList.indexOf(f)>=0?a.push("backColor"+f):a.push("backColorFree")}var c;return""!==o.style.color?c=e(o.style.color):o.hasAttribute("color")&&(c=e(o.getAttribute("color"))),c&&(r.o.plugins.colors.colorList.indexOf(c)>=0?a.push("foreColor"+c):a.push("foreColorFree")),a}function f(r,e){var a=[];o.each(e.o.plugins.colors.colorList,function(o,f){var c=r+f,l={fn:r,forceCss:!0,param:"#"+f,style:"background-color: #"+f+";"};e.addBtnDef(c,l),a.push(c)});var f=r+"Remove",c={fn:"removeFormat",param:r,style:"background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAG0lEQVQIW2NkQAAfEJMRmwBYhoGBYQtMBYoAADziAp0jtJTgAAAAAElFTkSuQmCC);"};e.addBtnDef(f,c),a.push(f);var l=r+"Free",d={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(l,d),a.push(l),a}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"},nl:{foreColor:"Tekstkleur",backColor:"Achtergrondkleur"},sk:{foreColor:"Farba textu",backColor:"Farba pozadia"},zh_cn:{foreColor:"文字颜色",backColor:"背景颜色"},ru:{foreColor:"Цвет текста",backColor:"Цвет выделения текста"},ja:{foreColor:"文字色",backColor:"背景色"},tr:{foreColor:"Yazı rengi",backColor:"Arkaplan rengi"}}});var c={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(o){o.o.plugins.colors=o.o.plugins.colors||c;var r={dropdown:f("foreColor",o)},e={dropdown:f("backColor",o)};o.addBtnDef("foreColor",r),o.addBtnDef("backColor",e)},tagHandler:a}}})}(jQuery);

View File

@ -0,0 +1,49 @@
/**
* Trumbowyg v2.10.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-dropdown-foreColor,
.trumbowyg-dropdown-backColor {
width: 276px;
padding: 7px 5px;
svg {
display: none !important;
}
button {
display: block;
position: relative;
float: left;
text-indent: -9999px;
height: 20px;
width: 20px;
border: 1px solid #333;
padding: 0;
margin: 2px;
&:hover,
&:focus {
&::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;
}
}
}
}

View File

@ -0,0 +1,43 @@
/**
* Trumbowyg v2.10.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-dropdown-foreColor,
.trumbowyg-dropdown-backColor {
width: 276px;
padding: 7px 5px; }
.trumbowyg-dropdown-foreColor svg,
.trumbowyg-dropdown-backColor svg {
display: none !important; }
.trumbowyg-dropdown-foreColor button,
.trumbowyg-dropdown-backColor button {
display: block;
position: relative;
float: left;
text-indent: -9999px;
height: 20px;
width: 20px;
border: 1px solid #333;
padding: 0;
margin: 2px; }
.trumbowyg-dropdown-foreColor button:hover::after, .trumbowyg-dropdown-foreColor button:focus::after,
.trumbowyg-dropdown-backColor button:hover::after,
.trumbowyg-dropdown-backColor button:focus::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; }

View File

@ -0,0 +1,2 @@
/** Trumbowyg v2.10.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}

View File

@ -0,0 +1,968 @@
/* ===========================================================
* trumbowyg.emoji.js v0.1
* Emoji picker plugin for Trumbowyg
* http://alex-d.github.com/Trumbowyg
* ===========================================================
* Author : Nicolas Pion
* Twitter : @nicolas_pion
*/
(function ($) {
'use strict';
var defaultOptions = {
emojiList: [
':bowtie:',
':smile:',
':laughing:',
':blush:',
':smiley:',
':relaxed:',
':smirk:',
':heart_eyes:',
':kissing_heart:',
':kissing_closed_eyes:',
':flushed:',
':relieved:',
':satisfied:',
':grin:',
':wink:',
':stuck_out_tongue_winking_eye:',
':stuck_out_tongue_closed_eyes:',
':grinning:',
':kissing:',
':kissing_smiling_eyes:',
':stuck_out_tongue:',
':sleeping:',
':worried:',
':frowning:',
':anguished:',
':open_mouth:',
':grimacing:',
':confused:',
':hushed:',
':expressionless:',
':unamused:',
':sweat_smile:',
':sweat:',
':disappointed_relieved:',
':weary:',
':pensive:',
':disappointed:',
':confounded:',
':fearful:',
':cold_sweat:',
':persevere:',
':cry:',
':sob:',
':joy:',
':astonished:',
':scream:',
':neckbeard:',
':tired_face:',
':angry:',
':rage:',
':triumph:',
':sleepy:',
':yum:',
':mask:',
':sunglasses:',
':dizzy_face:',
':imp:',
':smiling_imp:',
':neutral_face:',
':no_mouth:',
':innocent:',
':alien:',
':yellow_heart:',
':blue_heart:',
':purple_heart:',
':heart:',
':green_heart:',
':broken_heart:',
':heartbeat:',
':heartpulse:',
':two_hearts:',
':revolving_hearts:',
':cupid:',
':sparkling_heart:',
':sparkles:',
':star:',
':star2:',
':dizzy:',
':boom:',
':collision:',
':anger:',
':exclamation:',
':question:',
':grey_exclamation:',
':grey_question:',
':zzz:',
':dash:',
':sweat_drops:',
':notes:',
':musical_note:',
':fire:',
':hankey:',
':poop:',
':shit:',
':+1:',
':thumbsup:',
':-1:',
':thumbsdown:',
':ok_hand:',
':punch:',
':facepunch:',
':fist:',
':v:',
':wave:',
':hand:',
':raised_hand:',
':open_hands:',
':point_up:',
':point_down:',
':point_left:',
':point_right:',
':raised_hands:',
':pray:',
':point_up_2:',
':clap:',
':muscle:',
':metal:',
':fu:',
':runner:',
':running:',
':couple:',
':family:',
':two_men_holding_hands:',
':two_women_holding_hands:',
':dancer:',
':dancers:',
':ok_woman:',
':no_good:',
':information_desk_person:',
':raising_hand:',
':bride_with_veil:',
':person_with_pouting_face:',
':person_frowning:',
':bow:',
':couplekiss:',
':couple_with_heart:',
':massage:',
':haircut:',
':nail_care:',
':boy:',
':girl:',
':woman:',
':man:',
':baby:',
':older_woman:',
':older_man:',
':person_with_blond_hair:',
':man_with_gua_pi_mao:',
':man_with_turban:',
':construction_worker:',
':cop:',
':angel:',
':princess:',
':smiley_cat:',
':smile_cat:',
':heart_eyes_cat:',
':kissing_cat:',
':smirk_cat:',
':scream_cat:',
':crying_cat_face:',
':joy_cat:',
':pouting_cat:',
':japanese_ogre:',
':japanese_goblin:',
':see_no_evil:',
':hear_no_evil:',
':speak_no_evil:',
':guardsman:',
':skull:',
':feet:',
':lips:',
':kiss:',
':droplet:',
':ear:',
':eyes:',
':nose:',
':tongue:',
':love_letter:',
':bust_in_silhouette:',
':busts_in_silhouette:',
':speech_balloon:',
':thought_balloon:',
':feelsgood:',
':finnadie:',
':goberserk:',
':godmode:',
':hurtrealbad:',
':rage1:',
':rage2:',
':rage3:',
':rage4:',
':suspect:',
':trollface:',
':sunny:',
':umbrella:',
':cloud:',
':snowflake:',
':snowman:',
':zap:',
':cyclone:',
':foggy:',
':ocean:',
':cat:',
':dog:',
':mouse:',
':hamster:',
':rabbit:',
':wolf:',
':frog:',
':tiger:',
':koala:',
':bear:',
':pig:',
':pig_nose:',
':cow:',
':boar:',
':monkey_face:',
':monkey:',
':horse:',
':racehorse:',
':camel:',
':sheep:',
':elephant:',
':panda_face:',
':snake:',
':bird:',
':baby_chick:',
':hatched_chick:',
':hatching_chick:',
':chicken:',
':penguin:',
':turtle:',
':bug:',
':honeybee:',
':ant:',
':beetle:',
':snail:',
':octopus:',
':tropical_fish:',
':fish:',
':whale:',
':whale2:',
':dolphin:',
':cow2:',
':ram:',
':rat:',
':water_buffalo:',
':tiger2:',
':rabbit2:',
':dragon:',
':goat:',
':rooster:',
':dog2:',
':pig2:',
':mouse2:',
':ox:',
':dragon_face:',
':blowfish:',
':crocodile:',
':dromedary_camel:',
':leopard:',
':cat2:',
':poodle:',
':paw_prints:',
':bouquet:',
':cherry_blossom:',
':tulip:',
':four_leaf_clover:',
':rose:',
':sunflower:',
':hibiscus:',
':maple_leaf:',
':leaves:',
':fallen_leaf:',
':herb:',
':mushroom:',
':cactus:',
':palm_tree:',
':evergreen_tree:',
':deciduous_tree:',
':chestnut:',
':seedling:',
':blossom:',
':ear_of_rice:',
':shell:',
':globe_with_meridians:',
':sun_with_face:',
':full_moon_with_face:',
':new_moon_with_face:',
':new_moon:',
':waxing_crescent_moon:',
':first_quarter_moon:',
':waxing_gibbous_moon:',
':full_moon:',
':waning_gibbous_moon:',
':last_quarter_moon:',
':waning_crescent_moon:',
':last_quarter_moon_with_face:',
':first_quarter_moon_with_face:',
':crescent_moon:',
':earth_africa:',
':earth_americas:',
':earth_asia:',
':volcano:',
':milky_way:',
':partly_sunny:',
':octocat:',
':squirrel:',
':bamboo:',
':gift_heart:',
':dolls:',
':school_satchel:',
':mortar_board:',
':flags:',
':fireworks:',
':sparkler:',
':wind_chime:',
':rice_scene:',
':jack_o_lantern:',
':ghost:',
':santa:',
':christmas_tree:',
':gift:',
':bell:',
':no_bell:',
':tanabata_tree:',
':tada:',
':confetti_ball:',
':balloon:',
':crystal_ball:',
':cd:',
':dvd:',
':floppy_disk:',
':camera:',
':video_camera:',
':movie_camera:',
':computer:',
':tv:',
':iphone:',
':phone:',
':telephone:',
':telephone_receiver:',
':pager:',
':fax:',
':minidisc:',
':vhs:',
':sound:',
':speaker:',
':mute:',
':loudspeaker:',
':mega:',
':hourglass:',
':hourglass_flowing_sand:',
':alarm_clock:',
':watch:',
':radio:',
':satellite:',
':loop:',
':mag:',
':mag_right:',
':unlock:',
':lock:',
':lock_with_ink_pen:',
':closed_lock_with_key:',
':key:',
':bulb:',
':flashlight:',
':high_brightness:',
':low_brightness:',
':electric_plug:',
':battery:',
':calling:',
':email:',
':mailbox:',
':postbox:',
':bath:',
':bathtub:',
':shower:',
':toilet:',
':wrench:',
':nut_and_bolt:',
':hammer:',
':seat:',
':moneybag:',
':yen:',
':dollar:',
':pound:',
':euro:',
':credit_card:',
':money_with_wings:',
':e-mail:',
':inbox_tray:',
':outbox_tray:',
':envelope:',
':incoming_envelope:',
':postal_horn:',
':mailbox_closed:',
':mailbox_with_mail:',
':mailbox_with_no_mail:',
':package:',
':door:',
':smoking:',
':bomb:',
':gun:',
':hocho:',
':pill:',
':syringe:',
':page_facing_up:',
':page_with_curl:',
':bookmark_tabs:',
':bar_chart:',
':chart_with_upwards_trend:',
':chart_with_downwards_trend:',
':scroll:',
':clipboard:',
':calendar:',
':date:',
':card_index:',
':file_folder:',
':open_file_folder:',
':scissors:',
':pushpin:',
':paperclip:',
':black_nib:',
':pencil2:',
':straight_ruler:',
':triangular_ruler:',
':closed_book:',
':green_book:',
':blue_book:',
':orange_book:',
':notebook:',
':notebook_with_decorative_cover:',
':ledger:',
':books:',
':bookmark:',
':name_badge:',
':microscope:',
':telescope:',
':newspaper:',
':football:',
':basketball:',
':soccer:',
':baseball:',
':tennis:',
':8ball:',
':rugby_football:',
':bowling:',
':golf:',
':mountain_bicyclist:',
':bicyclist:',
':horse_racing:',
':snowboarder:',
':swimmer:',
':surfer:',
':ski:',
':spades:',
':hearts:',
':clubs:',
':diamonds:',
':gem:',
':ring:',
':trophy:',
':musical_score:',
':musical_keyboard:',
':violin:',
':space_invader:',
':video_game:',
':black_joker:',
':flower_playing_cards:',
':game_die:',
':dart:',
':mahjong:',
':clapper:',
':memo:',
':pencil:',
':book:',
':art:',
':microphone:',
':headphones:',
':trumpet:',
':saxophone:',
':guitar:',
':shoe:',
':sandal:',
':high_heel:',
':lipstick:',
':boot:',
':shirt:',
':tshirt:',
':necktie:',
':womans_clothes:',
':dress:',
':running_shirt_with_sash:',
':jeans:',
':kimono:',
':bikini:',
':ribbon:',
':tophat:',
':crown:',
':womans_hat:',
':mans_shoe:',
':closed_umbrella:',
':briefcase:',
':handbag:',
':pouch:',
':purse:',
':eyeglasses:',
':fishing_pole_and_fish:',
':coffee:',
':tea:',
':sake:',
':baby_bottle:',
':beer:',
':beers:',
':cocktail:',
':tropical_drink:',
':wine_glass:',
':fork_and_knife:',
':pizza:',
':hamburger:',
':fries:',
':poultry_leg:',
':meat_on_bone:',
':spaghetti:',
':curry:',
':fried_shrimp:',
':bento:',
':sushi:',
':fish_cake:',
':rice_ball:',
':rice_cracker:',
':rice:',
':ramen:',
':stew:',
':oden:',
':dango:',
':egg:',
':bread:',
':doughnut:',
':custard:',
':icecream:',
':ice_cream:',
':shaved_ice:',
':birthday:',
':cake:',
':cookie:',
':chocolate_bar:',
':candy:',
':lollipop:',
':honey_pot:',
':apple:',
':green_apple:',
':tangerine:',
':lemon:',
':cherries:',
':grapes:',
':watermelon:',
':strawberry:',
':peach:',
':melon:',
':banana:',
':pear:',
':pineapple:',
':sweet_potato:',
':eggplant:',
':tomato:',
':corn:',
':house:',
':house_with_garden:',
':school:',
':office:',
':post_office:',
':hospital:',
':bank:',
':convenience_store:',
':love_hotel:',
':hotel:',
':wedding:',
':church:',
':department_store:',
':european_post_office:',
':city_sunrise:',
':city_sunset:',
':japanese_castle:',
':european_castle:',
':tent:',
':factory:',
':tokyo_tower:',
':japan:',
':mount_fuji:',
':sunrise_over_mountains:',
':sunrise:',
':stars:',
':statue_of_liberty:',
':bridge_at_night:',
':carousel_horse:',
':rainbow:',
':ferris_wheel:',
':fountain:',
':roller_coaster:',
':ship:',
':speedboat:',
':boat:',
':sailboat:',
':rowboat:',
':anchor:',
':rocket:',
':airplane:',
':helicopter:',
':steam_locomotive:',
':tram:',
':mountain_railway:',
':bike:',
':aerial_tramway:',
':suspension_railway:',
':mountain_cableway:',
':tractor:',
':blue_car:',
':oncoming_automobile:',
':car:',
':red_car:',
':taxi:',
':oncoming_taxi:',
':articulated_lorry:',
':bus:',
':oncoming_bus:',
':rotating_light:',
':police_car:',
':oncoming_police_car:',
':fire_engine:',
':ambulance:',
':minibus:',
':truck:',
':train:',
':station:',
':train2:',
':bullettrain_front:',
':bullettrain_side:',
':light_rail:',
':monorail:',
':railway_car:',
':trolleybus:',
':ticket:',
':fuelpump:',
':vertical_traffic_light:',
':traffic_light:',
':warning:',
':construction:',
':beginner:',
':atm:',
':slot_machine:',
':busstop:',
':barber:',
':hotsprings:',
':checkered_flag:',
':crossed_flags:',
':izakaya_lantern:',
':moyai:',
':circus_tent:',
':performing_arts:',
':round_pushpin:',
':triangular_flag_on_post:',
':jp:',
':kr:',
':cn:',
':us:',
':fr:',
':es:',
':it:',
':ru:',
':gb:',
':uk:',
':de:',
':one:',
':two:',
':three:',
':four:',
':five:',
':six:',
':seven:',
':eight:',
':nine:',
':keycap_ten:',
':1234:',
':zero:',
':hash:',
':symbols:',
':arrow_backward:',
':arrow_down:',
':arrow_forward:',
':arrow_left:',
':capital_abcd:',
':abcd:',
':abc:',
':arrow_lower_left:',
':arrow_lower_right:',
':arrow_right:',
':arrow_up:',
':arrow_upper_left:',
':arrow_upper_right:',
':arrow_double_down:',
':arrow_double_up:',
':arrow_down_small:',
':arrow_heading_down:',
':arrow_heading_up:',
':leftwards_arrow_with_hook:',
':arrow_right_hook:',
':left_right_arrow:',
':arrow_up_down:',
':arrow_up_small:',
':arrows_clockwise:',
':arrows_counterclockwise:',
':rewind:',
':fast_forward:',
':information_source:',
':ok:',
':twisted_rightwards_arrows:',
':repeat:',
':repeat_one:',
':new:',
':top:',
':up:',
':cool:',
':free:',
':ng:',
':cinema:',
':koko:',
':signal_strength:',
':u5272:',
':u5408:',
':u55b6:',
':u6307:',
':u6708:',
':u6709:',
':u6e80:',
':u7121:',
':u7533:',
':u7a7a:',
':u7981:',
':sa:',
':restroom:',
':mens:',
':womens:',
':baby_symbol:',
':no_smoking:',
':parking:',
':wheelchair:',
':metro:',
':baggage_claim:',
':accept:',
':wc:',
':potable_water:',
':put_litter_in_its_place:',
':secret:',
':congratulations:',
':m:',
':passport_control:',
':left_luggage:',
':customs:',
':ideograph_advantage:',
':cl:',
':sos:',
':id:',
':no_entry_sign:',
':underage:',
':no_mobile_phones:',
':do_not_litter:',
':non-potable_water:',
':no_bicycles:',
':no_pedestrians:',
':children_crossing:',
':no_entry:',
':eight_spoked_asterisk:',
':sparkle:',
':eight_pointed_black_star:',
':heart_decoration:',
':vs:',
':vibration_mode:',
':mobile_phone_off:',
':chart:',
':currency_exchange:',
':aries:',
':taurus:',
':gemini:',
':cancer:',
':leo:',
':virgo:',
':libra:',
':scorpius:',
':sagittarius:',
':capricorn:',
':aquarius:',
':pisces:',
':ophiuchus:',
':six_pointed_star:',
':negative_squared_cross_mark:',
':a:',
':b:',
':ab:',
':o2:',
':diamond_shape_with_a_dot_inside:',
':recycle:',
':end:',
':back:',
':on:',
':soon:',
':clock1:',
':clock130:',
':clock10:',
':clock1030:',
':clock11:',
':clock1130:',
':clock12:',
':clock1230:',
':clock2:',
':clock230:',
':clock3:',
':clock330:',
':clock4:',
':clock430:',
':clock5:',
':clock530:',
':clock6:',
':clock630:',
':clock7:',
':clock730:',
':clock8:',
':clock830:',
':clock9:',
':clock930:',
':heavy_dollar_sign:',
':copyright:',
':registered:',
':tm:',
':x:',
':heavy_exclamation_mark:',
':bangbang:',
':interrobang:',
':o:',
':heavy_multiplication_x:',
':heavy_plus_sign:',
':heavy_minus_sign:',
':heavy_division_sign:',
':white_flower:',
':100:',
':heavy_check_mark:',
':ballot_box_with_check:',
':radio_button:',
':link:',
':curly_loop:',
':wavy_dash:',
':part_alternation_mark:',
':trident:',
':black_small_square:',
':white_small_square:',
':black_medium_small_square:',
':white_medium_small_square:',
':black_medium_square:',
':white_medium_square:',
':white_large_square:',
':white_check_mark:',
':black_square_button:',
':white_square_button:',
':black_circle:',
':white_circle:',
':red_circle:',
':large_blue_circle:',
':large_blue_diamond:',
':large_orange_diamond:',
':small_blue_diamond:',
':small_orange_diamond:',
':small_red_triangle:',
':small_red_triangle_down:',
':shipit:'
]
};
// Add all emoji in a dropdown
$.extend(true, $.trumbowyg, {
langs: {
// jshint camelcase:false
en: {
emoji: 'Add an emoji'
},
fr: {
emoji: 'Ajouter un emoji'
},
zh_cn: {
emoji: '添加表情'
},
ru: {
emoji: 'Вставить emoji'
},
ja: {
emoji: '絵文字の挿入'
},
tr: {
emoji: 'Emoji ekle'
}
},
// jshint camelcase:true
plugins: {
emoji: {
init: function (trumbowyg) {
trumbowyg.o.plugins.emoji = trumbowyg.o.plugins.emoji || defaultOptions;
var emojiBtnDef = {
dropdown: buildDropdown(trumbowyg)
};
trumbowyg.addBtnDef('emoji', emojiBtnDef);
}
}
}
});
function buildDropdown(trumbowyg) {
var dropdown = [];
$.each(trumbowyg.o.plugins.emoji.emojiList, function (i, emoji) {
if ($.isArray(emoji)) { // Custom emoji behaviour
var emojiCode = emoji[0],
emojiUrl = emoji[1],
emojiHtml = '<img src="' + emojiUrl + '" alt="' + emojiCode + '">',
customEmojiBtnName = 'emoji-' + emojiCode.replace(/:/g, ''),
customEmojiBtnDef = {
hasIcon: false,
text: emojiHtml,
fn: function () {
trumbowyg.execCmd('insertImage', emojiUrl, false, true);
return true;
}
};
trumbowyg.addBtnDef(customEmojiBtnName, customEmojiBtnDef);
dropdown.push(customEmojiBtnName);
} else { // Default behaviour
var btn = emoji.replace(/:/g, ''),
defaultEmojiBtnName = 'emoji-' + btn,
defaultEmojiBtnDef = {
text: emoji,
fn: function () {
trumbowyg.execCmd('insertText', emoji);
return true;
}
};
trumbowyg.addBtnDef(defaultEmojiBtnName, defaultEmojiBtnDef);
dropdown.push(defaultEmojiBtnName);
}
});
return dropdown;
}
})(jQuery);

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,56 @@
/**
* Trumbowyg v2.10.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-dropdown-emoji {
width: 265px;
padding: 7px 0 7px 5px;
height: 200px;
overflow-y: scroll;
overflow-x: hidden;
}
.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;
&:hover,
&:focus {
&::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;
}

View File

@ -0,0 +1,47 @@
/**
* Trumbowyg v2.10.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-dropdown-emoji {
width: 265px;
padding: 7px 0 7px 5px;
height: 200px;
overflow-y: scroll;
overflow-x: hidden; }
.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:hover::after, .trumbowyg-dropdown-emoji button:focus::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; }

View File

@ -0,0 +1,2 @@
/** Trumbowyg v2.10.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;height:200px;overflow-y:scroll;overflow-x:hidden}.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}

View File

@ -0,0 +1,73 @@
(function ($) {
'use strict';
$.extend(true, $.trumbowyg, {
langs: {
// jshint camelcase:false
en: {
fontFamily: 'Font'
},
fr: {
fontFamily: 'Police'
},
nl: {
fontFamily: 'Lettertype'
},
tr: {
fontFamily: 'Yazı Tipi'
}
}
});
// jshint camelcase:true
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: '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'}
]
};
// Add dropdown with web safe fonts
$.extend(true, $.trumbowyg, {
plugins: {
fontfamily: {
init: function (trumbowyg) {
trumbowyg.o.plugins.fontfamily = trumbowyg.o.plugins.fontfamily || defaultOptions;
trumbowyg.addBtnDef('fontfamily', {
dropdown: buildDropdown(trumbowyg),
hasIcon: false,
text: trumbowyg.lang.fontFamily
});
}
}
}
});
function buildDropdown(trumbowyg) {
var dropdown = [];
$.each(trumbowyg.o.plugins.fontfamily.fontList, function (index, font) {
trumbowyg.addBtnDef('fontfamily_' + index, {
title: '<span style="font-family: ' + font.family + ';">' + font.name + '</span>',
hasIcon: false,
fn: function () {
trumbowyg.execCmd('fontName', font.family, true);
}
});
dropdown.push('fontfamily_' + index);
});
return dropdown;
}
})(jQuery);

View File

@ -0,0 +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:'<span style="font-family: '+e.family+';">'+e.name+"</span>",hasIcon:!1,fn:function(){n.execCmd("fontName",e.family,!0)}}),i.push("fontfamily_"+a)}),i}a.extend(!0,a.trumbowyg,{langs:{en:{fontFamily:"Font"},fr:{fontFamily:"Police"},nl:{fontFamily:"Lettertype"},tr:{fontFamily:"Yazı Tipi"}}});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(a){a.o.plugins.fontfamily=a.o.plugins.fontfamily||i,a.addBtnDef("fontfamily",{dropdown:n(a),hasIcon:!1,text:a.lang.fontFamily})}}}})}(jQuery);

View File

@ -0,0 +1,117 @@
(function ($) {
'use strict';
$.extend(true, $.trumbowyg, {
langs: {
// jshint camelcase:false
en: {
fontsize: 'Font size',
fontsizes: {
'x-small': 'Extra small',
'small': 'Small',
'medium': 'Regular',
'large': 'Large',
'x-large': 'Extra large',
'custom': 'Custom'
}
},
fr: {
fontsize: 'Taille de la police',
fontsizes: {
'x-small': 'Très petit',
'small': 'Petit',
'medium': 'Normal',
'large': 'Grand',
'x-large': 'Très grand',
'custom': 'Douane'
}
},
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'
}
}
}
});
// jshint camelcase:true
// Add dropdown with font sizes
$.extend(true, $.trumbowyg, {
plugins: {
fontsize: {
init: function (trumbowyg) {
trumbowyg.addBtnDef('fontsize', {
dropdown: buildDropdown(trumbowyg)
});
}
}
}
});
function buildDropdown(trumbowyg) {
var dropdown = [];
var sizes = ['x-small', 'small', 'medium', 'large', 'x-large'];
$.each(sizes, function (index, size) {
trumbowyg.addBtnDef('fontsize_' + size, {
text: '<span style="font-size: ' + size + ';">' + trumbowyg.lang.fontsizes[size] + '</span>',
hasIcon: false,
fn: function () {
trumbowyg.execCmd('fontSize', index + 1, true);
}
});
dropdown.push('fontsize_' + size);
});
var freeSizeButtonName = 'fontsize_custom',
freeSizeBtnDef = {
fn: function () {
trumbowyg.openModalInsert('Custom Font Size',
{
size: {
label: 'Font Size',
value: '48px'
}
},
function (values) {
var text = trumbowyg.range.startContainer.parentElement;
var selectedText = trumbowyg.getRangeText();
if ($(text).html() === selectedText) {
$(text).css('font-size', values.size);
} else {
trumbowyg.range.deleteContents();
var html = '<span style="font-size: ' + values.size + ';">' + selectedText + '</span>';
var node = $(html)[0];
trumbowyg.range.insertNode(node);
}
trumbowyg.saveRange();
return true;
}
);
},
text: '<span style="font-size: medium;">' + trumbowyg.lang.fontsizes.custom + '</span>',
hasIcon: false
};
trumbowyg.addBtnDef(freeSizeButtonName, freeSizeBtnDef);
dropdown.push(freeSizeButtonName);
return dropdown;
}
})(jQuery);

View File

@ -0,0 +1 @@
!function(e){"use strict";function t(t){var n=[],s=["x-small","small","medium","large","x-large"];e.each(s,function(e,s){t.addBtnDef("fontsize_"+s,{text:'<span style="font-size: '+s+';">'+t.lang.fontsizes[s]+"</span>",hasIcon:!1,fn:function(){t.execCmd("fontSize",e+1,!0)}}),n.push("fontsize_"+s)});var a="fontsize_custom",o={fn:function(){t.openModalInsert("Custom Font Size",{size:{label:"Font Size",value:"48px"}},function(n){var s=t.range.startContainer.parentElement,a=t.getRangeText();if(e(s).html()===a)e(s).css("font-size",n.size);else{t.range.deleteContents();var o='<span style="font-size: '+n.size+';">'+a+"</span>",l=e(o)[0];t.range.insertNode(l)}return t.saveRange(),!0})},text:'<span style="font-size: medium;">'+t.lang.fontsizes.custom+"</span>",hasIcon:!1};return t.addBtnDef(a,o),n.push(a),n}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"}},fr:{fontsize:"Taille de la police",fontsizes:{"x-small":"Très petit",small:"Petit",medium:"Normal",large:"Grand","x-large":"Très grand",custom:"Douane"}},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"}}}}),e.extend(!0,e.trumbowyg,{plugins:{fontsize:{init:function(e){e.addBtnDef("fontsize",{dropdown:t(e)})}}}})}(jQuery);

View File

@ -0,0 +1,82 @@
/* globals Prism */
(function ($, Prism) {
'use strict';
// My plugin default options
var defaultOptions = {};
function highlightIt(text, language) {
return [
'<pre class="language-' + language + '">',
'<code class="language-' + language + '">' + Prism.highlight(text, Prism.languages[language]) + '</code>',
'</pre>',
].join('');
}
// If my plugin is a button
function buildButtonDef(trumbowyg) {
return {
fn: function () {
var $modal = trumbowyg.openModal('Code', [
'<div class="' + trumbowyg.o.prefix + 'highlight-form-group">',
' <select class="' + trumbowyg.o.prefix + 'highlight-form-control language">',
(function () {
var options = '';
for (var lang in Prism.languages) {
if (Prism.languages[lang].comment) {
options += '<option value="' + lang + '">' + lang + '</option>';
}
}
return options;
})(),
' </select>',
'</div>',
'<div class="' + trumbowyg.o.prefix + 'highlight-form-group">',
' <textarea class="' + trumbowyg.o.prefix + 'highlight-form-control code"></textarea>',
'</div>',
].join('\n')),
$language = $modal.find('.language'),
$code = $modal.find('.code');
// Listen clicks on modal box buttons
$modal.on('tbwconfirm', function () {
trumbowyg.restoreRange();
trumbowyg.execCmd('insertHTML', highlightIt($code.val(), $language.val()));
trumbowyg.execCmd('insertHTML', '<p><br></p>');
trumbowyg.closeModal();
});
$modal.on('tbwcancel', function () {
trumbowyg.closeModal();
});
}
};
}
$.extend(true, $.trumbowyg, {
// Add some translations
langs: {
en: {
highlight: 'Code syntax highlight'
}
},
// Add our plugin to Trumbowyg registred plugins
plugins: {
highlight: {
init: function (trumbowyg) {
// Fill current Trumbowyg instance with my plugin default options
trumbowyg.o.plugins.highlight = $.extend(true, {},
defaultOptions,
trumbowyg.o.plugins.highlight || {}
);
// If my plugin is a button
trumbowyg.addBtnDef('highlight', buildButtonDef(trumbowyg));
}
}
}
});
})(jQuery, Prism);

View File

@ -0,0 +1 @@
!function(n,i){"use strict";function e(n,e){return['<pre class="language-'+e+'">','<code class="language-'+e+'">'+i.highlight(n,i.languages[e])+"</code>","</pre>"].join("")}function o(n){return{fn:function(){var o=n.openModal("Code",['<div class="'+n.o.prefix+'highlight-form-group">',' <select class="'+n.o.prefix+'highlight-form-control language">',function(){var n="";for(var e in i.languages)i.languages[e].comment&&(n+='<option value="'+e+'">'+e+"</option>");return n}()," </select>","</div>",'<div class="'+n.o.prefix+'highlight-form-group">',' <textarea class="'+n.o.prefix+'highlight-form-control code"></textarea>',"</div>"].join("\n")),t=o.find(".language"),g=o.find(".code");o.on("tbwconfirm",function(){n.restoreRange(),n.execCmd("insertHTML",e(g.val(),t.val())),n.execCmd("insertHTML","<p><br></p>"),n.closeModal()}),o.on("tbwcancel",function(){n.closeModal()})}}}var t={};n.extend(!0,n.trumbowyg,{langs:{en:{highlight:"Code syntax highlight"}},plugins:{highlight:{init:function(i){i.o.plugins.highlight=n.extend(!0,{},t,i.o.plugins.highlight||{}),i.addBtnDef("highlight",o(i))}}}})}(jQuery,Prism);

View File

@ -0,0 +1,25 @@
/**
* Trumbowyg v2.10.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-highlight-form-group {
margin: 15px 10px;
.trumbowyg-highlight-form-control {
width: 100%;
border: 1px solid #DEDEDE;
font-size: 14px;
padding: 7px;
&.code {
height: 200px;
}
}
}

View File

@ -0,0 +1,20 @@
/**
* Trumbowyg v2.10.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-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; }

View File

@ -0,0 +1,2 @@
/** Trumbowyg v2.10.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}

View File

@ -0,0 +1,190 @@
/*/* ===========================================================
* trumbowyg.history.js v1.0
* history plugin for Trumbowyg
* http://alex-d.github.com/Trumbowyg
* ===========================================================
* Author : Sven Dunemann [dunemann@forelabs.eu]
*/
(function ($) {
'use strict';
$.extend(true, $.trumbowyg, {
langs: {
de: {
history: {
redo: 'Wiederholen',
undo: 'Rückgängig'
}
},
en: {
history: {
redo: 'Redo',
undo: 'Undo'
}
},
fr: {
history: {
redo: 'Annuler',
undo: 'Rétablir'
}
}
},
plugins: {
history: {
init: function (t) {
t.o.plugins.history = $.extend(true, {
_stack: [],
_index: -1,
_focusEl: undefined
}, t.o.plugins.history || {});
var btnBuildDefRedo = {
title: t.lang.history.redo,
ico: 'redo',
key: 'Y',
fn: function () {
if (t.o.plugins.history._index < t.o.plugins.history._stack.length - 1) {
t.o.plugins.history._index += 1;
var index = t.o.plugins.history._index;
var newState = t.o.plugins.history._stack[index];
t.execCmd('html', newState);
// because of some semantic optimisations we have to save the state back
// to history
t.o.plugins.history._stack[index] = t.$ed.html();
carretToEnd();
toggleButtonStates();
}
}
};
var btnBuildDefUndo = {
title: t.lang.history.undo,
ico: 'undo',
key: 'Z',
fn: function () {
if (t.o.plugins.history._index > 0) {
t.o.plugins.history._index -= 1;
var index = t.o.plugins.history._index,
newState = t.o.plugins.history._stack[index];
t.execCmd('html', newState);
// because of some semantic optimisations we have to save the state back
// to history
t.o.plugins.history._stack[index] = t.$ed.html();
carretToEnd();
toggleButtonStates();
}
}
};
var pushToHistory = function () {
var index = t.o.plugins.history._index,
stack = t.o.plugins.history._stack,
latestState = stack.slice(-1)[0] || '<p></p>',
prevState = stack[index],
newState = t.$ed.html(),
focusEl = t.doc.getSelection().focusNode,
focusElText = '',
latestStateTagsList,
newStateTagsList,
prevFocusEl = t.o.plugins.history._focusEl;
latestStateTagsList = $('<div>' + latestState + '</div>').find('*').map(function () {
return this.localName;
});
newStateTagsList = $('<div>' + newState + '</div>').find('*').map(function () {
return this.localName;
});
if (focusEl) {
t.o.plugins.history._focusEl = focusEl;
focusElText = focusEl.outerHTML || focusEl.textContent;
}
if (newState !== prevState) {
// a new stack entry is defined when current insert ends on a whitespace character
// or count of node elements has been changed
// or focused element differs from previous one
if (focusElText.slice(-1).match(/\s/) ||
!arraysAreIdentical(latestStateTagsList, newStateTagsList) ||
t.o.plugins.history._index <= 0 || focusEl !== prevFocusEl)
{
t.o.plugins.history._index += 1;
// remove newer entries in history when something new was added
// because timeline was changes with interaction
t.o.plugins.history._stack = stack.slice(
0, t.o.plugins.history._index
);
// now add new state to modifed history
t.o.plugins.history._stack.push(newState);
} else {
// modify last stack entry
t.o.plugins.history._stack[index] = newState;
}
toggleButtonStates();
}
};
var toggleButtonStates = function () {
var index = t.o.plugins.history._index,
stackSize = t.o.plugins.history._stack.length,
undoState = (index > 0),
redoState = (stackSize !== 0 && index !== stackSize - 1);
toggleButtonState('historyUndo', undoState);
toggleButtonState('historyRedo', redoState);
};
var toggleButtonState = function (btn, enable) {
var button = t.$box.find('.trumbowyg-' + btn + '-button');
if (enable) {
button.removeClass('trumbowyg-disable');
} else if (!button.hasClass('trumbowyg-disable')) {
button.addClass('trumbowyg-disable');
}
};
var arraysAreIdentical = function (a, b) {
if (a === b) {
return true;
}
if (a == null || b == null) {
return false;
}
if (a.length !== b.length) {
return false;
}
for (var i = 0; i < a.length; i += 1) {
if (a[i] !== b[i]) {
return false;
}
}
return true;
};
var carretToEnd = function () {
var node = t.doc.getSelection().focusNode,
range = t.doc.createRange();
if (node.childNodes.length > 0) {
range.setStartAfter(node.childNodes[node.childNodes.length - 1]);
range.setEndAfter(node.childNodes[node.childNodes.length - 1]);
t.doc.getSelection().removeAllRanges();
t.doc.getSelection().addRange(range);
}
};
t.$c.on('tbwinit tbwchange', pushToHistory);
t.addBtnDef('historyRedo', btnBuildDefRedo);
t.addBtnDef('historyUndo', btnBuildDefUndo);
}
}
}
});
})(jQuery);

View File

@ -0,0 +1 @@
!function(i){"use strict";i.extend(!0,i.trumbowyg,{langs:{de:{history:{redo:"Wiederholen",undo:"Rückgängig"}},en:{history:{redo:"Redo",undo:"Undo"}},fr:{history:{redo:"Annuler",undo:"Rétablir"}}},plugins:{history:{init:function(o){o.o.plugins.history=i.extend(!0,{_stack:[],_index:-1,_focusEl:void 0},o.o.plugins.history||{});var t={title:o.lang.history.redo,ico:"redo",key:"Y",fn:function(){if(o.o.plugins.history._index<o.o.plugins.history._stack.length-1){o.o.plugins.history._index+=1;var i=o.o.plugins.history._index,t=o.o.plugins.history._stack[i];o.execCmd("html",t),o.o.plugins.history._stack[i]=o.$ed.html(),d(),e()}}},n={title:o.lang.history.undo,ico:"undo",key:"Z",fn:function(){if(o.o.plugins.history._index>0){o.o.plugins.history._index-=1;var i=o.o.plugins.history._index,t=o.o.plugins.history._stack[i];o.execCmd("html",t),o.o.plugins.history._stack[i]=o.$ed.html(),d(),e()}}},s=function(){var t,n,s=o.o.plugins.history._index,r=o.o.plugins.history._stack,d=r.slice(-1)[0]||"<p></p>",u=r[s],h=o.$ed.html(),c=o.doc.getSelection().focusNode,g="",a=o.o.plugins.history._focusEl;t=i("<div>"+d+"</div>").find("*").map(function(){return this.localName}),n=i("<div>"+h+"</div>").find("*").map(function(){return this.localName}),c&&(o.o.plugins.history._focusEl=c,g=c.outerHTML||c.textContent),h!==u&&(g.slice(-1).match(/\s/)||!l(t,n)||o.o.plugins.history._index<=0||c!==a?(o.o.plugins.history._index+=1,o.o.plugins.history._stack=r.slice(0,o.o.plugins.history._index),o.o.plugins.history._stack.push(h)):o.o.plugins.history._stack[s]=h,e())},e=function(){var i=o.o.plugins.history._index,t=o.o.plugins.history._stack.length,n=i>0,s=0!==t&&i!==t-1;r("historyUndo",n),r("historyRedo",s)},r=function(i,t){var n=o.$box.find(".trumbowyg-"+i+"-button");t?n.removeClass("trumbowyg-disable"):n.hasClass("trumbowyg-disable")||n.addClass("trumbowyg-disable")},l=function(i,o){if(i===o)return!0;if(null==i||null==o)return!1;if(i.length!==o.length)return!1;for(var t=0;t<i.length;t+=1)if(i[t]!==o[t])return!1;return!0},d=function(){var i=o.doc.getSelection().focusNode,t=o.doc.createRange();i.childNodes.length>0&&(t.setStartAfter(i.childNodes[i.childNodes.length-1]),t.setEndAfter(i.childNodes[i.childNodes.length-1]),o.doc.getSelection().removeAllRanges(),o.doc.getSelection().addRange(t))};o.$c.on("tbwinit tbwchange",s),o.addBtnDef("historyRedo",t),o.addBtnDef("historyUndo",n)}}}})}(jQuery);

View File

@ -0,0 +1,89 @@
/*/* ===========================================================
* trumbowyg.insertaudio.js v1.0
* InsertAudio plugin for Trumbowyg
* http://alex-d.github.com/Trumbowyg
* ===========================================================
* Author : Adam Hess (AdamHess)
*/
(function ($) {
'use strict';
var insertAudioOptions = {
src: {
label: 'URL',
required: true
},
autoplay: {
label: 'AutoPlay',
required: false,
type: 'checkbox'
},
muted: {
label: 'Muted',
required: false,
type: 'checkbox'
},
preload: {
label: 'preload options',
required: false
}
};
$.extend(true, $.trumbowyg, {
langs: {
en: {
insertAudio: 'Insert Audio'
},
fr: {
insertAudio: 'Insérer un son'
},
ru: {
insertAudio: 'Вставить аудио'
},
ja: {
insertAudio: '音声の挿入'
},
tr: {
insertAudio: 'Ses Ekle'
}
},
plugins: {
insertAudio: {
init: function (trumbowyg) {
var btnDef = {
fn: function () {
var insertAudioCallback = function (v) {
// controls should always be show otherwise the audio will
// be invisible defeating the point of a wysiwyg
var html = '<audio controls';
if (v.src) {
html += ' src=\'' + v.src + '\'';
}
if (v.autoplay) {
html += ' autoplay';
}
if (v.muted) {
html += ' muted';
}
if (v.preload) {
html += ' preload=\'' + v + '\'';
}
html += '></audio>';
var node = $(html)[0];
trumbowyg.range.deleteContents();
trumbowyg.range.insertNode(node);
return true;
};
trumbowyg.openModalInsert(trumbowyg.lang.insertAudio, insertAudioOptions, insertAudioCallback);
}
};
trumbowyg.addBtnDef('insertAudio', btnDef);
}
}
}
});
})(jQuery);

View File

@ -0,0 +1 @@
!function(e){"use strict";var r={src:{label:"URL",required:!0},autoplay:{label:"AutoPlay",required:!1,type:"checkbox"},muted:{label:"Muted",required:!1,type:"checkbox"},preload:{label:"preload options",required:!1}};e.extend(!0,e.trumbowyg,{langs:{en:{insertAudio:"Insert Audio"},fr:{insertAudio:"Insérer un son"},ru:{insertAudio:"Вставить аудио"},ja:{insertAudio:"音声の挿入"},tr:{insertAudio:"Ses Ekle"}},plugins:{insertAudio:{init:function(n){var t={fn:function(){var t=function(r){var t="<audio controls";r.src&&(t+=" src='"+r.src+"'"),r.autoplay&&(t+=" autoplay"),r.muted&&(t+=" muted"),r.preload&&(t+=" preload='"+r+"'"),t+="></audio>";var o=e(t)[0];return n.range.deleteContents(),n.range.insertNode(o),!0};n.openModalInsert(n.lang.insertAudio,r,t)}};n.addBtnDef("insertAudio",t)}}}})}(jQuery);

View File

@ -0,0 +1,104 @@
(function ($) {
'use strict';
$.extend(true, $.trumbowyg, {
langs: {
// jshint camelcase:false
en: {
lineheight: 'Line height',
lineheights: {
'0.9': 'Small',
'normal': 'Regular',
'1.5': 'Large',
'2.0': 'Extra large'
}
},
fr: {
lineheight: 'Hauteur de ligne',
lineheights: {
'0.9': 'Petit',
'normal': 'Regular',
'1.5': 'Grand',
'2.0': 'Très grand'
}
},
nl: {
lineheight: 'Regelhoogte',
lineheights: {
'0.9': 'Klein',
'normal': 'Normaal',
'1.5': 'Groot',
'2.0': 'Extra groot'
}
},
tr: {
lineheight: 'Satır yüksekliği',
lineheights: {
'0.9': 'Küçük',
'normal': 'Normal',
'1.5': 'Büyük',
'2.0': 'Çok Büyük'
}
}
}
});
// jshint camelcase:true
// Add dropdown with font sizes
$.extend(true, $.trumbowyg, {
plugins: {
lineheight: {
init: function (trumbowyg) {
trumbowyg.addBtnDef('lineheight', {
dropdown: buildDropdown(trumbowyg)
});
}
}
}
});
// Build the dropdown
function buildDropdown(trumbowyg) {
var dropdown = [];
var sizes = ['0.9', 'normal', '1.5', '2.0'];
$.each(sizes, function(index, size) {
trumbowyg.addBtnDef('lineheight_' + size, {
text: '<span style="line-height: ' + size + ';">' + trumbowyg.lang.lineheights[size] + '</span>',
hasIcon: false,
fn: function(){
trumbowyg.saveRange();
var text = trumbowyg.getRangeText();
if (text.replace(/\s/g, '') !== '') {
try {
var parent = getSelectionParentElement();
$(parent).css('lineHeight', size);
} catch (e) {
}
}
}
});
dropdown.push('lineheight_' + size);
});
return dropdown;
}
// Get the selection's parent
function getSelectionParentElement() {
var parentEl = null,
selection;
if (window.getSelection) {
selection = window.getSelection();
if (selection.rangeCount) {
parentEl = selection.getRangeAt(0).commonAncestorContainer;
if (parentEl.nodeType !== 1) {
parentEl = parentEl.parentNode;
}
}
} else if ((selection = document.selection) && selection.type !== 'Control') {
parentEl = selection.createRange().parentElement();
}
return parentEl;
}
})(jQuery);

View File

@ -0,0 +1 @@
!function(e){"use strict";function n(n){var i=[],l=["0.9","normal","1.5","2.0"];return e.each(l,function(l,r){n.addBtnDef("lineheight_"+r,{text:'<span style="line-height: '+r+';">'+n.lang.lineheights[r]+"</span>",hasIcon:!1,fn:function(){n.saveRange();var i=n.getRangeText();if(""!==i.replace(/\s/g,""))try{var l=t();e(l).css("lineHeight",r)}catch(a){}}}),i.push("lineheight_"+r)}),i}function t(){var e,n=null;return window.getSelection?(e=window.getSelection(),e.rangeCount&&(n=e.getRangeAt(0).commonAncestorContainer,1!==n.nodeType&&(n=n.parentNode))):(e=document.selection)&&"Control"!==e.type&&(n=e.createRange().parentElement()),n}e.extend(!0,e.trumbowyg,{langs:{en:{lineheight:"Line height",lineheights:{.9:"Small",normal:"Regular",1.5:"Large","2.0":"Extra large"}},fr:{lineheight:"Hauteur de ligne",lineheights:{.9:"Petit",normal:"Regular",1.5:"Grand","2.0":"Très grand"}},nl:{lineheight:"Regelhoogte",lineheights:{.9:"Klein",normal:"Normaal",1.5:"Groot","2.0":"Extra groot"}},tr:{lineheight:"Satır yüksekliği",lineheights:{.9:"Küçük",normal:"Normal",1.5:"Büyük","2.0":"Çok Büyük"}}}}),e.extend(!0,e.trumbowyg,{plugins:{lineheight:{init:function(e){e.addBtnDef("lineheight",{dropdown:n(e)})}}}})}(jQuery);

View File

@ -0,0 +1,88 @@
/* ===========================================================
* trumbowyg.mathMl.js v1.0
* MathML plugin for Trumbowyg
* https://github.com/loclamor/Trumbowyg/tree/mathml-plugin/plugins/mathml
* ===========================================================
* Author : loclamor
*/
/* globals MathJax */
(function($) {
'use strict';
$.extend(true, $.trumbowyg, {
langs: {
en: {
mathml: 'Insert Formulas',
formulas: 'Formulas',
inline: 'Inline'
},
fr: {
mathml: 'Inserer une formule',
formulas: 'Formule',
inline: 'En ligne'
},
tr: {
mathml: 'Formül Ekle',
formulas: 'Formüller',
inline: 'Satır içi'
}
},
plugins: {
mathml: {
init: function(trumbowyg) {
var btnDef = {
fn: function() {
trumbowyg.saveRange();
var mathMLoptions = {
formulas: {
label: trumbowyg.lang.formulas,
required: true,
value: ''
},
inline: {
label: trumbowyg.lang.inline,
attributes: {
checked: true
},
type: 'checkbox',
required: false,
}
};
var mathmlCallback = function(v) {
var delimitor = v.inline ? '$' : '$$';
if (trumbowyg.currentMathNode) {
$(trumbowyg.currentMathNode).html(delimitor + ' ' + v.formulas + ' ' + delimitor).attr('formulas', v.formulas).attr('inline', (v.inline ? 'true' : 'false'));
} else {
var html = '<span class="mathMlContainer" contenteditable="false" formulas="' + v.formulas + '" inline="' + (v.inline ? 'true' : 'false') + '" >' + delimitor + ' ' + v.formulas + ' ' + delimitor + '</span>';
var node = $(html)[0];
node.onclick = function(e) {
trumbowyg.currentMathNode = this;
mathMLoptions.formulas.value = $(this).attr('formulas');
if ($(this).attr('inline') === "true") {
mathMLoptions.inline.attributes.checked = true;
} else {
delete mathMLoptions.inline.attributes.checked;
}
trumbowyg.openModalInsert(trumbowyg.lang.mathml, mathMLoptions, mathmlCallback);
};
trumbowyg.range.deleteContents();
trumbowyg.range.insertNode(node);
}
trumbowyg.currentMathNode = false;
MathJax.Hub.Queue(['Typeset', MathJax.Hub]);
return true;
};
mathMLoptions.formulas.value = trumbowyg.getRangeText();
mathMLoptions.inline.attributes.checked = true;
trumbowyg.openModalInsert(trumbowyg.lang.mathml, mathMLoptions, mathmlCallback);
}
};
trumbowyg.addBtnDef('mathml', btnDef);
}
}
}
});
})(jQuery);

View File

@ -0,0 +1 @@
!function(e){"use strict";e.extend(!0,e.trumbowyg,{langs:{en:{mathml:"Insert Formulas",formulas:"Formulas",inline:"Inline"},fr:{mathml:"Inserer une formule",formulas:"Formule",inline:"En ligne"},tr:{mathml:"Formül Ekle",formulas:"Formüller",inline:"Satır içi"}},plugins:{mathml:{init:function(n){var t={fn:function(){n.saveRange();var t={formulas:{label:n.lang.formulas,required:!0,value:""},inline:{label:n.lang.inline,attributes:{checked:!0},type:"checkbox",required:!1}},a=function(l){var r=l.inline?"$":"$$";if(n.currentMathNode)e(n.currentMathNode).html(r+" "+l.formulas+" "+r).attr("formulas",l.formulas).attr("inline",l.inline?"true":"false");else{var i='<span class="mathMlContainer" contenteditable="false" formulas="'+l.formulas+'" inline="'+(l.inline?"true":"false")+'" >'+r+" "+l.formulas+" "+r+"</span>",u=e(i)[0];u.onclick=function(l){n.currentMathNode=this,t.formulas.value=e(this).attr("formulas"),"true"===e(this).attr("inline")?t.inline.attributes.checked=!0:delete t.inline.attributes.checked,n.openModalInsert(n.lang.mathml,t,a)},n.range.deleteContents(),n.range.insertNode(u)}return n.currentMathNode=!1,MathJax.Hub.Queue(["Typeset",MathJax.Hub]),!0};t.formulas.value=n.getRangeText(),t.inline.attributes.checked=!0,n.openModalInsert(n.lang.mathml,t,a)}};n.addBtnDef("mathml",t)}}}})}(jQuery);

View File

@ -0,0 +1,36 @@
/**
* Trumbowyg v2.10.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
*/
.mathMlContainer {
position: relative;
&[inline="false"] {
display: block;
width: 100%;
}
&:hover {
pointer-events: none;
&:after {
content: '\270E';
pointer-events: auto;
position: absolute;
left: 0px;
top: 0px;
background-color: #ffffffd4;
cursor: pointer;
bottom: 0px;
right: 0px;
box-shadow: 0 0 5px 5px #ffffffd4;
}
}
}

View File

@ -0,0 +1,29 @@
/**
* Trumbowyg v2.10.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
*/
.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: 0px;
top: 0px;
background-color: #ffffffd4;
cursor: pointer;
bottom: 0px;
right: 0px;
box-shadow: 0 0 5px 5px #ffffffd4; }

View File

@ -0,0 +1,2 @@
/** Trumbowyg v2.10.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}

View File

@ -0,0 +1,105 @@
/* ===========================================================
* trumbowyg.mention.js v0.1
* Mention plugin for Trumbowyg
* http://alex-d.github.com/Trumbowyg
* ===========================================================
* Author : Viper
* Github: https://github.com/Globulopolis
* Website: http://киноархив.com
*/
(function ($) {
'use strict';
var defaultOptions = {
source: '',
formatDropdownItem: formatDropdownItem,
formatResult: formatResult
};
$.extend(true, $.trumbowyg, {
langs: {
en: {
mention: 'Mention'
},
fr: {
mention: 'Mentioner'
},
ru: {
mention: 'Упомянуть'
},
tr: {
mention: 'Bahset'
}
},
plugins: {
mention: {
init: function (trumbowyg) {
trumbowyg.o.plugins.mention = $.extend(true, {}, defaultOptions, trumbowyg.o.plugins.mention || {});
var btnDef = {
dropdown: buildDropdown(trumbowyg.o.plugins.mention.source, trumbowyg)
};
trumbowyg.addBtnDef('mention', btnDef);
}
}
}
});
/**
* Build dropdown list
*
* @param {Array} items Items
* @param {object} trumbowyg Editor
*
* @return {Array}
*/
function buildDropdown(items, trumbowyg) {
var dropdown = [];
// Check if source is an array
if (items.constructor === Array) {
$.each(items, function (i, item) {
var btn = 'mention-' + i,
btnDef = {
hasIcon: false,
text: trumbowyg.o.plugins.mention.formatDropdownItem(item),
fn: function () {
trumbowyg.execCmd('insertHTML', trumbowyg.o.plugins.mention.formatResult(item));
return true;
}
};
trumbowyg.addBtnDef(btn, btnDef);
dropdown.push(btn);
});
}
return dropdown;
}
/**
* Format item in dropdown.
*
* @param {object} item Item object.
*
* @return {string}
*/
function formatDropdownItem(item) {
return item.login;
}
/**
* Format result pasted in editor.
*
* @param {object} item Item object.
*
* @return {string}
*/
function formatResult(item) {
return '@' + item.login + ' ';
}
})(jQuery);

View File

@ -0,0 +1 @@
!function(n){"use strict";function t(t,o){var e=[];return t.constructor===Array&&n.each(t,function(n,t){var i="mention-"+n,r={hasIcon:!1,text:o.o.plugins.mention.formatDropdownItem(t),fn:function(){return o.execCmd("insertHTML",o.o.plugins.mention.formatResult(t)),!0}};o.addBtnDef(i,r),e.push(i)}),e}function o(n){return n.login}function e(n){return"@"+n.login+" "}var i={source:"",formatDropdownItem:o,formatResult:e};n.extend(!0,n.trumbowyg,{langs:{en:{mention:"Mention"},fr:{mention:"Mentioner"},ru:{mention:"Упомянуть"},tr:{mention:"Bahset"}},plugins:{mention:{init:function(o){o.o.plugins.mention=n.extend(!0,{},i,o.o.plugins.mention||{});var e={dropdown:t(o.o.plugins.mention.source,o)};o.addBtnDef("mention",e)}}}})}(jQuery);

View File

@ -0,0 +1,39 @@
/**
* Trumbowyg v2.10.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-dropdown-mention {
height: calc(75%);
width: 300px;
max-width: 300px;
overflow-y: scroll;
overflow-x: hidden;
svg {
display: none !important;
}
button {
position: relative;
white-space: nowrap;
&: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%, #ffffff 80%, #ffffff 100%);
pointer-events: none;
}
}
}

View File

@ -0,0 +1,32 @@
/**
* Trumbowyg v2.10.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-dropdown-mention {
height: calc(75%);
width: 300px;
max-width: 300px;
overflow-y: scroll;
overflow-x: hidden; }
.trumbowyg-dropdown-mention svg {
display: none !important; }
.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%, #ffffff 80%, #ffffff 100%);
pointer-events: none; }

View File

@ -0,0 +1,2 @@
/** Trumbowyg v2.10.0 - A lightweight WYSIWYG editor - alex-d.github.io/Trumbowyg - License MIT - Author : Alexandre Demode (Alex-D) / alex-d.fr */
.trumbowyg-dropdown-mention{height:calc(75%);width:300px;max-width:300px;overflow-y:scroll;overflow-x:hidden}.trumbowyg-dropdown-mention svg{display:none!important}.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}

View File

@ -0,0 +1,104 @@
/* ===========================================================
* trumbowyg.noembed.js v1.0
* noEmbed plugin for Trumbowyg
* http://alex-d.github.com/Trumbowyg
* ===========================================================
* Author : Jake Johns (jakejohns)
*/
(function ($) {
'use strict';
var defaultOptions = {
proxy: 'https://noembed.com/embed?nowrap=on',
urlFiled: 'url',
data: [],
success: undefined,
error: undefined
};
$.extend(true, $.trumbowyg, {
langs: {
en: {
noembed: 'Noembed',
noembedError: 'Error'
},
sk: {
noembedError: 'Chyba'
},
fr: {
noembedError: 'Erreur'
},
cs: {
noembedError: 'Chyba'
},
ru: {
noembedError: 'Ошибка'
},
ja: {
noembedError: 'エラー'
},
tr: {
noembedError: 'Hata'
}
},
plugins: {
noembed: {
init: function (trumbowyg) {
trumbowyg.o.plugins.noembed = $.extend(true, {}, defaultOptions, trumbowyg.o.plugins.noembed || {});
var btnDef = {
fn: function () {
var $modal = trumbowyg.openModalInsert(
// Title
trumbowyg.lang.noembed,
// Fields
{
url: {
label: 'URL',
required: true
}
},
// Callback
function (data) {
$.ajax({
url: trumbowyg.o.plugins.noembed.proxy,
type: 'GET',
data: data,
cache: false,
dataType: 'json',
success: trumbowyg.o.plugins.noembed.success || function (data) {
if (data.html) {
trumbowyg.execCmd('insertHTML', data.html);
setTimeout(function () {
trumbowyg.closeModal();
}, 250);
} else {
trumbowyg.addErrorOnModalField(
$('input[type=text]', $modal),
data.error
);
}
},
error: trumbowyg.o.plugins.noembed.error || function () {
trumbowyg.addErrorOnModalField(
$('input[type=text]', $modal),
trumbowyg.lang.noembedError
);
}
});
}
);
}
};
trumbowyg.addBtnDef('noembed', btnDef);
}
}
}
});
})(jQuery);

View File

@ -0,0 +1 @@
!function(e){"use strict";var r={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:{noembedError:"Erreur"},cs:{noembedError:"Chyba"},ru:{noembedError:"Ошибка"},ja:{noembedError:"エラー"},tr:{noembedError:"Hata"}},plugins:{noembed:{init:function(o){o.o.plugins.noembed=e.extend(!0,{},r,o.o.plugins.noembed||{});var n={fn:function(){var r=o.openModalInsert(o.lang.noembed,{url:{label:"URL",required:!0}},function(n){e.ajax({url:o.o.plugins.noembed.proxy,type:"GET",data:n,cache:!1,dataType:"json",success:o.o.plugins.noembed.success||function(n){n.html?(o.execCmd("insertHTML",n.html),setTimeout(function(){o.closeModal()},250)):o.addErrorOnModalField(e("input[type=text]",r),n.error)},error:o.o.plugins.noembed.error||function(){o.addErrorOnModalField(e("input[type=text]",r),o.lang.noembedError)}})})}};o.addBtnDef("noembed",n)}}}})}(jQuery);

View File

@ -0,0 +1,96 @@
/* ===========================================================
* trumbowyg.pasteembed.js v1.0
* Url paste to iframe with noembed. Plugin for Trumbowyg
* http://alex-d.github.com/Trumbowyg
* ===========================================================
* Author : Max Seelig
* Facebook : https://facebook.com/maxse
* Website : https://www.maxmade.nl/
*/
(function($) {
'use strict';
var defaultOptions = {
enabled: true,
endpoints: [
'https://noembed.com/embed?nowrap=on',
'https://api.maxmade.nl/url2iframe/embed'
]
};
$.extend(true, $.trumbowyg, {
plugins: {
pasteEmbed: {
init: function(trumbowyg) {
trumbowyg.o.plugins.pasteEmbed = $.extend(true, {}, defaultOptions, trumbowyg.o.plugins.pasteEmbed || {});
if (!trumbowyg.o.plugins.pasteEmbed.enabled) {
return;
}
trumbowyg.pasteHandlers.push(function(pasteEvent) {
try {
var clipboardData = (pasteEvent.originalEvent || pasteEvent).clipboardData,
pastedData = clipboardData.getData('Text'),
endpoints = trumbowyg.o.plugins.pasteEmbed.endpoints,
request = null;
if (pastedData.startsWith('http')) {
pasteEvent.stopPropagation();
pasteEvent.preventDefault();
var query = {
url: pastedData.trim()
};
var content = '';
var index = 0;
if (request && request.transport) {
request.transport.abort();
}
request = $.ajax({
crossOrigin: true,
url: endpoints[index],
type: 'GET',
data: query,
cache: false,
dataType: 'jsonp',
success: function(res) {
if (res.html) {
index = 0;
content = res.html;
} else {
index += 1;
}
},
error: function() {
index += 1;
},
complete: function() {
if (content.length === 0 && index < endpoints.length - 1) {
this.url = endpoints[index];
this.data = query;
$.ajax(this);
}
if (index === endpoints.length - 1) {
content = $('<a>', {
href: pastedData,
text: pastedData
}).prop('outerHTML');
}
if (content.length > 0) {
index = 0;
trumbowyg.execCmd('insertHTML', content);
}
}
});
}
} catch (c) {}
});
}
}
}
});
})(jQuery);

View File

@ -0,0 +1 @@
!function(t){"use strict";var e={enabled:!0,endpoints:["https://noembed.com/embed?nowrap=on","https://api.maxmade.nl/url2iframe/embed"]};t.extend(!0,t.trumbowyg,{plugins:{pasteEmbed:{init:function(n){n.o.plugins.pasteEmbed=t.extend(!0,{},e,n.o.plugins.pasteEmbed||{}),n.o.plugins.pasteEmbed.enabled&&n.pasteHandlers.push(function(e){try{var a=(e.originalEvent||e).clipboardData,r=a.getData("Text"),s=n.o.plugins.pasteEmbed.endpoints,i=null;if(r.startsWith("http")){e.stopPropagation(),e.preventDefault();var o={url:r.trim()},p="",l=0;i&&i.transport&&i.transport.abort(),i=t.ajax({crossOrigin:!0,url:s[l],type:"GET",data:o,cache:!1,dataType:"jsonp",success:function(t){t.html?(l=0,p=t.html):l+=1},error:function(){l+=1},complete:function(){0===p.length&&l<s.length-1&&(this.url=s[l],this.data=o,t.ajax(this)),l===s.length-1&&(p=t("<a>",{href:r,text:r}).prop("outerHTML")),p.length>0&&(l=0,n.execCmd("insertHTML",p))}})}}catch(u){}})}}}})}(jQuery);

View File

@ -0,0 +1,41 @@
/* ===========================================================
* trumbowyg.pasteimage.js v1.0
* Basic base64 paste plugin for Trumbowyg
* http://alex-d.github.com/Trumbowyg
* ===========================================================
* Author : Alexandre Demode (Alex-D)
* Twitter : @AlexandreDemode
* Website : alex-d.fr
*/
(function ($) {
'use strict';
$.extend(true, $.trumbowyg, {
plugins: {
pasteImage: {
init: function (trumbowyg) {
trumbowyg.pasteHandlers.push(function (pasteEvent) {
try {
var items = (pasteEvent.originalEvent || pasteEvent).clipboardData.items,
reader;
for (var i = items.length - 1; i >= 0; i -= 1) {
if (items[i].type.match(/^image\//)) {
reader = new FileReader();
/* jshint -W083 */
reader.onloadend = function (event) {
trumbowyg.execCmd('insertImage', event.target.result, undefined, true);
};
/* jshint +W083 */
reader.readAsDataURL(items[i].getAsFile());
}
}
} catch (c) {
}
});
}
}
}
});
})(jQuery);

View File

@ -0,0 +1 @@
!function(e){"use strict";e.extend(!0,e.trumbowyg,{plugins:{pasteImage:{init:function(e){e.pasteHandlers.push(function(t){try{for(var a,n=(t.originalEvent||t).clipboardData.items,i=n.length-1;i>=0;i-=1)n[i].type.match(/^image\//)&&(a=new FileReader,a.onloadend=function(t){e.execCmd("insertImage",t.target.result,void 0,!0)},a.readAsDataURL(n[i].getAsFile()))}catch(r){}})}}}})}(jQuery);

View File

@ -0,0 +1,130 @@
/* ===========================================================
* trumbowyg.preformatted.js v1.0
* Preformatted plugin for Trumbowyg
* http://alex-d.github.com/Trumbowyg
* ===========================================================
* Author : Casella Edoardo (Civile)
*/
(function ($) {
'use strict';
$.extend(true, $.trumbowyg, {
langs: {
// jshint camelcase:false
en: {
preformatted: 'Code sample <pre>'
},
fr: {
preformatted: 'Exemple de code <pre>'
},
it: {
preformatted: 'Codice <pre>'
},
zh_cn: {
preformatted: '代码示例 <pre>'
},
ru: {
preformatted: 'Пример кода <pre>'
},
ja: {
preformatted: 'コードサンプル <pre>'
},
tr: {
preformatted: 'Kod örneği <pre>'
}
},
// jshint camelcase:true
plugins: {
preformatted: {
init: function (trumbowyg) {
var btnDef = {
fn: function () {
trumbowyg.saveRange();
var text = trumbowyg.getRangeText();
if (text.replace(/\s/g, '') !== '') {
try {
var curtag = getSelectionParentElement().tagName.toLowerCase();
if (curtag === 'code' || curtag === 'pre') {
return unwrapCode();
}
else {
trumbowyg.execCmd('insertHTML', '<pre><code>' + strip(text) + '</code></pre>');
}
} catch (e) {
}
}
},
tag: 'pre'
};
trumbowyg.addBtnDef('preformatted', btnDef);
}
}
}
});
/*
* GetSelectionParentElement
*/
function getSelectionParentElement() {
var parentEl = null,
selection;
if (window.getSelection) {
selection = window.getSelection();
if (selection.rangeCount) {
parentEl = selection.getRangeAt(0).commonAncestorContainer;
if (parentEl.nodeType !== 1) {
parentEl = parentEl.parentNode;
}
}
} else if ((selection = document.selection) && selection.type !== 'Control') {
parentEl = selection.createRange().parentElement();
}
return parentEl;
}
/*
* Strip
* returns a text without HTML tags
*/
function strip(html) {
var tmp = document.createElement('DIV');
tmp.innerHTML = html;
return tmp.textContent || tmp.innerText || '';
}
/*
* UnwrapCode
* ADD/FIX: to improve, works but can be better
* "paranoic" solution
*/
function unwrapCode() {
var container = null;
if (document.selection) { //for IE
container = document.selection.createRange().parentElement();
} else {
var select = window.getSelection();
if (select.rangeCount > 0) {
container = select.getRangeAt(0).startContainer.parentNode;
}
}
//'paranoic' unwrap
var ispre = $(container).contents().closest('pre').length;
var iscode = $(container).contents().closest('code').length;
if (ispre && iscode) {
$(container).contents().unwrap('code').unwrap('pre');
} else if (ispre) {
$(container).contents().unwrap('pre');
} else if (iscode) {
$(container).contents().unwrap('code');
}
}
})(jQuery);

View File

@ -0,0 +1 @@
!function(e){"use strict";function t(){var e,t=null;return window.getSelection?(e=window.getSelection(),e.rangeCount&&(t=e.getRangeAt(0).commonAncestorContainer,1!==t.nodeType&&(t=t.parentNode))):(e=document.selection)&&"Control"!==e.type&&(t=e.createRange().parentElement()),t}function n(e){var t=document.createElement("DIV");return t.innerHTML=e,t.textContent||t.innerText||""}function r(){var t=null;if(document.selection)t=document.selection.createRange().parentElement();else{var n=window.getSelection();n.rangeCount>0&&(t=n.getRangeAt(0).startContainer.parentNode)}var r=e(t).contents().closest("pre").length,o=e(t).contents().closest("code").length;r&&o?e(t).contents().unwrap("code").unwrap("pre"):r?e(t).contents().unwrap("pre"):o&&e(t).contents().unwrap("code")}e.extend(!0,e.trumbowyg,{langs:{en:{preformatted:"Code sample <pre>"},fr:{preformatted:"Exemple de code <pre>"},it:{preformatted:"Codice <pre>"},zh_cn:{preformatted:"代码示例 <pre>"},ru:{preformatted:"Пример кода <pre>"},ja:{preformatted:"コードサンプル <pre>"},tr:{preformatted:"Kod örneği <pre>"}},plugins:{preformatted:{init:function(e){var o={fn:function(){e.saveRange();var o=e.getRangeText();if(""!==o.replace(/\s/g,""))try{var a=t().tagName.toLowerCase();if("code"===a||"pre"===a)return r();e.execCmd("insertHTML","<pre><code>"+n(o)+"</code></pre>")}catch(c){}},tag:"pre"};e.addBtnDef("preformatted",o)}}}})}(jQuery);

View File

@ -0,0 +1,69 @@
(function ($) {
'use strict';
var defaultOptions = {
minSize: 32,
step: 4
};
var preventDefault = function (ev) {
return ev.preventDefault();
};
$.extend(true, $.trumbowyg, {
plugins: {
resizimg: {
init: function (trumbowyg) {
trumbowyg.o.plugins.resizimg = $.extend(true, {},
defaultOptions,
trumbowyg.o.plugins.resizimg || {},
{
resizable: {
resizeWidth: false,
onDragStart: function (ev, $el) {
var opt = trumbowyg.o.plugins.resizimg;
var x = ev.pageX - $el.offset().left;
var y = ev.pageY - $el.offset().top;
if (x < $el.width() - opt.minSize || y < $el.height() - opt.minSize) {
return false;
}
},
onDrag: function (ev, $el, newWidth, newHeight) {
var opt = trumbowyg.o.plugins.resizimg;
if (newHeight < opt.minSize) {
newHeight = opt.minSize;
}
newHeight -= newHeight % opt.step;
$el.height(newHeight);
return false;
},
onDragEnd: function () {
trumbowyg.$c.trigger('tbwchange');
}
}
}
);
function initResizable() {
trumbowyg.$ed.find('img:not(.resizable)')
.resizable(trumbowyg.o.plugins.resizimg.resizable)
.on('mousedown', preventDefault);
}
function destroyResizable() {
trumbowyg.$ed.find('img.resizable')
.resizable('destroy')
.off('mousedown', preventDefault);
trumbowyg.syncTextarea();
}
trumbowyg.$c.on('tbwinit', initResizable);
trumbowyg.$c.on('tbwfocus', initResizable);
trumbowyg.$c.on('tbwchange', initResizable);
trumbowyg.$c.on('tbwblur', destroyResizable);
trumbowyg.$c.on('tbwclose', destroyResizable);
}
}
}
});
})(jQuery);

View File

@ -0,0 +1 @@
!function(i){"use strict";var e={minSize:32,step:4},n=function(i){return i.preventDefault()};i.extend(!0,i.trumbowyg,{plugins:{resizimg:{init:function(t){function o(){t.$ed.find("img:not(.resizable)").resizable(t.o.plugins.resizimg.resizable).on("mousedown",n)}function r(){t.$ed.find("img.resizable").resizable("destroy").off("mousedown",n),t.syncTextarea()}t.o.plugins.resizimg=i.extend(!0,{},e,t.o.plugins.resizimg||{},{resizable:{resizeWidth:!1,onDragStart:function(i,e){var n=t.o.plugins.resizimg,o=i.pageX-e.offset().left,r=i.pageY-e.offset().top;if(o<e.width()-n.minSize||r<e.height()-n.minSize)return!1},onDrag:function(i,e,n,o){var r=t.o.plugins.resizimg;return o<r.minSize&&(o=r.minSize),o-=o%r.step,e.height(o),!1},onDragEnd:function(){t.$c.trigger("tbwchange")}}}),t.$c.on("tbwinit",o),t.$c.on("tbwfocus",o),t.$c.on("tbwchange",o),t.$c.on("tbwblur",r),t.$c.on("tbwclose",r)}}}})}(jQuery);

View File

@ -0,0 +1,72 @@
/* ===========================================================
* trumbowyg.ruby.js v1.0
* Ruby text plugin for Trumbowyg
* http://alex-d.github.com/Trumbowyg
* ===========================================================
* Author : Fathi Anshory (0x00000F5C)
* Twitter : @fscchannl
* Comment : Since I use trumbowyg in my project and required it to insert ruby text, so I thought I can contribute a little. :D
*/
(function ($) {
'use strict';
$.extend(true, $.trumbowyg, {
langs: {
en: {
ruby: 'Add ruby text',
rubyModal: 'Ruby modal',
rubyText: 'Ruby text'
},
fr: {
ruby: 'Ajouter du texte ruby',
rubyModal: 'Modale ruby',
rubyText: 'Texte ruby'
},
id: {
ruby: 'Sisipkan teks ruby',
rubyModal: 'Modal teks ruby',
rubyText: 'Teks ruby'
},
tr: {
ruby: 'Ruby metni ekle',
rubyModal: 'Ruby modal',
rubyText: 'Ruby metni'
}
},
plugins: {
ruby: {
init: function (trumbowyg) {
var btnDef = {
fn: function () {
trumbowyg.saveRange();
trumbowyg.openModalInsert(
trumbowyg.lang.ruby,
{
rubyText: {
label: trumbowyg.lang.rubyText,
required: false,
},
modal: {
label: trumbowyg.lang.rubyModal,
value: trumbowyg.getRangeText(),
required: true
}
},
function (v) {
var node = $('<ruby title="' + v.rubyText + '">' + v.modal + '<rp> (</rp><rt>' + v.rubyText + '</rt><rp>)</rp></ruby>')[0];
trumbowyg.range.deleteContents();
trumbowyg.range.insertNode(node);
trumbowyg.syncCode();
trumbowyg.$c.trigger('tbwchange');
return true;
}
);
}
};
trumbowyg.addBtnDef('ruby', btnDef);
}
}
}
});
})(jQuery);

View File

@ -0,0 +1 @@
!function(e){"use strict";e.extend(!0,e.trumbowyg,{langs:{en:{ruby:"Add ruby text",rubyModal:"Ruby modal",rubyText:"Ruby text"},fr:{ruby:"Ajouter du texte ruby",rubyModal:"Modale ruby",rubyText:"Texte ruby"},id:{ruby:"Sisipkan teks ruby",rubyModal:"Modal teks ruby",rubyText:"Teks ruby"},tr:{ruby:"Ruby metni ekle",rubyModal:"Ruby modal",rubyText:"Ruby metni"}},plugins:{ruby:{init:function(r){var u={fn:function(){r.saveRange(),r.openModalInsert(r.lang.ruby,{rubyText:{label:r.lang.rubyText,required:!1},modal:{label:r.lang.rubyModal,value:r.getRangeText(),required:!0}},function(u){var t=e('<ruby title="'+u.rubyText+'">'+u.modal+"<rp> (</rp><rt>"+u.rubyText+"</rt><rp>)</rp></ruby>")[0];return r.range.deleteContents(),r.range.insertNode(t),r.syncCode(),r.$c.trigger("tbwchange"),!0})}};r.addBtnDef("ruby",u)}}}})}(jQuery);

View File

@ -0,0 +1,283 @@
/* ===========================================================
* trumbowyg.table.custom.js v2.0
* Table plugin for Trumbowyg
* http://alex-d.github.com/Trumbowyg
* ===========================================================
* Author : Sven Dunemann [dunemann@forelabs.eu]
*/
(function ($) {
'use strict';
var defaultOptions = {
rows: 8,
columns: 8,
styler: 'table'
};
$.extend(true, $.trumbowyg, {
langs: {
en: {
table: 'Insert table',
tableAddRow: 'Add row',
tableAddColumn: 'Add column',
tableDeleteRow: 'Delete row',
tableDeleteColumn: 'Delete column',
tableDestroy: 'Delete table',
error: 'Error'
},
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',
error: 'Erreur'
},
cs: {
table: 'Vytvořit příkaz Table',
tableAddRow: 'Přidat řádek',
tableAddColumn: 'Přidat sloupec',
error: 'Chyba'
},
ru: {
table: 'Вставить таблицу',
tableAddRow: 'Добавить строки',
tableAddColumn: 'Добавить столбцы',
error: 'Ошибка'
},
ja: {
table: '表の挿入',
tableAddRow: '行の追加',
tableAddColumn: '列の追加',
error: 'エラー'
},
tr: {
table: 'Tablo ekle',
tableAddRow: 'Satır ekle',
tableAddColumn: 'Kolon ekle',
error: 'Hata'
}
},
plugins: {
table: {
init: function (t) {
t.o.plugins.table = $.extend(true, {}, defaultOptions, t.o.plugins.table || {});
var buildButtonDef = {
fn: function () {
t.saveRange();
var btnName = 'table';
var dropdownPrefix = t.o.prefix + 'dropdown',
dropdownOptions = { // the dropdown
class: dropdownPrefix + '-' + btnName + ' ' + dropdownPrefix + ' ' + t.o.prefix + 'fixed-top'
};
dropdownOptions['data-' + dropdownPrefix] = btnName;
var $dropdown = $('<div/>', dropdownOptions);
if (t.$box.find("." + dropdownPrefix + "-" + btnName).length === 0) {
t.$box.append($dropdown.hide());
} else {
$dropdown = t.$box.find("." + dropdownPrefix + "-" + btnName);
}
// clear dropdown
$dropdown.html('');
// 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('tableAddRow'));
$dropdown.append(t.buildSubBtn('tableAddColumn'));
$dropdown.append(t.buildSubBtn('tableDeleteRow'));
$dropdown.append(t.buildSubBtn('tableDeleteColumn'));
$dropdown.append(t.buildSubBtn('tableDestroy'));
} else {
var tableSelect = $('<table></table>');
for (var i = 0; i < t.o.plugins.table.rows; i += 1) {
var row = $('<tr></tr>').appendTo(tableSelect);
for (var j = 0; j < t.o.plugins.table.columns; j += 1) {
$('<td></td>').appendTo(row);
}
}
tableSelect.find('td').on('mouseover', tableAnimate);
tableSelect.find('td').on('mousedown', tableBuild);
$dropdown.append(tableSelect);
$dropdown.append($('<center>1x1</center>'));
}
t.dropdown(btnName);
}
};
var tableAnimate = function(column_event) {
var column = $(column_event.target),
table = column.parents('table'),
colIndex = this.cellIndex,
rowIndex = this.parentNode.rowIndex;
// reset all columns
table.find('td').removeClass('active');
for (var i = 0; i <= rowIndex; i += 1) {
for (var j = 0; j <= colIndex; j += 1) {
table.find("tr:nth-of-type("+(i+1)+")").find("td:nth-of-type("+(j+1)+")").addClass('active');
}
}
// set label
table.next('center').html((colIndex+1) + "x" + (rowIndex+1));
};
var tableBuild = function(column_event) {
t.saveRange();
var tabler = $('<table></table>');
if (t.o.plugins.table.styler) {
tabler.attr('class', t.o.plugins.table.styler);
}
var column = $(column_event.target),
colIndex = this.cellIndex,
rowIndex = this.parentNode.rowIndex;
for (var i = 0; i <= rowIndex; i += 1) {
var row = $('<tr></tr>').appendTo(tabler);
for (var j = 0; j <= colIndex; j += 1) {
$('<td></td>').appendTo(row);
}
}
t.range.deleteContents();
t.range.insertNode(tabler[0]);
t.$c.trigger('tbwchange');
};
var addRow = {
title: t.lang['tableAddRow'],
text: t.lang['tableAddRow'],
ico: 'row-below',
fn: function () {
t.saveRange();
var node = t.doc.getSelection().focusNode;
var table = $(node).closest('table');
if(table.length > 0) {
var row = $('<tr></tr>');
// add columns according to current columns count
for (var i = 0; i < table.find('tr')[0].childElementCount; i += 1) {
$('<td></td>').appendTo(row);
}
// add row to table
row.appendTo(table);
}
return true;
}
};
var addColumn = {
title: t.lang['tableAddColumn'],
text: t.lang['tableAddColumn'],
ico: 'col-right',
fn: function () {
t.saveRange();
var node = t.doc.getSelection().focusNode;
var table = $(node).closest('table');
if(table.length > 0) {
$(table).find('tr').each(function() {
$(this).find('td:last').after('<td></td>');
});
}
return true;
}
};
var destroy = {
title: t.lang['tableDestroy'],
text: t.lang['tableDestroy'],
ico: 'table-delete',
fn: function () {
t.saveRange();
var node = t.doc.getSelection().focusNode,
table = $(node).closest('table');
table.remove();
return true;
}
};
var deleteRow = {
title: t.lang['tableDeleteRow'],
text: t.lang['tableDeleteRow'],
ico: 'row-delete',
fn: function () {
t.saveRange();
var node = t.doc.getSelection().focusNode,
row = $(node).closest('tr');
row.remove();
return true;
}
};
var deleteColumn = {
title: t.lang['tableDeleteColumn'],
text: t.lang['tableDeleteColumn'],
ico: 'col-delete',
fn: function () {
t.saveRange();
var node = t.doc.getSelection().focusNode,
table = $(node).closest('table'),
td = $(node).closest('td'),
cellIndex = td.index();
$(table).find('tr').each(function() {
$(this).find('td:eq('+cellIndex+')').remove();
});
return true;
}
};
t.addBtnDef('table', buildButtonDef);
t.addBtnDef('tableAddRow', addRow);
t.addBtnDef('tableAddColumn', addColumn);
t.addBtnDef('tableDeleteRow', deleteRow);
t.addBtnDef('tableDeleteColumn', deleteColumn);
t.addBtnDef('tableDestroy', destroy);
}
}
}
});
})(jQuery);

View File

@ -0,0 +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"},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",error:"Erreur"},cs:{table:"Vytvořit příkaz Table",tableAddRow:"Přidat řádek",tableAddColumn:"Přidat sloupec",error:"Chyba"},ru:{table:"Вставить таблицу",tableAddRow:"Добавить строки",tableAddColumn:"Добавить столбцы",error:"Ошибка"},ja:{table:"表の挿入",tableAddRow:"行の追加",tableAddColumn:"列の追加",error:"エラー"},tr:{table:"Tablo ekle",tableAddRow:"Satır ekle",tableAddColumn:"Kolon ekle",error:"Hata"}},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("<div/>",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("<table></table>"),i=0;i<l.o.plugins.table.rows;i+=1)for(var s=e("<tr></tr>").appendTo(b),u=0;u<l.o.plugins.table.columns;u+=1)e("<td></td>").appendTo(s);b.find("td").on("mouseover",n),b.find("td").on("mousedown",o),r.append(b),r.append(e("<center>1x1</center>"))}l.dropdown(t)}},n=function(t){var l=e(t.target),a=l.parents("table"),n=this.cellIndex,o=this.parentNode.rowIndex;a.find("td").removeClass("active");for(var d=0;d<=o;d+=1)for(var r=0;r<=n;r+=1)a.find("tr:nth-of-type("+(d+1)+")").find("td:nth-of-type("+(r+1)+")").addClass("active");a.next("center").html(n+1+"x"+(o+1))},o=function(t){l.saveRange();var a=e("<table></table>");l.o.plugins.table.styler&&a.attr("class",l.o.plugins.table.styler);for(var n=(e(t.target),this.cellIndex),o=this.parentNode.rowIndex,d=0;d<=o;d+=1)for(var r=e("<tr></tr>").appendTo(a),b=0;b<=n;b+=1)e("<td></td>").appendTo(r);l.range.deleteContents(),l.range.insertNode(a[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 n=e("<tr></tr>"),o=0;o<a.find("tr")[0].childElementCount;o+=1)e("<td></td>").appendTo(n);n.appendTo(a)}return!0}},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");return a.length>0&&e(a).find("tr").each(function(){e(this).find("td:last").after("<td></td>")}),!0}},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");return a.remove(),!0}},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");return a.remove(),!0}},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"),n=e(t).closest("td"),o=n.index();return e(a).find("tr").each(function(){e(this).find("td:eq("+o+")").remove()}),!0}};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);

View File

@ -0,0 +1,41 @@
/**
* Trumbowyg v2.10.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-editor table {
width: 100%;
td {
border: 1px dotted #e7eaec;
padding: 8px;
}
}
.trumbowyg-dropdown-table {
table {
margin: 10px;
display: inline-block;
}
table td {
display: inline-block;
height: 20px;
width: 20px;
margin: 1px;
background-color: #fff;
box-shadow: 0 0 0 1px #cecece inset;
&.active {
background-color: #00b393;
box-shadow: none;
cursor: pointer;
}
}
}

Some files were not shown because too many files have changed in this diff Show More