diff --git a/docs/demos/js/loader.js b/docs/demos/js/loader.js index a25d1885c..7e0dafabf 100644 --- a/docs/demos/js/loader.js +++ b/docs/demos/js/loader.js @@ -1,4 +1,4 @@ -var baseURL = window.location.hostname.indexOf('github.') !== -1 ? '//cdn.rawgit.com/Alex-D/Trumbowyg/v2.9.2/' : '../../../'; +var baseURL = window.location.hostname.indexOf('github.') !== -1 ? '//cdn.rawgit.com/Alex-D/Trumbowyg/v2.10.0/' : '../../../'; var styleLoadingContainer = document.querySelector('.loading-head'); var scriptLoadingContainer = document.querySelector('.loading-body'); diff --git a/docs/documentation/plugins/index.html b/docs/documentation/plugins/index.html index d53d231a5..7e781e626 100644 --- a/docs/documentation/plugins/index.html +++ b/docs/documentation/plugins/index.html @@ -764,19 +764,27 @@
- Then you can use the new button definition template
+ Then you can use the new button definition template
and can add your template code.
$('#my-editor').trumbowyg({
btns: [
['template']
- ]
+ ],
+ plugins: {
+ templates: [
+ {
+ name: 'Template 1',
+ html: 'I am a template!
'
+ },
+ {
+ name: 'Template 2',
+ html: 'I am a different template!
'
+ }
+ ]
+ }
});
-
- Some doc to write about template options/definition...
- You can contribute to this documentation by submitting a Pull Request :)
-
' }, + da: { + preformatted: 'Præformateret' + }, fr: { preformatted: 'Exemple de code' }, diff --git a/plugins/ruby/trumbowyg.ruby.js b/plugins/ruby/trumbowyg.ruby.js index e04a6350e..c3499a700 100644 --- a/plugins/ruby/trumbowyg.ruby.js +++ b/plugins/ruby/trumbowyg.ruby.js @@ -18,6 +18,11 @@ rubyModal: 'Ruby modal', rubyText: 'Ruby text' }, + da: { + ruby: 'Tilføj ruby tekst', + rubyModal: 'Ruby modal', + rubyText: 'Ruby tekst' + }, fr: { ruby: 'Ajouter du texte ruby', rubyModal: 'Modale ruby', diff --git a/plugins/table/trumbowyg.table.js b/plugins/table/trumbowyg.table.js index 546c41ec4..f4e0e4ebd 100644 --- a/plugins/table/trumbowyg.table.js +++ b/plugins/table/trumbowyg.table.js @@ -26,6 +26,15 @@ tableDestroy: 'Delete table', error: 'Error' }, + da: { + table: 'Indsæt tabel', + tableAddRow: 'Tilføj række', + tableAddColumn: 'Tilføj kolonne', + tableDeleteRow: 'Slet række', + tableDeleteColumn: 'Slet kolonne', + tableDestroy: 'Slet tabel', + error: 'Fejl' + }, de: { table: 'Tabelle einfügen', tableAddRow: 'Zeile hinzufügen', @@ -55,8 +64,11 @@ }, ru: { table: 'Вставить таблицу', - tableAddRow: 'Добавить строки', - tableAddColumn: 'Добавить столбцы', + tableAddRow: 'Добавить строку', + tableAddColumn: 'Добавить столбец', + tableDeleteRow: 'Удалить строку', + tableDeleteColumn: 'Удалить столбец', + tableDestroy: 'Удалить таблицу', error: 'Ошибка' }, ja: { diff --git a/plugins/table/ui/sass/trumbowyg.table.scss b/plugins/table/ui/sass/trumbowyg.table.scss index fe58b33b5..6b821d587 100644 --- a/plugins/table/ui/sass/trumbowyg.table.scss +++ b/plugins/table/ui/sass/trumbowyg.table.scss @@ -18,6 +18,7 @@ height: 20px; width: 20px; margin: 1px; + padding: 0; background-color: #fff; box-shadow: 0 0 0 1px #cecece inset; diff --git a/plugins/template/trumbowyg.template.js b/plugins/template/trumbowyg.template.js index 8d96058b9..d18653f11 100644 --- a/plugins/template/trumbowyg.template.js +++ b/plugins/template/trumbowyg.template.js @@ -7,6 +7,9 @@ en: { template: 'Template' }, + da: { + template: 'Skabelon' + }, fr: { template: 'Patron' }, diff --git a/plugins/upload/trumbowyg.upload.js b/plugins/upload/trumbowyg.upload.js index 580d2104e..9be0c88af 100644 --- a/plugins/upload/trumbowyg.upload.js +++ b/plugins/upload/trumbowyg.upload.js @@ -53,6 +53,11 @@ file: 'File', uploadError: 'Error' }, + da: { + upload: 'Upload', + file: 'Fil', + uploadError: 'Fejl' + }, sk: { upload: 'Nahrať', file: 'Súbor', diff --git a/src/langs/da.js b/src/langs/da.js index 7256e85aa..bb0311634 100644 --- a/src/langs/da.js +++ b/src/langs/da.js @@ -10,7 +10,10 @@ jQuery.trumbowyg.langs.da = { viewHTML: 'Vis HTML', - formatting: 'Formatter', + undo: 'Fortryd', + redo: 'Anuller fortryd', + + formatting: 'Formattering', p: 'Afsnit', blockquote: 'Citat', code: 'Kode', @@ -25,6 +28,9 @@ jQuery.trumbowyg.langs.da = { em: 'Fremhæv', del: 'Slettet', + superscript: 'Hævet skrift', + subscript: 'Sænket skrift', + unorderedList: 'Uordnet liste', orderedList: 'Ordnet liste', @@ -40,6 +46,7 @@ jQuery.trumbowyg.langs.da = { justifyFull: 'Lige margener', horizontalRule: 'Horisontal linie', + removeformat: 'Ryd formattering', fullscreen: 'Fuld skærm', @@ -51,5 +58,7 @@ jQuery.trumbowyg.langs.da = { required: 'Påkrævet', description: 'Beskrivelse', title: 'Titel', - text: 'Tekst' + text: 'Tekst', + target: 'Mål', + width: 'Bredde' }; \ No newline at end of file diff --git a/src/trumbowyg.js b/src/trumbowyg.js index 09efd18ec..007ebfbd1 100644 --- a/src/trumbowyg.js +++ b/src/trumbowyg.js @@ -268,7 +268,8 @@ Object.defineProperty(jQuery.trumbowyg, 'defaultOptions', { }; t.btnsDef = { viewHTML: { - fn: 'toggle' + fn: 'toggle', + class: 'trumbowyg-not-disable', }, undo: { @@ -1247,7 +1248,7 @@ Object.defineProperty(jQuery.trumbowyg, 'defaultOptions', { return false; } - var link = $(['', v.text || v.url, ''].join('')); + var link = $(['', v.text || v.url, ''].join('')); if (!t.o.minimalLinks) { if (v.title.length > 0) { @@ -1270,12 +1271,12 @@ Object.defineProperty(jQuery.trumbowyg, 'defaultOptions', { return url; } - const VALID_LINK_PREFIX = /^([a-z][-+.a-z0-9]*:|\/|#)/i; + var VALID_LINK_PREFIX = /^([a-z][-+.a-z0-9]*:|\/|#)/i; if (VALID_LINK_PREFIX.test(url)) { return url; } - const SIMPLE_EMAIL_REGEX = /^[^\s@]+@[^\s@]+\.[^\s@]+$/; + var SIMPLE_EMAIL_REGEX = /^[^\s@]+@[^\s@]+\.[^\s@]+$/; if (SIMPLE_EMAIL_REGEX.test(url)) { return 'mailto:' + url; } @@ -1639,7 +1640,7 @@ Object.defineProperty(jQuery.trumbowyg, 'defaultOptions', { } t.openModalInsert(t.lang.insertImage, options, function (v) { - if (v.src !== base64) { + if (v.url !== base64) { $img.attr({ src: v.url });