├── .bowerrc ├── .gitignore ├── .jshintrc ├── Gruntfile.js ├── LICENCE ├── README.md ├── bower.json ├── dist ├── amd │ ├── bootstrap3-wysihtml5.all.js │ ├── bootstrap3-wysihtml5.all.min.js │ ├── commands.js │ ├── handlebars.runtime.amd.js │ ├── templates.js │ └── wysihtml5.js ├── bootstrap3-wysihtml5.all.js ├── bootstrap3-wysihtml5.all.min.js ├── bootstrap3-wysihtml5.css ├── bootstrap3-wysihtml5.js ├── bootstrap3-wysihtml5.min.css ├── bootstrap3-wysihtml5.min.js ├── commands.js ├── locales │ ├── bootstrap-wysihtml5.ar-AR.js │ ├── bootstrap-wysihtml5.bg-BG.js │ ├── bootstrap-wysihtml5.ca-CT.js │ ├── bootstrap-wysihtml5.cs-CZ.js │ ├── bootstrap-wysihtml5.da-DK.js │ ├── bootstrap-wysihtml5.de-DE.js │ ├── bootstrap-wysihtml5.el-GR.js │ ├── bootstrap-wysihtml5.en-US.js │ ├── bootstrap-wysihtml5.es-AR.js │ ├── bootstrap-wysihtml5.es-ES.js │ ├── bootstrap-wysihtml5.fr-FR.js │ ├── bootstrap-wysihtml5.hr-HR.js │ ├── bootstrap-wysihtml5.hu-HU.js │ ├── bootstrap-wysihtml5.il-HE.js │ ├── bootstrap-wysihtml5.it-IT.js │ ├── bootstrap-wysihtml5.ja-JP.js │ ├── bootstrap-wysihtml5.ko-KR.js │ ├── bootstrap-wysihtml5.lt-LT.js │ ├── bootstrap-wysihtml5.mo-MD.js │ ├── bootstrap-wysihtml5.nb-NB.js │ ├── bootstrap-wysihtml5.nl-NL.js │ ├── bootstrap-wysihtml5.pl-PL.js │ ├── bootstrap-wysihtml5.pt-BR.js │ ├── bootstrap-wysihtml5.ru-RU.js │ ├── bootstrap-wysihtml5.sk-SK.js │ ├── bootstrap-wysihtml5.sv-SE.js │ ├── bootstrap-wysihtml5.tr-TR.js │ ├── bootstrap-wysihtml5.ua-UA.js │ ├── bootstrap-wysihtml5.zh-CN.js │ └── bootstrap-wysihtml5.zh-TW.js ├── parser_rules │ ├── advanced.json │ ├── advanced_and_extended.json │ ├── advanced_and_extended_paste.json │ ├── advanced_unwrap.json │ └── simple.json └── templates.js ├── examples ├── index-require-dev.html ├── index-require.html ├── main-dev.js ├── main.js ├── start-dev.js └── start.js ├── generator ├── generate.html ├── generate_advanced.html ├── generate_advanced_unwrap.html ├── generate_simple.html └── print_parser_rules.js ├── index-all.html ├── index-dev.html ├── index-multi-dev.html ├── index.html ├── karma.conf.js ├── package.json ├── src ├── bootstrap3-wysihtml5.css ├── bootstrap3-wysihtml5.js ├── commands │ └── small.js ├── generated │ ├── commands.js │ └── templates.js ├── locales │ ├── bootstrap-wysihtml5.ar-AR.js │ ├── bootstrap-wysihtml5.bg-BG.js │ ├── bootstrap-wysihtml5.ca-CT.js │ ├── bootstrap-wysihtml5.cs-CZ.js │ ├── bootstrap-wysihtml5.da-DK.js │ ├── bootstrap-wysihtml5.de-DE.js │ ├── bootstrap-wysihtml5.el-GR.js │ ├── bootstrap-wysihtml5.en-US.js │ ├── bootstrap-wysihtml5.eo-EO.js │ ├── bootstrap-wysihtml5.es-AR.js │ ├── bootstrap-wysihtml5.es-ES.js │ ├── bootstrap-wysihtml5.fr-FR.js │ ├── bootstrap-wysihtml5.hr-HR.js │ ├── bootstrap-wysihtml5.hu-HU.js │ ├── bootstrap-wysihtml5.il-HE.js │ ├── bootstrap-wysihtml5.it-IT.js │ ├── bootstrap-wysihtml5.ja-JP.js │ ├── bootstrap-wysihtml5.ko-KR.js │ ├── bootstrap-wysihtml5.lt-LT.js │ ├── bootstrap-wysihtml5.mo-MD.js │ ├── bootstrap-wysihtml5.nb-NB.js │ ├── bootstrap-wysihtml5.nl-NL.js │ ├── bootstrap-wysihtml5.pl-PL.js │ ├── bootstrap-wysihtml5.pt-BR.js │ ├── bootstrap-wysihtml5.ru-RU.js │ ├── bootstrap-wysihtml5.sk-SK.js │ ├── bootstrap-wysihtml5.sv-SE.js │ ├── bootstrap-wysihtml5.tr-TR.js │ ├── bootstrap-wysihtml5.ua-UA.js │ ├── bootstrap-wysihtml5.vi-VN.js │ ├── bootstrap-wysihtml5.zh-CN.js │ └── bootstrap-wysihtml5.zh-TW.js ├── parser_rules │ ├── advanced.json │ ├── advanced_and_extended.json │ ├── advanced_and_extended_paste.json │ ├── advanced_unwrap.json │ └── simple.json └── templates │ ├── blockquote.hbs │ ├── color.hbs │ ├── emphasis.hbs │ ├── font-styles.hbs │ ├── html.hbs │ ├── image.hbs │ ├── link.hbs │ └── lists.hbs └── test ├── browser_test.js ├── bs ├── bootstrap_editor_changeView_test.js ├── bootstrap_editor_commands_test.js ├── bootstrap_editor_image_test.js └── bootstrap_editor_link_test.js ├── dom ├── auto_link_test.js ├── compare_document_position_test.js ├── contains_test.js ├── convert_to_list_test.js ├── copy_attributes_test.js ├── copy_styles_test.js ├── delegate_test.js ├── dom_node_test.js ├── get_as_dom_test.js ├── get_next_previous_element.js ├── get_parent_element_test.js ├── get_style_test.js ├── has_element_with_class_name_test.js ├── has_element_with_tag_name_test.js ├── insert_css_test.js ├── observe_test.js ├── parse_test.js ├── rename_element_test.js ├── resolve_list_test.js ├── sandbox_test.js ├── set_attributes_test.js ├── set_styles_test.js ├── table_test.js └── unwrap_test.js ├── editor_commands_test.js ├── editor_contenteditablemode_test.js ├── editor_test.js ├── incompatible_test.js ├── index.html ├── karma ├── test-main.js └── testframework_test.js ├── lang ├── array_test.js ├── object_test.js └── string_test.js ├── quirks └── clean_pasted_html_test.js ├── testhelper.js └── undo_manager_test.js /.bowerrc: -------------------------------------------------------------------------------- 1 | { 2 | "directory": "components" 3 | } 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | components 4 | coverage 5 | -------------------------------------------------------------------------------- /LICENCE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2012 JFHollingworth LTD 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | 7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bootstrap3-wysihtml5-bower", 3 | "version": "0.3.4-wip", 4 | "main": [ 5 | "dist/bootstrap3-wysihtml5.min.css", 6 | "dist/bootstrap3-wysihtml5.min.js" 7 | ], 8 | "dependencies": { 9 | "wysihtml5x": "0.4.15", 10 | "bootstrap": ">=3", 11 | "components-font-awesome": ">=4", 12 | "handlebars": "~1.3.0", 13 | "jquery": ">=2.1" 14 | }, 15 | "homepage": "https://github.com/Waxolunist/bootstrap3-wysihtml5-bower", 16 | "authors": [ 17 | "Christian Sterzl " 18 | ], 19 | "description": "Bootstrap 3 compatible wysiwyg editor", 20 | "keywords": [ 21 | "bootstrap", 22 | "wysiwyg" 23 | ], 24 | "license": "MIT", 25 | "ignore": [ 26 | "**/.*", 27 | "node_modules", 28 | "bower_components", 29 | "components", 30 | "test", 31 | "tests", 32 | "Gruntfile.js", 33 | "package.json", 34 | "src" 35 | ], 36 | "devDependencies": { 37 | "requirejs": "~2.1.15", 38 | "requirejs-domready": "~2.0.1" 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /dist/amd/commands.js: -------------------------------------------------------------------------------- 1 | define("bootstrap.wysihtml5.commands", ["wysihtml5"], function(wysihtml5) { 2 | 3 | (function(wysihtml5) { 4 | wysihtml5.commands.small = { 5 | exec: function(composer, command) { 6 | return wysihtml5.commands.formatInline.exec(composer, command, "small"); 7 | }, 8 | 9 | state: function(composer, command) { 10 | return wysihtml5.commands.formatInline.state(composer, command, "small"); 11 | } 12 | }; 13 | })(wysihtml5); 14 | 15 | 16 | 17 | }); -------------------------------------------------------------------------------- /dist/bootstrap3-wysihtml5.css: -------------------------------------------------------------------------------- 1 | ul.wysihtml5-toolbar { 2 | margin: 0; 3 | padding: 0; 4 | display: block; 5 | } 6 | 7 | ul.wysihtml5-toolbar::after { 8 | clear: both; 9 | display: table; 10 | content: ""; 11 | } 12 | 13 | ul.wysihtml5-toolbar > li { 14 | float: left; 15 | display: list-item; 16 | list-style: none; 17 | margin: 0 5px 10px 0; 18 | } 19 | 20 | ul.wysihtml5-toolbar a[data-wysihtml5-command=bold] { 21 | font-weight: bold; 22 | } 23 | 24 | ul.wysihtml5-toolbar a[data-wysihtml5-command=italic] { 25 | font-style: italic; 26 | } 27 | 28 | ul.wysihtml5-toolbar a[data-wysihtml5-command=underline] { 29 | text-decoration: underline; 30 | } 31 | 32 | ul.wysihtml5-toolbar a.btn.wysihtml5-command-active { 33 | background-image: none; 34 | -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05); 35 | -moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05); 36 | box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05); 37 | background-color: #E6E6E6; 38 | background-color: #D9D9D9; 39 | outline: 0; 40 | } 41 | 42 | ul.wysihtml5-commands-disabled .dropdown-menu { 43 | display: none !important; 44 | } 45 | 46 | ul.wysihtml5-toolbar div.wysihtml5-colors { 47 | display:block; 48 | width: 50px; 49 | height: 20px; 50 | margin-top: 2px; 51 | margin-left: 5px; 52 | position: absolute; 53 | pointer-events: none; 54 | } 55 | 56 | ul.wysihtml5-toolbar a.wysihtml5-colors-title { 57 | padding-left: 70px; 58 | } 59 | 60 | ul.wysihtml5-toolbar div[data-wysihtml5-command-value="black"] { 61 | background: black !important; 62 | } 63 | 64 | ul.wysihtml5-toolbar div[data-wysihtml5-command-value="silver"] { 65 | background: silver !important; 66 | } 67 | 68 | ul.wysihtml5-toolbar div[data-wysihtml5-command-value="gray"] { 69 | background: gray !important; 70 | } 71 | 72 | ul.wysihtml5-toolbar div[data-wysihtml5-command-value="maroon"] { 73 | background: maroon !important; 74 | } 75 | 76 | ul.wysihtml5-toolbar div[data-wysihtml5-command-value="red"] { 77 | background: red !important; 78 | } 79 | 80 | ul.wysihtml5-toolbar div[data-wysihtml5-command-value="purple"] { 81 | background: purple !important; 82 | } 83 | 84 | ul.wysihtml5-toolbar div[data-wysihtml5-command-value="green"] { 85 | background: green !important; 86 | } 87 | 88 | ul.wysihtml5-toolbar div[data-wysihtml5-command-value="olive"] { 89 | background: olive !important; 90 | } 91 | 92 | ul.wysihtml5-toolbar div[data-wysihtml5-command-value="navy"] { 93 | background: navy !important; 94 | } 95 | 96 | ul.wysihtml5-toolbar div[data-wysihtml5-command-value="blue"] { 97 | background: blue !important; 98 | } 99 | 100 | ul.wysihtml5-toolbar div[data-wysihtml5-command-value="orange"] { 101 | background: orange !important; 102 | } 103 | 104 | .glyphicon-quote:before { 105 | content: "\201C"; 106 | font-family: Georgia, serif; 107 | font-size: 50px; 108 | position: absolute; 109 | top: -4px; 110 | left: -3px; 111 | max-height: 100%; 112 | } 113 | 114 | .glyphicon-quote:after { 115 | content: "\0000a0"; 116 | } 117 | 118 | -------------------------------------------------------------------------------- /dist/bootstrap3-wysihtml5.min.css: -------------------------------------------------------------------------------- 1 | /*! bootstrap3-wysihtml5-bower 2014-09-26 */ 2 | 3 | ul.wysihtml5-toolbar{margin:0;padding:0;display:block}ul.wysihtml5-toolbar::after{clear:both;display:table;content:""}ul.wysihtml5-toolbar>li{float:left;display:list-item;list-style:none;margin:0 5px 10px 0}ul.wysihtml5-toolbar a[data-wysihtml5-command=bold]{font-weight:700}ul.wysihtml5-toolbar a[data-wysihtml5-command=italic]{font-style:italic}ul.wysihtml5-toolbar a[data-wysihtml5-command=underline]{text-decoration:underline}ul.wysihtml5-toolbar a.btn.wysihtml5-command-active{background-image:none;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05);background-color:#D9D9D9;outline:0}ul.wysihtml5-commands-disabled .dropdown-menu{display:none!important}ul.wysihtml5-toolbar div.wysihtml5-colors{display:block;width:50px;height:20px;margin-top:2px;margin-left:5px;position:absolute;pointer-events:none}ul.wysihtml5-toolbar a.wysihtml5-colors-title{padding-left:70px}ul.wysihtml5-toolbar div[data-wysihtml5-command-value=black]{background:#000!important}ul.wysihtml5-toolbar div[data-wysihtml5-command-value=silver]{background:silver!important}ul.wysihtml5-toolbar div[data-wysihtml5-command-value=gray]{background:gray!important}ul.wysihtml5-toolbar div[data-wysihtml5-command-value=maroon]{background:maroon!important}ul.wysihtml5-toolbar div[data-wysihtml5-command-value=red]{background:red!important}ul.wysihtml5-toolbar div[data-wysihtml5-command-value=purple]{background:purple!important}ul.wysihtml5-toolbar div[data-wysihtml5-command-value=green]{background:green!important}ul.wysihtml5-toolbar div[data-wysihtml5-command-value=olive]{background:olive!important}ul.wysihtml5-toolbar div[data-wysihtml5-command-value=navy]{background:navy!important}ul.wysihtml5-toolbar div[data-wysihtml5-command-value=blue]{background:#00f!important}ul.wysihtml5-toolbar div[data-wysihtml5-command-value=orange]{background:orange!important}.glyphicon-quote:before{content:"\201C";font-family:Georgia,serif;font-size:50px;position:absolute;top:-4px;left:-3px;max-height:100%}.glyphicon-quote:after{content:"\0000a0"} -------------------------------------------------------------------------------- /dist/commands.js: -------------------------------------------------------------------------------- 1 | (function(wysihtml5) { 2 | wysihtml5.commands.small = { 3 | exec: function(composer, command) { 4 | return wysihtml5.commands.formatInline.exec(composer, command, "small"); 5 | }, 6 | 7 | state: function(composer, command) { 8 | return wysihtml5.commands.formatInline.state(composer, command, "small"); 9 | } 10 | }; 11 | })(wysihtml5); 12 | 13 | -------------------------------------------------------------------------------- /dist/locales/bootstrap-wysihtml5.ar-AR.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Arabic translation for bootstrap-wysihtml5 3 | */ 4 | (function (factory) { 5 | if (typeof define === 'function' && define.amd) { 6 | // AMD. Register as an anonymous module. 7 | define('bootstrap.wysihtml5.ar-AR', ['jquery', 'bootstrap.wysihtml5'], factory); 8 | } else { 9 | // Browser globals 10 | factory(jQuery); 11 | } 12 | }(function($){ 13 | $.fn.wysihtml5.locale["ar-AR"] = { 14 | font_styles: { 15 | normal: "نص عادي", 16 | h1: "عنوان رئيسي 1", 17 | h2: "عنوان رئيسي 2", 18 | h3: "عنوان رئيسي 3", 19 | h4: "عنوان رئيسي 4", 20 | h5: "عنوان رئيسي 5", 21 | h6: "عنوان رئيسي 6" 22 | }, 23 | emphasis: { 24 | bold: "عريض", 25 | italic: "مائل", 26 | underline: "تحته خط" 27 | }, 28 | lists: { 29 | unordered: "قائمة منقطة", 30 | ordered: "قائمة مرقمة", 31 | outdent: "محاذاه للخارج", 32 | indent: "محاذاه للداخل" 33 | }, 34 | link: { 35 | insert: "إضافة رابط", 36 | cancel: "إلغاء" 37 | }, 38 | image: { 39 | insert: "إضافة صورة", 40 | cancel: "إلغاء" 41 | }, 42 | html: { 43 | edit: "تعديل HTML" 44 | }, 45 | 46 | colours: { 47 | black: "أسود", 48 | silver: "فضي", 49 | gray: "رمادي", 50 | maroon: "بني", 51 | red: "أحمر", 52 | purple: "بنفسجي", 53 | green: "أخضر", 54 | olive: "زيتوني", 55 | navy: "أزرق قاتم", 56 | blue: "أزرق نيلي", 57 | orange: "برتقالي" 58 | } 59 | }; 60 | })); 61 | -------------------------------------------------------------------------------- /dist/locales/bootstrap-wysihtml5.bg-BG.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Bulgarian translation for bootstrap-wysihtml5 3 | */ 4 | (function (factory) { 5 | if (typeof define === 'function' && define.amd) { 6 | // AMD. Register as an anonymous module. 7 | define('bootstrap.wysihtml5.bg-BG', ['jquery', 'bootstrap.wysihtml5'], factory); 8 | } else { 9 | // Browser globals 10 | factory(jQuery); 11 | } 12 | }(function($){ 13 | $.fn.wysihtml5.locale["bg-BG"] = { 14 | font_styles: { 15 | normal: "Нормален текст", 16 | h1: "Заглавие 1", 17 | h2: "Заглавие 2", 18 | h3: "Заглавие 3", 19 | h4: "Заглавие 4", 20 | h5: "Заглавие 5", 21 | h6: "Заглавие 6" 22 | }, 23 | emphasis: { 24 | bold: "Удебелен", 25 | italic: "Курсив", 26 | underline: "Подчертан" 27 | }, 28 | lists: { 29 | unordered: "Неподреден списък", 30 | ordered: "Подреден списък", 31 | outdent: "Намали отстояние", 32 | indent: "Увеличи отстояние" 33 | }, 34 | link: { 35 | insert: "Вмъкни връзка", 36 | cancel: "Отмени" 37 | }, 38 | image: { 39 | insert: "Вмъкни картинка", 40 | cancel: "Отмени" 41 | }, 42 | html: { 43 | edit: "Редакртирай HTML" 44 | }, 45 | colours: { 46 | black: "Черен", 47 | silver: "Сребърен", 48 | gray: "Сив", 49 | maroon: "Коричневый", 50 | red: "Червен", 51 | purple: "Виолетов", 52 | green: "Зелен", 53 | olive: "Маслинен", 54 | navy: "Морско син", 55 | blue: "Син", 56 | orange: "Оранжев" 57 | } 58 | }; 59 | })); 60 | 61 | -------------------------------------------------------------------------------- /dist/locales/bootstrap-wysihtml5.ca-CT.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Catalan translation for bootstrap-wysihtml5 3 | */ 4 | (function (factory) { 5 | if (typeof define === 'function' && define.amd) { 6 | // AMD. Register as an anonymous module. 7 | define('bootstrap.wysihtml5.ca-CT', ['jquery', 'bootstrap.wysihtml5'], factory); 8 | } else { 9 | // Browser globals 10 | factory(jQuery); 11 | } 12 | }(function($){ 13 | $.fn.wysihtml5.locale["ca-CT"] = { 14 | font_styles: { 15 | normal: "Text normal", 16 | h1: "Títol 1", 17 | h2: "Títol 2", 18 | h3: "Títol 3", 19 | h4: "Títol 4", 20 | h5: "Títol 5", 21 | h6: "Títol 6" 22 | }, 23 | emphasis: { 24 | bold: "Negreta", 25 | italic: "Cursiva", 26 | underline: "Subratllat" 27 | }, 28 | lists: { 29 | unordered: "Llista desordenada", 30 | ordered: "Llista ordenada", 31 | outdent: "Esborrar tabulació", 32 | indent: "Afegir tabulació" 33 | }, 34 | link: { 35 | insert: "Afegir enllaç", 36 | cancel: "Cancelar" 37 | }, 38 | image: { 39 | insert: "Afegir imatge", 40 | cancel: "Cancelar" 41 | }, 42 | html: { 43 | edit: "Editar HTML" 44 | }, 45 | colours: { 46 | black: "Negre", 47 | silver: "Plata", 48 | gray: "Gris", 49 | maroon: "Marró", 50 | red: "Vermell", 51 | purple: "Porpre", 52 | green: "Verd", 53 | olive: "Oliva", 54 | navy: "Blau marí", 55 | blue: "Blau", 56 | orange: "Taronja" 57 | } 58 | }; 59 | })); 60 | -------------------------------------------------------------------------------- /dist/locales/bootstrap-wysihtml5.cs-CZ.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Czech translation for bootstrap-wysihtml5 3 | */ 4 | (function (factory) { 5 | if (typeof define === 'function' && define.amd) { 6 | // AMD. Register as an anonymous module. 7 | define('bootstrap.wysihtml5.cs-CZ', ['jquery', 'bootstrap.wysihtml5'], factory); 8 | } else { 9 | // Browser globals 10 | factory(jQuery); 11 | } 12 | }(function($){ 13 | $.fn.wysihtml5.locale["cs-CZ"] = { 14 | font_styles: { 15 | normal: "Normální text", 16 | h1: "Nadpis úrovně 1", 17 | h2: "Nadpis úrovně 2", 18 | h3: "Nadpis úrovně 3", 19 | h4: "Nadpis úrovně 4", 20 | h5: "Nadpis úrovně 5", 21 | h6: "Nadpis úrovně 6" 22 | }, 23 | emphasis: { 24 | bold: "Tučné", 25 | italic: "Kurzíva", 26 | underline: "Podtržení" 27 | }, 28 | lists: { 29 | unordered: "Seznam s odrážkami", 30 | ordered: "Číslovaný seznam", 31 | outdent: "Zvětšit odsazení", 32 | indent: "Zmenšit odsazení" 33 | }, 34 | link: { 35 | insert: "Vložit odkaz", 36 | cancel: "Zrušit" 37 | }, 38 | image: { 39 | insert: "Vložit obrázek", 40 | cancel: "Zrušit" 41 | }, 42 | html: { 43 | edit: "Upravit HTML" 44 | }, 45 | colours: { 46 | black: "Černá", 47 | silver: "Stříbrná", 48 | gray: "Šedá", 49 | maroon: "Vínová", 50 | red: "Červená", 51 | purple: "Fialová", 52 | green: "Zelená", 53 | olive: "Olivová", 54 | navy: "Tmavomodrá", 55 | blue: "Modrá", 56 | orange: "Oranžová" 57 | } 58 | }; 59 | })); 60 | -------------------------------------------------------------------------------- /dist/locales/bootstrap-wysihtml5.da-DK.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Danish translations 3 | */ 4 | (function (factory) { 5 | if (typeof define === 'function' && define.amd) { 6 | // AMD. Register as an anonymous module. 7 | define('bootstrap.wysihtml5.da-DK', ['jquery', 'bootstrap.wysihtml5'], factory); 8 | } else { 9 | // Browser globals 10 | factory(jQuery); 11 | } 12 | }(function($){ 13 | $.fn.wysihtml5.locale["da-DK"] = { 14 | font_styles: { 15 | normal: "Normal tekst", 16 | h1: "Overskrift 1", 17 | h2: "Overskrift 2", 18 | h3: "Overskrift 3", 19 | h4: "Overskrift 4", 20 | h5: "Overskrift 5", 21 | h6: "Overskrift 6" 22 | }, 23 | emphasis: { 24 | bold: "Fed", 25 | italic: "Kursiv", 26 | underline: "Understreget" 27 | }, 28 | lists: { 29 | unordered: "Uordnet liste", 30 | ordered: "Ordnet liste", 31 | outdent: "Udryk", 32 | indent: "Indryk" 33 | }, 34 | link: { 35 | insert: "Indsæt Link", 36 | cancel: "Annuler" 37 | }, 38 | image: { 39 | insert: "Indsæt billede", 40 | cancel: "Annuler" 41 | }, 42 | html: { 43 | edit: "Rediger HTML" 44 | }, 45 | colours: { 46 | black: "Sort", 47 | silver: "Sølv", 48 | gray: "Grå", 49 | maroon: "Mørkerød", 50 | red: "Rød", 51 | purple: "Lilla", 52 | green: "Grøn", 53 | olive: "Lysegrøn", 54 | navy: "Mørkeblå", 55 | blue: "Blå", 56 | orange: "Orange" 57 | } 58 | }; 59 | })); 60 | -------------------------------------------------------------------------------- /dist/locales/bootstrap-wysihtml5.de-DE.js: -------------------------------------------------------------------------------- 1 | /** 2 | * German translation for bootstrap-wysihtml5 3 | */ 4 | (function (factory) { 5 | if (typeof define === 'function' && define.amd) { 6 | // AMD. Register as an anonymous module. 7 | define('bootstrap.wysihtml5.de-DE', ['jquery', 'bootstrap.wysihtml5'], factory); 8 | } else { 9 | // Browser globals 10 | factory(jQuery); 11 | } 12 | }(function($){ 13 | $.fn.wysihtml5.locale["de-DE"] = { 14 | font_styles: { 15 | normal: "Normaler Text", 16 | h1: "Überschrift 1", 17 | h2: "Überschrift 2", 18 | h3: "Überschrift 3", 19 | h4: "Überschrift 4", 20 | h5: "Überschrift 5", 21 | h6: "Überschrift 6" 22 | }, 23 | emphasis: { 24 | bold: "Fett", 25 | italic: "Kursiv", 26 | underline: "Unterstrichen", 27 | small: "Klein" 28 | }, 29 | lists: { 30 | unordered: "Ungeordnete Liste", 31 | ordered: "Geordnete Liste", 32 | outdent: "Einzug verkleinern", 33 | indent: "Einzug vergrößern" 34 | }, 35 | link: { 36 | insert: "Link einfügen", 37 | cancel: "Abbrechen", 38 | target: "Link in neuen Fenster öffnen" 39 | }, 40 | image: { 41 | insert: "Bild einfügen", 42 | cancel: "Abbrechen" 43 | }, 44 | html: { 45 | edit: "HTML bearbeiten" 46 | }, 47 | colours: { 48 | black: "Schwarz", 49 | silver: "Silber", 50 | gray: "Grau", 51 | maroon: "Kastanienbraun", 52 | red: "Rot", 53 | purple: "Violett", 54 | green: "Grün", 55 | olive: "Olivgrün", 56 | navy: "Marineblau", 57 | blue: "Blau", 58 | orange: "Orange" 59 | } 60 | }; 61 | })); 62 | -------------------------------------------------------------------------------- /dist/locales/bootstrap-wysihtml5.el-GR.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Greek translation for bootstrap-wysihtml5 3 | */ 4 | (function (factory) { 5 | if (typeof define === 'function' && define.amd) { 6 | // AMD. Register as an anonymous module. 7 | define('bootstrap.wysihtml5.el-GR', ['jquery', 'bootstrap.wysihtml5'], factory); 8 | } else { 9 | // Browser globals 10 | factory(jQuery); 11 | } 12 | }(function($){ 13 | $.fn.wysihtml5.locale["el-GR"] = { 14 | font_styles: { 15 | normal: "Απλό κείμενο", 16 | h1: "Κεφαλίδα 1", 17 | h2: "Κεφαλίδα 2", 18 | h3: "Κεφαλίδα 3" 19 | }, 20 | emphasis: { 21 | bold: "B", 22 | italic: "I", 23 | underline: "U" 24 | }, 25 | lists: { 26 | unordered: "Λίστα με κουκκίδες", 27 | ordered: "Αριθμημένη λίστα", 28 | outdent: "Μείωση εσοχής", 29 | indent: "Αύξηση εσοχής" 30 | }, 31 | link: { 32 | insert: "Εισαγωγή Συνδέσμου", 33 | cancel: "Άκυρο" 34 | }, 35 | image: { 36 | insert: "Εισαγωγή Εικόνας", 37 | cancel: "Άκυρο" 38 | }, 39 | html: { 40 | edit: "Επεξεργασία HTML" 41 | }, 42 | colours: { 43 | black: "Μαύρο", 44 | silver: "Ασημί", 45 | gray: "Γκρι", 46 | maroon: "Καφέ", 47 | red: "Κόκκινο", 48 | purple: "Μωβ", 49 | green: "Πράσινο", 50 | olive: "Λαδί", 51 | navy: "Βαθύ Μπλε", 52 | blue: "Μπλε", 53 | orange: "Πορτοκαλί" 54 | } 55 | }; 56 | })); 57 | -------------------------------------------------------------------------------- /dist/locales/bootstrap-wysihtml5.en-US.js: -------------------------------------------------------------------------------- 1 | /** 2 | * English translation for bootstrap-wysihtml5 3 | */ 4 | (function (factory) { 5 | if (typeof define === 'function' && define.amd) { 6 | // AMD. Register as an anonymous module. 7 | define('bootstrap.wysihtml5.en-US', ['jquery', 'bootstrap.wysihtml5'], factory); 8 | } else { 9 | // Browser globals 10 | factory(jQuery); 11 | } 12 | }(function ($) { 13 | $.fn.wysihtml5.locale.en = $.fn.wysihtml5.locale['en-US'] = { 14 | font_styles: { 15 | normal: 'Normal text', 16 | h1: 'Heading 1', 17 | h2: 'Heading 2', 18 | h3: 'Heading 3', 19 | h4: 'Heading 4', 20 | h5: 'Heading 5', 21 | h6: 'Heading 6' 22 | }, 23 | emphasis: { 24 | bold: 'Bold', 25 | italic: 'Italic', 26 | underline: 'Underline', 27 | small: 'Small' 28 | }, 29 | lists: { 30 | unordered: 'Unordered list', 31 | ordered: 'Ordered list', 32 | outdent: 'Outdent', 33 | indent: 'Indent' 34 | }, 35 | link: { 36 | insert: 'Insert link', 37 | cancel: 'Cancel', 38 | target: 'Open link in new window' 39 | }, 40 | image: { 41 | insert: 'Insert image', 42 | cancel: 'Cancel' 43 | }, 44 | html: { 45 | edit: 'Edit HTML' 46 | }, 47 | colours: { 48 | black: 'Black', 49 | silver: 'Silver', 50 | gray: 'Grey', 51 | maroon: 'Maroon', 52 | red: 'Red', 53 | purple: 'Purple', 54 | green: 'Green', 55 | olive: 'Olive', 56 | navy: 'Navy', 57 | blue: 'Blue', 58 | orange: 'Orange' 59 | } 60 | }; 61 | })); 62 | -------------------------------------------------------------------------------- /dist/locales/bootstrap-wysihtml5.es-AR.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Spanish Argenina translation for bootstrap-wysihtml5 3 | */ 4 | (function (factory) { 5 | if (typeof define === 'function' && define.amd) { 6 | // AMD. Register as an anonymous module. 7 | define('bootstrap.wysihtml5.es-AR', ['jquery', 'bootstrap.wysihtml5'], factory); 8 | } else { 9 | // Browser globals 10 | factory(jQuery); 11 | } 12 | }(function($){ 13 | $.fn.wysihtml5.locale["es-AR"] = { 14 | font_styles: { 15 | normal: "Texto normal", 16 | h1: "Título 1", 17 | h2: "Título 2", 18 | h3: "Título 3", 19 | h4: "Título 4", 20 | h5: "Título 5", 21 | h6: "Título 6" 22 | }, 23 | emphasis: { 24 | bold: "Negrita", 25 | italic: "Itálica", 26 | underline: "Subrayado", 27 | small: "Subíndice" 28 | }, 29 | lists: { 30 | ordered: "Lista ordenada", 31 | unordered: "Lista desordenada", 32 | indent: "Agregar sangría", 33 | outdent: "Eliminar sangría" 34 | }, 35 | link: { 36 | insert: "Insertar enlace", 37 | cancel: "Cancelar", 38 | target: "Abrir enlace en una ventana nueva" 39 | }, 40 | image: { 41 | insert: "Insertar imagen", 42 | cancel: "Cancelar" 43 | }, 44 | html: { 45 | edit: "Editar HTML" 46 | }, 47 | colours: { 48 | black: "Negro", 49 | silver: "Plata", 50 | gray: "Gris", 51 | maroon: "Marrón", 52 | red: "Rojo", 53 | purple: "Púrpura", 54 | green: "Verde", 55 | olive: "Oliva", 56 | navy: "Azul Marino", 57 | blue: "Azul", 58 | orange: "Naranja" 59 | } 60 | }; 61 | })); 62 | -------------------------------------------------------------------------------- /dist/locales/bootstrap-wysihtml5.es-ES.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Spanish translation for bootstrap-wysihtml5 3 | */ 4 | (function (factory) { 5 | if (typeof define === 'function' && define.amd) { 6 | // AMD. Register as an anonymous module. 7 | define('bootstrap.wysihtml5.es-ES', ['jquery', 'bootstrap.wysihtml5'], factory); 8 | } else { 9 | // Browser globals 10 | factory(jQuery); 11 | } 12 | }(function($){ 13 | $.fn.wysihtml5.locale["es-ES"] = { 14 | font_styles: { 15 | normal: "Texto normal", 16 | h1: "Título 1", 17 | h2: "Título 2", 18 | h3: "Título 3", 19 | h4: "Título 4", 20 | h5: "Título 5", 21 | h6: "Título 6" 22 | }, 23 | emphasis: { 24 | bold: "Negrita", 25 | italic: "Itálica", 26 | underline: "Subrayado", 27 | small: "Subíndice" 28 | }, 29 | lists: { 30 | unordered: "Lista desordenada", 31 | ordered: "Lista ordenada", 32 | outdent: "Eliminar sangría", 33 | indent: "Agregar sangría" 34 | }, 35 | link: { 36 | insert: "Insertar enlace", 37 | cancel: "Cancelar", 38 | target: "Abrir enlace en una ventana nueva" 39 | }, 40 | image: { 41 | insert: "Insertar imagen", 42 | cancel: "Cancelar" 43 | }, 44 | html: { 45 | edit: "Editar HTML" 46 | }, 47 | colours: { 48 | black: "Negro", 49 | silver: "Plata", 50 | gray: "Gris", 51 | maroon: "Marrón", 52 | red: "Rojo", 53 | purple: "Púrpura", 54 | green: "Verde", 55 | olive: "Oliva", 56 | navy: "Azul Marino", 57 | blue: "Azul", 58 | orange: "Naranja" 59 | } 60 | }; 61 | })); 62 | -------------------------------------------------------------------------------- /dist/locales/bootstrap-wysihtml5.fr-FR.js: -------------------------------------------------------------------------------- 1 | /** 2 | * French translation for bootstrap-wysihtml5 3 | */ 4 | (function (factory) { 5 | if (typeof define === 'function' && define.amd) { 6 | // AMD. Register as an anonymous module. 7 | define('bootstrap.wysihtml5.fr-FR', ['jquery', 'bootstrap.wysihtml5'], factory); 8 | } else { 9 | // Browser globals 10 | factory(jQuery); 11 | } 12 | }(function($){ 13 | $.fn.wysihtml5.locale["fr-FR"] = { 14 | font_styles: { 15 | normal: "Texte normal", 16 | h1: "Titre 1", 17 | h2: "Titre 2", 18 | h3: "Titre 3", 19 | h4: "Titre 4", 20 | h5: "Titre 5", 21 | h6: "Titre 6" 22 | }, 23 | emphasis: { 24 | bold: "Gras", 25 | italic: "Italique", 26 | underline: "Souligné", 27 | small: "Petit" 28 | }, 29 | lists: { 30 | unordered: "Liste à puces", 31 | ordered: "Liste numérotée", 32 | outdent: "Diminuer le retrait", 33 | indent: "Augmenter le retrait" 34 | }, 35 | link: { 36 | target: "Ouvrir le lien dans une nouvelle fenêtre", 37 | insert: "Insérer un lien", 38 | cancel: "Annuler" 39 | }, 40 | image: { 41 | insert: "Insérer une image", 42 | cancel: "Annuler" 43 | }, 44 | html: { 45 | edit: "Editer en HTML" 46 | }, 47 | colours: { 48 | black: "Noir", 49 | silver: "Gris clair", 50 | gray: "Gris", 51 | maroon: "Marron", 52 | red: "Rouge", 53 | purple: "Pourpre", 54 | green: "Vert", 55 | olive: "Olive", 56 | navy: "Bleu marine", 57 | blue: "Bleu", 58 | orange: "Orange" 59 | } 60 | }; 61 | })); 62 | -------------------------------------------------------------------------------- /dist/locales/bootstrap-wysihtml5.hr-HR.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Croatian localisation for bootstrap-wysihtml5 3 | */ 4 | (function (factory) { 5 | if (typeof define === 'function' && define.amd) { 6 | // AMD. Register as an anonymous module. 7 | define('bootstrap.wysihtml5.hr-HR', ['jquery', 'bootstrap.wysihtml5'], factory); 8 | } else { 9 | // Browser globals 10 | factory(jQuery); 11 | } 12 | }(function($){ 13 | $.fn.wysihtml5.locale["hr-HR"] = { 14 | font_styles: { 15 | normal: "Normalan tekst", 16 | h1: "Naslov 1", 17 | h2: "Naslov 2", 18 | h3: "Naslov 3" 19 | }, 20 | emphasis: { 21 | bold: "Podebljano", 22 | italic: "Nakrivljeno", 23 | underline: "Podcrtano" 24 | }, 25 | lists: { 26 | unordered: "Nesortirana lista", 27 | ordered: "Sortirana lista", 28 | outdent: "Izdubi", 29 | indent: "Udubi" 30 | }, 31 | link: { 32 | insert: "Umetni poveznicu", 33 | cancel: "Otkaži" 34 | }, 35 | image: { 36 | insert: "Umetni sliku", 37 | cancel: "Otkaži" 38 | }, 39 | html: { 40 | edit: "Izmjeni HTML" 41 | }, 42 | colours: { 43 | black: "Crna", 44 | silver: "Srebrna", 45 | gray: "Siva", 46 | maroon: "Kestenjasta", 47 | red: "Crvena", 48 | purple: "Ljubičasta", 49 | green: "Zelena", 50 | olive: "Maslinasta", 51 | navy: "Mornarska", 52 | blue: "Plava", 53 | orange: "Narandžasta" 54 | } 55 | }; 56 | })); 57 | -------------------------------------------------------------------------------- /dist/locales/bootstrap-wysihtml5.hu-HU.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Hungarian translation for bootstrap-wysihtml5 3 | */ 4 | (function (factory) { 5 | if (typeof define === 'function' && define.amd) { 6 | // AMD. Register as an anonymous module. 7 | define('bootstrap.wysihtml5.hu-HU', ['jquery', 'bootstrap.wysihtml5'], factory); 8 | } else { 9 | // Browser globals 10 | factory(jQuery); 11 | } 12 | }(function($){ 13 | $.fn.wysihtml5.locale["hu-HU"] = { 14 | font_styles: { 15 | normal: "Szövegtörzs", 16 | h1: "Főcím", 17 | h2: "Alcím", 18 | h3: "Harmadrangú alcím", 19 | h4: "Negyedrangú alcím", 20 | h5: "Ötödrangú alcím", 21 | h6: "Hatodrangú alcím" 22 | }, 23 | emphasis: { 24 | bold: "Vastag", 25 | italic: "Dölt", 26 | underline: "Aláhúzott" 27 | }, 28 | lists: { 29 | unordered: "Pontozott lista", 30 | ordered: "Számozott lista", 31 | outdent: "Behúzás növelése", 32 | indent: "Behúzás csökkentése" 33 | }, 34 | link: { 35 | insert: "Hivatkozás beszúrása", 36 | cancel: "Mégsem", 37 | target: "Hivatkozás megnyitása új ablakban" 38 | }, 39 | image: { 40 | insert: "Kép beszúrása", 41 | cancel: "Mégsem" 42 | }, 43 | html: { 44 | edit: "HTML szerkesztése" 45 | }, 46 | colours: { 47 | black: "Fekete", 48 | silver: "Ezüst", 49 | gray: "Szürke", 50 | maroon: "Gesztenyebarna", 51 | red: "Piros", 52 | purple: "Lila", 53 | green: "Zöld", 54 | olive: "Olajzöld", 55 | navy: "Tengerkék", 56 | blue: "Kék", 57 | orange: "Narancs" 58 | } 59 | }; 60 | })); 61 | -------------------------------------------------------------------------------- /dist/locales/bootstrap-wysihtml5.il-HE.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Hebrew translation for bootstrap-wysihtml5 3 | */ 4 | (function (factory) { 5 | if (typeof define === 'function' && define.amd) { 6 | // AMD. Register as an anonymous module. 7 | define('bootstrap.wysihtml5.il-HE', ['jquery', 'bootstrap.wysihtml5'], factory); 8 | } else { 9 | // Browser globals 10 | factory(jQuery); 11 | } 12 | }(function($){ 13 | $.fn.wysihtml5.locale["il-HE"] = { 14 | font_styles: { 15 | normal: "רגיל", 16 | h1: "כותרת 1", 17 | h2: "כותרת 2", 18 | h3: "כותרת 3", 19 | h4: "כותרת 4", 20 | h5: "כותרת 5", 21 | h6: "כותרת 6" 22 | }, 23 | emphasis: { 24 | bold: "מודגש", 25 | italic: "טקסט נטוי", 26 | underline: "קו תחתון", 27 | small: "קטן" 28 | }, 29 | lists: { 30 | unordered: "רשימה עם תבליטים", 31 | ordered: "רשימה ממוספרת", 32 | outdent: "הקטן כניסה", 33 | indent: "הגדל כניסה", 34 | indered: "הגדל כניסה" 35 | }, 36 | link: { 37 | insert: "הכנס קישור", 38 | cancel: "בטל קישור" 39 | }, 40 | image: { 41 | insert: "הוסף תמונה", 42 | cancel: "בטל" 43 | }, 44 | html: { 45 | edit: "עורך HTML" 46 | }, 47 | colours: { 48 | black: "שחור", 49 | silver: "כסף", 50 | gray: "אפור", 51 | maroon: "חום", 52 | red: "אדום", 53 | purple: "סגול", 54 | green: "ירוק", 55 | olive: "ירוק זית", 56 | navy: "כחול צי", 57 | blue: "כחול", 58 | orange: "כתום" 59 | } 60 | }; 61 | })); 62 | -------------------------------------------------------------------------------- /dist/locales/bootstrap-wysihtml5.it-IT.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Italian translation for bootstrap-wysihtml5 3 | */ 4 | (function (factory) { 5 | if (typeof define === 'function' && define.amd) { 6 | // AMD. Register as an anonymous module. 7 | define('bootstrap.wysihtml5.it-IT', ['jquery', 'bootstrap.wysihtml5'], factory); 8 | } else { 9 | // Browser globals 10 | factory(jQuery); 11 | } 12 | }(function($){ 13 | $.fn.wysihtml5.locale["it-IT"] = { 14 | font_styles: { 15 | normal: "Testo normale", 16 | h1: "Titolo 1", 17 | h2: "Titolo 2" 18 | }, 19 | emphasis: { 20 | bold: "Grassetto", 21 | italic: "Corsivo", 22 | underline: "Sottolineato" 23 | }, 24 | lists: { 25 | unordered: "Lista non ordinata", 26 | ordered: "Lista ordinata", 27 | outdent: "Elimina rientro", 28 | indent: "Aggiungi rientro" 29 | }, 30 | link: { 31 | insert: "Inserisci link", 32 | cancel: "Annulla" 33 | }, 34 | image: { 35 | insert: "Inserisci immagine", 36 | cancel: "Annulla" 37 | }, 38 | html: { 39 | edit: "Modifica HTML" 40 | }, 41 | colours: { 42 | black: "Nero", 43 | silver: "Argento", 44 | gray: "Grigio", 45 | maroon: "Marrone", 46 | red: "Rosso", 47 | purple: "Viola", 48 | green: "Verde", 49 | olive: "Oliva", 50 | navy: "Blu Marino", 51 | blue: "Blu", 52 | orange: "Arancio" 53 | } 54 | }; 55 | })); 56 | -------------------------------------------------------------------------------- /dist/locales/bootstrap-wysihtml5.ja-JP.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Japanese translation for bootstrap-wysihtml5 3 | */ 4 | (function (factory) { 5 | if (typeof define === 'function' && define.amd) { 6 | // AMD. Register as an anonymous module. 7 | define('bootstrap.wysihtml5.ja-JP', ['jquery', 'bootstrap.wysihtml5'], factory); 8 | } else { 9 | // Browser globals 10 | factory(jQuery); 11 | } 12 | }(function($){ 13 | $.fn.wysihtml5.locale["ja-JP"] = { 14 | font_styles: { 15 | normal: "通常の文字", 16 | h1: "見出し1", 17 | h2: "見出し2", 18 | h3: "見出し3" 19 | }, 20 | emphasis: { 21 | bold: "太字", 22 | italic: "斜体", 23 | underline: "下線" 24 | }, 25 | lists: { 26 | unordered: "点字リスト", 27 | ordered: "数字リスト", 28 | outdent: "左寄せ", 29 | indent: "右寄せ" 30 | }, 31 | link: { 32 | insert: "リンクの挿入", 33 | cancel: "キャンセル" 34 | }, 35 | image: { 36 | insert: "画像の挿入", 37 | cancel: "キャンセル" 38 | }, 39 | html: { 40 | edit: "HTMLを編集" 41 | }, 42 | colours: { 43 | black: "黒色", 44 | silver: "シルバー", 45 | gray: "グレー", 46 | maroon: "栗色", 47 | red: "赤色", 48 | purple: "紫色", 49 | green: "緑色", 50 | olive: "オリーブ", 51 | navy: "ネイビー", 52 | blue: "青色", 53 | orange: "オレンジ" 54 | } 55 | 56 | }; 57 | })); 58 | -------------------------------------------------------------------------------- /dist/locales/bootstrap-wysihtml5.ko-KR.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Korean translation for bootstrap-wysihtml5 3 | */ 4 | (function (factory) { 5 | if (typeof define === 'function' && define.amd) { 6 | // AMD. Register as an anonymous module. 7 | define('bootstrap.wysihtml5.ko-KR', ['jquery', 'bootstrap.wysihtml5'], factory); 8 | } else { 9 | // Browser globals 10 | factory(jQuery); 11 | } 12 | }(function($){ 13 | $.fn.wysihtml5.locale["ko-KR"] = { 14 | font_styles: { 15 | normal: "일반", 16 | h1: "헤드라인 1", 17 | h2: "헤드라인 2", 18 | h3: "헤드라인 3" 19 | }, 20 | emphasis: { 21 | bold: "굵게", 22 | italic: "기울게", 23 | underline: "밑줄" 24 | }, 25 | lists: { 26 | unordered: "기호목록", 27 | ordered: "숫자목록", 28 | outdent: "내어쓰기", 29 | indent: "들여쓰기" 30 | }, 31 | link: { 32 | insert: "링크 삽입", 33 | cancel: "취소" 34 | }, 35 | image: { 36 | insert: "이미지 삽입", 37 | cancel: "취소" 38 | }, 39 | html: { 40 | edit: "HTML 편집" 41 | }, 42 | colours: { 43 | black: "검은색", 44 | silver: "은색", 45 | gray: "회색", 46 | maroon: "고동색", 47 | red: "빨간색", 48 | purple: "보라색", 49 | green: "초록색", 50 | olive: "올리브", 51 | navy: "네이비", 52 | blue: "파란색", 53 | orange: "주황색" 54 | } 55 | 56 | }; 57 | })); 58 | -------------------------------------------------------------------------------- /dist/locales/bootstrap-wysihtml5.lt-LT.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Lithuanian translation for bootstrap-wysihtml5 3 | */ 4 | (function (factory) { 5 | if (typeof define === 'function' && define.amd) { 6 | // AMD. Register as an anonymous module. 7 | define('bootstrap.wysihtml5.lt-LT', ['jquery', 'bootstrap.wysihtml5'], factory); 8 | } else { 9 | // Browser globals 10 | factory(jQuery); 11 | } 12 | }(function($){ 13 | $.fn.wysihtml5.locale["lt-LT"] = { 14 | font_styles: { 15 | normal: "Normalus", 16 | h1: "Antraštė 1", 17 | h2: "Antraštė 2", 18 | h3: "Antraštė 3" 19 | }, 20 | emphasis: { 21 | bold: "Pastorintas", 22 | italic: "Kursyvas", 23 | underline: "Pabrauktas" 24 | }, 25 | lists: { 26 | unordered: "Suženklintas sąrašas", 27 | ordered: "Numeruotas sąrašas", 28 | outdent: "Padidinti įtrauką", 29 | indent: "Sumažinti įtrauką" 30 | }, 31 | link: { 32 | insert: "Įterpti nuorodą", 33 | cancel: "Atšaukti" 34 | }, 35 | image: { 36 | insert: "Įterpti atvaizdą", 37 | cancel: "Atšaukti" 38 | }, 39 | html: { 40 | edit: "Redaguoti HTML" 41 | }, 42 | colours: { 43 | black: "Juoda", 44 | silver: "Sidabrinė", 45 | gray: "Pilka", 46 | maroon: "Kaštoninė", 47 | red: "Raudona", 48 | purple: "Violetinė", 49 | green: "Žalia", 50 | olive: "Gelsvai žalia", 51 | navy: "Tamsiai mėlyna", 52 | blue: "Mėlyna", 53 | orange: "Oranžinė" 54 | } 55 | }; 56 | })); 57 | -------------------------------------------------------------------------------- /dist/locales/bootstrap-wysihtml5.mo-MD.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Moldavian translation for bootstrap-wysihtml5 3 | */ 4 | (function (factory) { 5 | if (typeof define === 'function' && define.amd) { 6 | // AMD. Register as an anonymous module. 7 | define('bootstrap.wysihtml5.mo-MD', ['jquery', 'bootstrap.wysihtml5'], factory); 8 | } else { 9 | // Browser globals 10 | factory(jQuery); 11 | } 12 | }(function($){ 13 | $.fn.wysihtml5.locale["mo-MD"] = { 14 | font_styles: { 15 | normal: "Normal", 16 | h1: "Titlu 1", 17 | h2: "Titlu 2" 18 | }, 19 | emphasis: { 20 | bold: "Bold", 21 | italic: "Cursiv", 22 | underline: "Accentuat" 23 | }, 24 | lists: { 25 | unordered: "Neordonata", 26 | ordered: "Ordonata", 27 | outdent: "Margine", 28 | indent: "zimțuire" 29 | }, 30 | link: { 31 | insert: "Indroduce link-ul", 32 | cancel: "Anula" 33 | }, 34 | image: { 35 | insert: "Insera imagina", 36 | cancel: "Anula" 37 | }, 38 | html: { 39 | edit: "Editare HTML" 40 | }, 41 | 42 | colours: { 43 | black: "Negru", 44 | silver: "Argint", 45 | gray: "Gri", 46 | maroon: "Castaniu", 47 | red: "Roșu", 48 | purple: "Violet", 49 | green: "Verde", 50 | olive: "Oliv", 51 | navy: "Marin", 52 | blue: "Albastru", 53 | orange: "Portocaliu" 54 | } 55 | }; 56 | })); 57 | -------------------------------------------------------------------------------- /dist/locales/bootstrap-wysihtml5.nb-NB.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Norwegian translation for bootstrap-wysihtml5 3 | */ 4 | (function (factory) { 5 | if (typeof define === 'function' && define.amd) { 6 | // AMD. Register as an anonymous module. 7 | define('bootstrap.wysihtml5.nb-NB', ['jquery', 'bootstrap.wysihtml5'], factory); 8 | } else { 9 | // Browser globals 10 | factory(jQuery); 11 | } 12 | }(function($){ 13 | $.fn.wysihtml5.locale["nb-NB"] = { 14 | font_styles: { 15 | normal: "Normal tekst", 16 | h1: "Tittel 1", 17 | h2: "Tittel 2", 18 | h3: "Tittel 3" 19 | }, 20 | emphasis: { 21 | bold: "Fet", 22 | italic: "Kursiv", 23 | underline: "Understrekning" 24 | }, 25 | lists: { 26 | unordered: "Usortert", 27 | ordered: "Sortert", 28 | outdent: "Detabuler", 29 | indent: "Tabuler", 30 | indered: "Tabuler" 31 | }, 32 | link: { 33 | insert: "Sett inn lenke", 34 | cancel: "Avbryt" 35 | }, 36 | image: { 37 | insert: "Sett inn bilde", 38 | cancel: "Avbryt" 39 | }, 40 | html: { 41 | edit: "Rediger HTML" 42 | }, 43 | colours: { 44 | black: "Svart", 45 | silver: "Sølv", 46 | gray: "Grå", 47 | maroon: "Brun", 48 | red: "Rød", 49 | purple: "Lilla", 50 | green: "Grønn", 51 | olive: "Oliven", 52 | navy: "Marineblå", 53 | blue: "Blå", 54 | orange: "Oransj" 55 | } 56 | }; 57 | })); 58 | -------------------------------------------------------------------------------- /dist/locales/bootstrap-wysihtml5.nl-NL.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Dutch translation for bootstrap-wysihtml5 3 | */ 4 | (function (factory) { 5 | if (typeof define === 'function' && define.amd) { 6 | // AMD. Register as an anonymous module. 7 | define('bootstrap.wysihtml5.nl-NL', ['jquery', 'bootstrap.wysihtml5'], factory); 8 | } else { 9 | // Browser globals 10 | factory(jQuery); 11 | } 12 | }(function($){ 13 | $.fn.wysihtml5.locale["nl-NL"] = { 14 | font_styles: { 15 | normal: "Normale Tekst", 16 | h1: "Kop 1", 17 | h2: "Kop 2", 18 | h3: "Kop 3" 19 | }, 20 | emphasis: { 21 | bold: "Vet", 22 | italic: "Cursief", 23 | underline: "Onderstrepen" 24 | }, 25 | lists: { 26 | unordered: "Ongeordende lijst", 27 | ordered: "Geordende lijst", 28 | outdent: "Inspringen verkleinen", 29 | indent: "Inspringen vergroten" 30 | }, 31 | link: { 32 | insert: "Link invoegen", 33 | cancel: "Annuleren" 34 | }, 35 | image: { 36 | insert: "Afbeelding invoegen", 37 | cancel: "Annuleren" 38 | }, 39 | html: { 40 | edit: "HTML bewerken" 41 | }, 42 | colours: { 43 | black: "Zwart", 44 | silver: "Zilver", 45 | gray: "Grijs", 46 | maroon: "Kastanjebruin", 47 | red: "Rood", 48 | purple: "Paars", 49 | green: "Groen", 50 | olive: "Olijfgroen", 51 | navy: "Donkerblauw", 52 | blue: "Blauw", 53 | orange: "Oranje" 54 | } 55 | }; 56 | })); 57 | -------------------------------------------------------------------------------- /dist/locales/bootstrap-wysihtml5.pl-PL.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Polish translation for bootstrap-wysihtml5 3 | */ 4 | (function (factory) { 5 | if (typeof define === 'function' && define.amd) { 6 | // AMD. Register as an anonymous module. 7 | define('bootstrap.wysihtml5.pl-PL', ['jquery', 'bootstrap.wysihtml5'], factory); 8 | } else { 9 | // Browser globals 10 | factory(jQuery); 11 | } 12 | }(function($){ 13 | $.fn.wysihtml5.locale["pl-PL"] = { 14 | font_styles: { 15 | normal: "Tekst podstawowy", 16 | h1: "Nagłówek 1", 17 | h2: "Nagłówek 2", 18 | h3: "Nagłówek 3", 19 | h4: "Nagłówek 4", 20 | h5: "Nagłówek 5", 21 | h6: "Nagłówek 6" 22 | }, 23 | emphasis: { 24 | bold: "Pogrubienie", 25 | italic: "Kursywa", 26 | underline: "Podkreślenie" 27 | }, 28 | lists: { 29 | unordered: "Lista wypunktowana", 30 | ordered: "Lista numerowana", 31 | outdent: "Zmniejsz wcięcie", 32 | indent: "Zwiększ wcięcie" 33 | }, 34 | link: { 35 | insert: "Wstaw odnośnik", 36 | cancel: "Anuluj", 37 | target: "Otwórz odnośnik w nowym oknie" 38 | }, 39 | image: { 40 | insert: "Wstaw obrazek", 41 | cancel: "Anuluj" 42 | }, 43 | html: { 44 | edit: "Edycja HTML" 45 | }, 46 | colours: { 47 | black: "Czarny", 48 | silver: "Srebrny", 49 | gray: "Szary", 50 | maroon: "Kasztanowy", 51 | red: "Czerwony", 52 | purple: "Fioletowy", 53 | green: "Zielony", 54 | olive: "Oliwkowy", 55 | navy: "Granatowy", 56 | blue: "Niebieski", 57 | orange: "Pomarańczowy" 58 | } 59 | }; 60 | })); 61 | -------------------------------------------------------------------------------- /dist/locales/bootstrap-wysihtml5.pt-BR.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Brazilian portuguese translation for bootstrap-wysihtml5 3 | */ 4 | (function (factory) { 5 | if (typeof define === 'function' && define.amd) { 6 | // AMD. Register as an anonymous module. 7 | define('bootstrap.wysihtml5.pt-BR', ['jquery', 'bootstrap.wysihtml5'], factory); 8 | } else { 9 | // Browser globals 10 | factory(jQuery); 11 | } 12 | }(function($){ 13 | $.fn.wysihtml5.locale["pt-BR"] = { 14 | font_styles: { 15 | normal: "Texto normal", 16 | h1: "Título 1", 17 | h2: "Título 2", 18 | h3: "Título 3", 19 | h4: "Título 4", 20 | h5: "Título 5", 21 | h6: "Título 6" 22 | }, 23 | emphasis: { 24 | bold: "Negrito", 25 | italic: "Itálico", 26 | underline: "Sublinhado", 27 | small: "Pequeno" 28 | }, 29 | lists: { 30 | unordered: "Lista", 31 | ordered: "Lista numerada", 32 | outdent: "Remover indentação", 33 | indent: "Indentar" 34 | }, 35 | link: { 36 | insert: "Inserir link", 37 | cancel: "Cancelar", 38 | target: "Abrir link em um nova janela" 39 | }, 40 | image: { 41 | insert: "Inserir imagem", 42 | cancel: "Cancelar" 43 | }, 44 | html: { 45 | edit: "Editar HTML" 46 | }, 47 | colours: { 48 | black: "Preto", 49 | silver: "Prata", 50 | gray: "Cinza", 51 | maroon: "Marrom", 52 | red: "Vermelho", 53 | purple: "Roxo", 54 | green: "Verde", 55 | olive: "Oliva", 56 | navy: "Marinho", 57 | blue: "Azul", 58 | orange: "Laranja" 59 | } 60 | }; 61 | })); 62 | -------------------------------------------------------------------------------- /dist/locales/bootstrap-wysihtml5.ru-RU.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Russian translation for bootstrap-wysihtml5 3 | */ 4 | (function (factory) { 5 | if (typeof define === 'function' && define.amd) { 6 | // AMD. Register as an anonymous module. 7 | define('bootstrap.wysihtml5.ru-RU', ['jquery', 'bootstrap.wysihtml5'], factory); 8 | } else { 9 | // Browser globals 10 | factory(jQuery); 11 | } 12 | }(function($){ 13 | $.fn.wysihtml5.locale["ru-RU"] = { 14 | font_styles: { 15 | normal: "Обычный текст", 16 | h1: "Заголовок 1", 17 | h2: "Заголовок 2", 18 | h3: "Заголовок 3", 19 | h4: "Заголовок 4", 20 | h5: "Заголовок 5", 21 | h6: "Заголовок 6" 22 | }, 23 | emphasis: { 24 | bold: "Полужирный", 25 | italic: "Курсив", 26 | underline: "Подчёркнутый", 27 | small: "Уменьшенный" 28 | }, 29 | lists: { 30 | unordered: "Маркированный список", 31 | ordered: "Нумерованный список", 32 | outdent: "Уменьшить отступ", 33 | indent: "Увеличить отступ" 34 | }, 35 | link: { 36 | insert: "Вставить ссылку", 37 | cancel: "Отмена" 38 | }, 39 | image: { 40 | insert: "Вставить изображение", 41 | cancel: "Отмена" 42 | }, 43 | html: { 44 | edit: "HTML код" 45 | }, 46 | colours: { 47 | black: "Чёрный", 48 | silver: "Серебряный", 49 | gray: "Серый", 50 | maroon: "Коричневый", 51 | red: "Красный", 52 | purple: "Фиолетовый", 53 | green: "Зелёный", 54 | olive: "Оливковый", 55 | navy: "Тёмно-синий", 56 | blue: "Синий", 57 | orange: "Оранжевый" 58 | } 59 | }; 60 | })); 61 | 62 | -------------------------------------------------------------------------------- /dist/locales/bootstrap-wysihtml5.sk-SK.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Slovak translation for bootstrap-wysihtml5 3 | */ 4 | (function (factory) { 5 | if (typeof define === 'function' && define.amd) { 6 | // AMD. Register as an anonymous module. 7 | define('bootstrap.wysihtml5.sk-SK', ['jquery', 'bootstrap.wysihtml5'], factory); 8 | } else { 9 | // Browser globals 10 | factory(jQuery); 11 | } 12 | }(function($){ 13 | $.fn.wysihtml5.locale["sk-SK"] = { 14 | font_styles: { 15 | normal: "Normálny text", 16 | h1: "Nadpis úrovne 1", 17 | h2: "Nadpis úrovne 2", 18 | h3: "Nadpis úrovne 3" 19 | }, 20 | emphasis: { 21 | bold: "Tučné", 22 | italic: "Kurzíva", 23 | underline: "Podčiarknuté" 24 | }, 25 | lists: { 26 | unordered: "Neusporiadaný zoznam", 27 | ordered: "Číslovaný zoznam", 28 | outdent: "Zväčšiť odsadenie", 29 | indent: "Zmenšiť odsadenie" 30 | }, 31 | link: { 32 | insert: "Vložiť odkaz", 33 | cancel: "Zrušiť" 34 | }, 35 | image: { 36 | insert: "Vložiť obrázok", 37 | cancel: "Zrušiť" 38 | }, 39 | html: { 40 | edit: "Editovať HTML" 41 | }, 42 | colours: { 43 | black: "Čierna", 44 | silver: "Strieborná", 45 | gray: "Šedá", 46 | maroon: "Bordová", 47 | red: "Červená", 48 | purple: "Fialová", 49 | green: "Zelená", 50 | olive: "Olivová", 51 | navy: "Tmavomodrá", 52 | blue: "Modrá", 53 | orange: "Oranžová" 54 | } 55 | }; 56 | })); 57 | -------------------------------------------------------------------------------- /dist/locales/bootstrap-wysihtml5.sv-SE.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Swedish translation for bootstrap-wysihtml5 3 | */ 4 | (function (factory) { 5 | if (typeof define === 'function' && define.amd) { 6 | // AMD. Register as an anonymous module. 7 | define('bootstrap.wysihtml5.sv-SE', ['jquery', 'bootstrap.wysihtml5'], factory); 8 | } else { 9 | // Browser globals 10 | factory(jQuery); 11 | } 12 | }(function($){ 13 | $.fn.wysihtml5.locale["sv-SE"] = { 14 | font_styles: { 15 | normal: "Normal Text", 16 | h1: "Rubrik 1", 17 | h2: "Rubrik 2", 18 | h3: "Rubrik 3" 19 | }, 20 | emphasis: { 21 | bold: "Fet", 22 | italic: "Kursiv", 23 | underline: "Understruken" 24 | }, 25 | lists: { 26 | unordered: "Osorterad lista", 27 | ordered: "Sorterad lista", 28 | outdent: "Minska indrag", 29 | indent: "Öka indrag" 30 | }, 31 | link: { 32 | insert: "Lägg till länk", 33 | cancel: "Avbryt" 34 | }, 35 | image: { 36 | insert: "Lägg till Bild", 37 | cancel: "Avbryt" 38 | }, 39 | html: { 40 | edit: "Redigera HTML" 41 | }, 42 | colours: { 43 | black: "Svart", 44 | silver: "Silver", 45 | gray: "Grå", 46 | maroon: "Kastaniebrun", 47 | red: "Röd", 48 | purple: "Lila", 49 | green: "Grön", 50 | olive: "Olivgrön", 51 | navy: "Marinblå", 52 | blue: "Blå", 53 | orange: "Orange" 54 | } 55 | }; 56 | })); 57 | -------------------------------------------------------------------------------- /dist/locales/bootstrap-wysihtml5.tr-TR.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Turkish translation for bootstrap-wysihtml5 3 | */ 4 | (function (factory) { 5 | if (typeof define === 'function' && define.amd) { 6 | // AMD. Register as an anonymous module. 7 | define('bootstrap.wysihtml5.tr-TR', ['jquery', 'bootstrap.wysihtml5'], factory); 8 | } else { 9 | // Browser globals 10 | factory(jQuery); 11 | } 12 | }(function($){ 13 | $.fn.wysihtml5.locale["tr-TR"] = { 14 | font_styles: { 15 | normal: "Normal Yazı", 16 | h1: "Başlık 1", 17 | h2: "Başlık 2", 18 | h3: "Başlık 3", 19 | h4: 'Başlık 4', 20 | h5: 'Başlık 5', 21 | h6: 'Başlık 6' 22 | }, 23 | emphasis: { 24 | bold: "Kalın", 25 | italic: "İtalik", 26 | underline: "Altı Çizili", 27 | small: 'Küçük' 28 | }, 29 | lists: { 30 | unordered: "Sırasız Liste", 31 | ordered: "Sıralı Liste", 32 | outdent: "Girintiyi Azalt", 33 | indent: "Girintiyi Arttır" 34 | }, 35 | link: { 36 | insert: "Bağlantı Ekle", 37 | cancel: "Vazgeç", 38 | target: 'Bağlantıyı yeni sekmede aç' 39 | }, 40 | image: { 41 | insert: "Resim Ekle", 42 | cancel: "Vazgeç" 43 | }, 44 | html: { 45 | edit: "HTML Düzenle" 46 | }, 47 | colours: { 48 | black: "Siyah", 49 | silver: "Gümüş", 50 | gray: "Gri", 51 | maroon: "Vişne Çürüğü", 52 | red: "Kırmızı", 53 | purple: "Pembe", 54 | green: "Yeşil", 55 | olive: "Zeytin Yeşili", 56 | navy: "Lacivert", 57 | blue: "Mavi", 58 | orange: "Turuncu" 59 | } 60 | }; 61 | })); 62 | -------------------------------------------------------------------------------- /dist/locales/bootstrap-wysihtml5.ua-UA.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Ukrainian translation for bootstrap-wysihtml5 3 | */ 4 | (function (factory) { 5 | if (typeof define === 'function' && define.amd) { 6 | // AMD. Register as an anonymous module. 7 | define('bootstrap.wysihtml5.ua-UA', ['jquery', 'bootstrap.wysihtml5'], factory); 8 | } else { 9 | // Browser globals 10 | factory(jQuery); 11 | } 12 | }(function($){ 13 | $.fn.wysihtml5.locale["ua-UA"] = { 14 | font_styles: { 15 | normal: "Звичайний текст", 16 | h1: "Заголовок 1", 17 | h2: "Заголовок 2", 18 | h3: "Заголовок 3" 19 | }, 20 | emphasis: { 21 | bold: "Напівжирний", 22 | italic: "Курсив", 23 | underline: "Підкреслений" 24 | }, 25 | lists: { 26 | unordered: "Маркований список", 27 | ordered: "Нумерований список", 28 | outdent: "Зменшити відступ", 29 | indent: "Збільшити відступ" 30 | }, 31 | link: { 32 | insert: "Вставити посилання", 33 | cancel: "Відміна" 34 | }, 35 | image: { 36 | insert: "Вставити зображення", 37 | cancel: "Відміна" 38 | }, 39 | html: { 40 | edit: "HTML код" 41 | }, 42 | colours: { 43 | black: "Чорний", 44 | silver: "Срібний", 45 | gray: "Сірий", 46 | maroon: "Коричневий", 47 | red: "Червоний", 48 | purple: "Фіолетовий", 49 | green: "Зелений", 50 | olive: "Оливковий", 51 | navy: "Темно-синій", 52 | blue: "Синій", 53 | orange: "Помаранчевий" 54 | } 55 | }; 56 | })); 57 | 58 | -------------------------------------------------------------------------------- /dist/locales/bootstrap-wysihtml5.zh-CN.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Chinese translation for bootstrap-wysihtml5 3 | */ 4 | (function (factory) { 5 | if (typeof define === 'function' && define.amd) { 6 | // AMD. Register as an anonymous module. 7 | define('bootstrap.wysihtml5.zh-CN', ['jquery', 'bootstrap.wysihtml5'], factory); 8 | } else { 9 | // Browser globals 10 | factory(jQuery); 11 | } 12 | }(function($){ 13 | $.fn.wysihtml5.locale["zh-CN"] = { 14 | font_styles: { 15 | normal: "正文", 16 | h1: "标题 1", 17 | h2: "标题 2", 18 | h3: "标题 3", 19 | h4: "标题 4", 20 | h5: "标题 5", 21 | h6: "标题 6" 22 | }, 23 | emphasis: { 24 | bold: "粗体", 25 | italic: "斜体", 26 | underline: "下划线" 27 | }, 28 | lists: { 29 | unordered: "项目符号", 30 | ordered: "编号", 31 | outdent: "减少缩进", 32 | indent: "增加缩进" 33 | }, 34 | link: { 35 | insert: "插入链接", 36 | cancel: "取消", 37 | target: "新窗口打开链接" 38 | }, 39 | image: { 40 | insert: "插入图片", 41 | cancel: "取消" 42 | }, 43 | html: { 44 | edit: "HTML代码" 45 | }, 46 | colours: { 47 | black: "黑色", 48 | silver: "银色", 49 | gray: "灰色", 50 | maroon: "赤红色", 51 | red: "红色", 52 | purple: "紫色", 53 | green: "绿色", 54 | olive: "橄榄色", 55 | navy: "深蓝色", 56 | blue: "蓝色", 57 | orange: "橙色" 58 | } 59 | }; 60 | })); 61 | -------------------------------------------------------------------------------- /dist/locales/bootstrap-wysihtml5.zh-TW.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Chinese Traditional translation for bootstrap-wysihtml5 3 | */ 4 | (function (factory) { 5 | if (typeof define === 'function' && define.amd) { 6 | // AMD. Register as an anonymous module. 7 | define('bootstrap.wysihtml5.zh-TW', ['jquery', 'bootstrap.wysihtml5'], factory); 8 | } else { 9 | // Browser globals 10 | factory(jQuery); 11 | } 12 | }(function($){ 13 | $.fn.wysihtml5.locale["zh-TW"] = { 14 | font_styles: { 15 | normal: "內文", 16 | h1: "標題 1", 17 | h2: "標題 2", 18 | h3: "標題 3", 19 | h3: "標題 4", 20 | h3: "標題 5", 21 | h3: "標題 6" 22 | }, 23 | emphasis: { 24 | bold: "粗體", 25 | italic: "斜體", 26 | underline: "底線" 27 | }, 28 | lists: { 29 | unordered: "項目符號", 30 | ordered: "編號列表", 31 | outdent: "減少縮排", 32 | indent: "增加縮排" 33 | }, 34 | link: { 35 | insert: "插入超連結", 36 | cancel: "取消", 37 | target: "新窗口打開鏈接" 38 | }, 39 | image: { 40 | insert: "插入圖片連結", 41 | cancel: "取消" 42 | }, 43 | html: { 44 | edit: "HTML原始碼" 45 | }, 46 | colours: { 47 | black: "黑色", 48 | silver: "銀色", 49 | gray: "灰色", 50 | maroon: "栗色", 51 | red: "红色", 52 | purple: "紫色", 53 | green: "綠色", 54 | olive: "橄欖色", 55 | navy: "深藍色", 56 | blue: "藍色", 57 | orange: "橙色" 58 | } 59 | }; 60 | })); 61 | -------------------------------------------------------------------------------- /dist/parser_rules/simple.json: -------------------------------------------------------------------------------- 1 | { 2 | "tags": { 3 | "a": { 4 | "check_attributes": { 5 | "href": "url" 6 | }, 7 | "set_attributes": { 8 | "rel": "nofollow", 9 | "target": "_blank" 10 | } 11 | }, 12 | "b": {}, 13 | "br": {}, 14 | "div": {}, 15 | "em": {}, 16 | "i": {}, 17 | "li": {}, 18 | "ol": {}, 19 | "p": {}, 20 | "span": {}, 21 | "strong": {}, 22 | "ul": {} 23 | } 24 | } -------------------------------------------------------------------------------- /examples/index-require-dev.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | bootstrap-wysihtml5 8 | 9 | 10 | 11 | 12 | 13 | 14 | 25 | 26 | 27 | 28 |
29 |
30 |

bootstrap-wysihtml5
Simple, beautiful wysiwyg editors

31 |
32 | 33 |
34 | 35 |
36 |
37 |

About

38 |

39 | bootstrap-wysihtml5 is a javascript plugin that makes it easy to create simple, beautiful wysiwyg editors with the help of wysihtml5 and Twitter Bootstrap 3 40 |

41 | 42 |

43 | View project on Github 44 |

45 |
46 |
47 |

Usage

48 | 49 |

50 |

$('.textarea').wysihtml5();
51 |

52 | 53 |
54 |
55 |
56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /examples/index-require.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | bootstrap-wysihtml5 8 | 9 | 10 | 11 | 12 | 13 | 14 | 39 | 40 | 41 | 42 |
43 |
44 |

bootstrap-wysihtml5
Simple, beautiful wysiwyg editors

45 |
46 |
47 |
48 | 49 |
50 |
51 |

About

52 |

53 | bootstrap-wysihtml5 is a javascript plugin that makes it easy to create simple, beautiful wysiwyg editors with the help of wysihtml5 and Twitter Bootstrap 3 54 |

55 | 56 |

57 | View project on Github 58 |

59 |
60 |
61 |

Usage

62 | 63 |

64 |

$('.textarea').wysihtml5();
65 |

66 | 67 |
68 | 69 |
70 |

Dynamic text

71 |

72 | Set text dynamically with javascript: 73 |

74 |

75 | 76 |

77 |
78 |
79 |
80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /examples/main-dev.js: -------------------------------------------------------------------------------- 1 | require.config({ 2 | paths: { 3 | 'domReady': '../components/requirejs-domready/domReady', 4 | 'jquery': '../components/jquery/dist/jquery.min', 5 | 'handlebars.runtime': '../components/handlebars/handlebars.runtime.amd', 6 | 'bootstrap': '../components/bootstrap/dist/js/bootstrap.min', 7 | 'bootstrap.wysihtml5': '../src/bootstrap3-wysihtml5', 8 | 'rangy': '../components/wysihtml5x/lib/rangy/rangy-core', 9 | 'rangy-selectionsaverestore': '../components/wysihtml5x/lib/rangy/rangy-selectionsaverestore', 10 | 'wysihtml5': '../dist/amd/wysihtml5', 11 | 'bootstrap.wysihtml5.commands': '../dist/amd/commands', 12 | 'bootstrap.wysihtml5.templates': '../dist/amd/templates', 13 | 'bootstrap.wysihtml5.en-US': '../dist/locales/bootstrap-wysihtml5.en-US' 14 | }, 15 | shim: { 16 | 'bootstrap': { 17 | deps: ['jquery'] 18 | }, 19 | 'rangy-selectionsaverestore': { 20 | deps: ['rangy'] 21 | } 22 | }, 23 | deps: [ 24 | './start-dev' 25 | ] 26 | }); 27 | -------------------------------------------------------------------------------- /examples/main.js: -------------------------------------------------------------------------------- 1 | require.config({ 2 | paths: { 3 | 'domReady': '../components/requirejs-domready/domReady', 4 | 'jquery': '../components/jquery/dist/jquery.min', 5 | 'rangy': '../components/wysihtml5x/lib/rangy/rangy-core', 6 | 'rangy-selectionsaverestore': '../components/wysihtml5x/lib/rangy/rangy-selectionsaverestore', 7 | 'bootstrap': '../components/bootstrap/dist/js/bootstrap.min', 8 | 'bootstrap.wysihtml5': '../dist/amd/bootstrap3-wysihtml5.all', 9 | 'bootstrap.wysihtml5.de-DE': '../dist/locales/bootstrap-wysihtml5.de-DE' 10 | }, 11 | shim: { 12 | 'bootstrap': { 13 | deps: ['jquery'] 14 | }, 15 | 'rangy-selectionsaverestore': { 16 | deps: ['rangy'] 17 | } 18 | }, 19 | deps: [ 20 | './start' 21 | ] 22 | }); 23 | -------------------------------------------------------------------------------- /examples/start-dev.js: -------------------------------------------------------------------------------- 1 | define([ 2 | 'require', 3 | 'domReady', 4 | 'jquery', 5 | 'bootstrap.wysihtml5.en-US' 6 | ], function(require, domReady, $) { 7 | 'use strict'; 8 | 9 | domReady(function() { 10 | var myCustomTemplates = { 11 | linkalt : function(context) { 12 | return "
  • " + 13 | "" + 23 | "" + 24 | "LINK" + 25 | "
  • "; 26 | }, 27 | custom1: function(context) { 28 | return "
  • " + 29 | "hellip" + 30 | "
  • "; 31 | } 32 | }; 33 | 34 | $('.textarea').wysihtml5({ 35 | toolbar: { 36 | custom1: true, 37 | size: 'sm' 38 | }, 39 | customTemplates: myCustomTemplates 40 | }); 41 | }); 42 | }); 43 | -------------------------------------------------------------------------------- /examples/start.js: -------------------------------------------------------------------------------- 1 | define([ 2 | 'require', 3 | 'domReady', 4 | 'jquery', 5 | 'bootstrap.wysihtml5.de-DE' 6 | ], function(require, domReady, $) { 7 | 'use strict'; 8 | 9 | domReady(function() { 10 | $('.textarea').wysihtml5({ 11 | locale: 'de-DE' 12 | }); 13 | $('#btn-settext').on('click', function(e) { 14 | $('.textarea').html('Some text dynamically set.'); 15 | e.preventDefault(); 16 | }); 17 | }); 18 | }); 19 | -------------------------------------------------------------------------------- /generator/generate.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /generator/generate_advanced.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /generator/generate_advanced_unwrap.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /generator/generate_simple.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /generator/print_parser_rules.js: -------------------------------------------------------------------------------- 1 | /* global phantom */ 2 | (function () { 3 | 'use strict'; 4 | 5 | var webPage = require('webpage'), 6 | fs = require('fs'), 7 | page = webPage.create(), 8 | pageAdvanced = webPage.create(), 9 | pageAdvancedUnwrap = webPage.create(), 10 | pageSimple = webPage.create(); 11 | 12 | page.open('file:///' + fs.absolute('generator/generate.html'), function(){ 13 | var parserRules = page.evaluate(function() { 14 | return window.wysihtml5ParserRules; 15 | }); 16 | var parserRulesJSON = JSON.stringify(parserRules, null, ' '); 17 | fs.write('src/parser_rules/advanced_and_extended.json', parserRulesJSON, 'w'); 18 | console.log('Wrote ', 'src/parser_rules/advanced_and_extended.json'); 19 | 20 | var pasteRules = page.evaluate(function() { 21 | return window.wysihtml5ParserPasteRulesets; 22 | }); 23 | var pasteRulesJSON = JSON.stringify(pasteRules, null, ' '); 24 | fs.write('src/parser_rules/advanced_and_extended_paste.json', pasteRulesJSON, 'w'); 25 | console.log('Wrote ', 'src/parser_rules/advanced_and_extended_paste.json'); 26 | }); 27 | 28 | pageAdvanced.open('file:///' + fs.absolute('generator/generate_advanced.html'), function(){ 29 | var parserRules = pageAdvanced.evaluate(function() { 30 | console.log(window.wysihtml5ParserRules); 31 | return window.wysihtml5ParserRules; 32 | }); 33 | var parserRulesJSON = JSON.stringify(parserRules, null, ' '); 34 | fs.write('src/parser_rules/advanced.json', parserRulesJSON, 'w'); 35 | console.log('Wrote ', 'src/parser_rules/advanced.json'); 36 | }); 37 | 38 | pageAdvancedUnwrap.open('file:///' + fs.absolute('generator/generate_advanced_unwrap.html'), function(){ 39 | var parserRules = pageAdvancedUnwrap.evaluate(function() { 40 | console.log(window.wysihtml5ParserRules); 41 | return window.wysihtml5ParserRules; 42 | }); 43 | var parserRulesJSON = JSON.stringify(parserRules, null, ' '); 44 | fs.write('src/parser_rules/advanced_unwrap.json', parserRulesJSON, 'w'); 45 | console.log('Wrote ', 'src/parser_rules/advanced_unwrap.json'); 46 | }); 47 | 48 | pageSimple.open('file:///' + fs.absolute('generator/generate_simple.html'), function(){ 49 | var parserRules = pageSimple.evaluate(function() { 50 | console.log(window.wysihtml5ParserRules); 51 | return window.wysihtml5ParserRules; 52 | }); 53 | var parserRulesJSON = JSON.stringify(parserRules, null, ' '); 54 | fs.write('src/parser_rules/simple.json', parserRulesJSON, 'w'); 55 | console.log('Wrote ', 'src/parser_rules/simple.json'); 56 | phantom.exit(); 57 | }); 58 | 59 | })(); 60 | -------------------------------------------------------------------------------- /index-all.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | bootstrap-wysihtml5 8 | 9 | 10 | 11 | 12 | 13 | 14 | 25 | 26 | 27 | 28 |
    29 |
    30 |

    bootstrap-wysihtml5
    Simple, beautiful wysiwyg editors

    31 |
    32 | 33 |
    34 | 35 |
    36 |
    37 |

    About

    38 |

    39 | bootstrap-wysihtml5 is a javascript plugin that makes it easy to create simple, beautiful wysiwyg editors with the help of wysihtml5 and Twitter Bootstrap 3 40 |

    41 | 42 |

    43 | View project on Github 44 |

    45 |
    46 |
    47 |

    Usage

    48 | 49 |

    50 |

    $('.textarea').wysihtml5();
    51 |

    52 | 53 |
    54 |
    55 |
    56 | 57 | 58 | 59 | 60 | 61 | 62 | 65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /index-dev.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | bootstrap-wysihtml5 8 | 9 | 10 | 11 | 12 | 13 | 14 | 34 | 35 | 36 | 37 |
    38 |
    39 |

    bootstrap-wysihtml5
    Simple, beautiful wysiwyg editors

    40 |
    41 | 44 | 45 |
    46 | 47 |
    48 |
    49 |

    About

    50 |

    51 | bootstrap-wysihtml5 is a javascript plugin that makes it easy to create simple, beautiful wysiwyg editors with the help of wysihtml5 and Twitter Bootstrap 3 52 |

    53 | 54 |

    55 | View project on Github 56 |

    57 |
    58 |
    59 |

    Usage

    60 | 61 |

    62 |

    $('.textarea').wysihtml5();
    63 |

    64 | 65 |
    66 |
    67 |
    68 | 69 | 70 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 123 | 124 | 125 | 126 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | bootstrap-wysihtml5 8 | 9 | 10 | 11 | 12 | 13 | 14 | 25 | 26 | 27 | 28 |
    29 |
    30 |

    bootstrap-wysihtml5
    Simple, beautiful wysiwyg editors

    31 |
    32 | 33 |
    34 | 35 |
    36 |
    37 |

    About

    38 |

    39 | bootstrap-wysihtml5 is a javascript plugin that makes it easy to create simple, beautiful wysiwyg editors with the help of wysihtml5 and Twitter Bootstrap 3 40 |

    41 | 42 |

    43 | View project on Github 44 |

    45 |
    46 |
    47 |

    Usage

    48 | 49 |

    50 |

    $('.textarea').wysihtml5();
    51 |

    52 | 53 |
    54 |
    55 |
    56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /karma.conf.js: -------------------------------------------------------------------------------- 1 | // Karma configuration 2 | // Generated on Thu Jun 26 2014 23:11:33 GMT+0200 (CEST) 3 | 4 | module.exports = function(config) { 5 | config.set({ 6 | 7 | // base path that will be used to resolve all patterns (eg. files, exclude) 8 | basePath: '', 9 | 10 | 11 | // frameworks to use 12 | // available frameworks: https://npmjs.org/browse/keyword/karma-adapter 13 | frameworks: ['qunit'], 14 | plugins: ['karma-qunit', 15 | 'karma-coverage', 16 | 'karma-chrome-launcher', 17 | 'karma-phantomjs-launcher'], 18 | 19 | // list of files / patterns to load in the browser 20 | files: [ 21 | // Bower deps 22 | {pattern: 'components/wysihtml5x/dist/wysihtml5x-toolbar.js', watched: false, included: true, served: true}, 23 | {pattern: 'components/jquery/dist/jquery.js', watched: false, included: true, served: true}, 24 | {pattern: 'components/bootstrap/dist/js/bootstrap.min.js', watched: false, included: true, served: true}, 25 | {pattern: 'components/handlebars/handlebars.runtime.min.js', watched: false, included: true, served: true}, 26 | 27 | // Node deps 28 | {pattern: 'node_modules/qunitjs/qunit/qunit.js', watched: false, included: true, served: true}, 29 | {pattern: 'node_modules/happen/happen.js', watched: false, included: true, served: true}, 30 | {pattern: 'node_modules/qunit-assert-html/dist/qunit-assert-html.js', watched: false, included: true, served: true}, 31 | 32 | // Source 33 | {pattern: 'src/generated/templates.js', watched: true, included: true, served: true}, 34 | {pattern: 'src/bootstrap3-wysihtml5.js', watched: true, included: true, served: true}, 35 | {pattern: 'src/locales/bootstrap-wysihtml5.en-US.js', watched: true, included: true, served: true}, 36 | {pattern: 'src/generated/commands.js', watched: true, included: true, served: true}, 37 | 38 | //CSS 39 | {pattern: 'components/bootstrap/dist/css/*.min.css', watched: false, included: true, served: true}, 40 | {pattern: 'components/bootstrap/dist/fonts/*', watched: false, included: false, served: true}, 41 | {pattern: 'src/*.css', watched: false, included: true, served: true}, 42 | 43 | // Test helpers 44 | {pattern: 'test/testhelper.js', watched: true, included: true, served: true}, 45 | {pattern: 'test/karma/test-main.js', watched: true, included: true, served: true}, 46 | 47 | // Tests 48 | {pattern: 'test/**/*test.js', watched: true, included: true, served: true} 49 | ], 50 | 51 | 52 | // list of files to exclude or ignored tests 53 | exclude: [ 54 | //small doesn't work at the moment. see https://github.com/Edicy/wysihtml5/issues/59 55 | //'test/bs/bootstrap_editor_commands_test.js' 56 | ], 57 | 58 | 59 | // preprocess matching files before serving them to the browser 60 | // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor 61 | preprocessors: { 62 | 'src/**/*.js': 'coverage' 63 | }, 64 | 65 | 66 | // test results reporter to use 67 | // possible values: 'dots', 'progress' 68 | // available reporters: https://npmjs.org/browse/keyword/karma-reporter 69 | reporters: ['progress', 'coverage'], 70 | 71 | 72 | // web server port 73 | port: 9876, 74 | 75 | 76 | // enable / disable colors in the output (reporters and logs) 77 | colors: true, 78 | 79 | 80 | // level of logging 81 | // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG 82 | logLevel: config.LOG_INFO, 83 | 84 | 85 | // enable / disable watching file and executing tests whenever any file changes 86 | autoWatch: true, 87 | 88 | 89 | // start these browsers 90 | // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher 91 | //browsers: ['Chrome', 'PhantomJS'], 92 | browsers: ['Chrome'], 93 | 94 | // Continuous Integration mode 95 | // if true, Karma captures browsers, runs the tests and exits 96 | singleRun: false 97 | }); 98 | }; 99 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bootstrap3-wysihtml5-bower", 3 | "version": "0.3.4-wip", 4 | "description": "Bootstrap 3 compatible wysiwyg editor", 5 | "directories": { 6 | "test": "test" 7 | }, 8 | "dependencies": {}, 9 | "devDependencies": { 10 | "grunt-contrib-clean": "^0.6.0", 11 | "grunt-contrib-concat": "~0.5.0", 12 | "grunt-contrib-copy": "~0.5.0", 13 | "grunt-contrib-cssmin": "~0.10.0", 14 | "grunt-contrib-handlebars": "~0.8.0", 15 | "grunt-contrib-uglify": "~0.5.1", 16 | "grunt-http-server": "^1.0.0", 17 | "grunt-wrap": "^0.3.0", 18 | "happen": "^0.1.3", 19 | "karma": "^0.12.23", 20 | "karma-chrome-launcher": "^0.1.4", 21 | "karma-coverage": "^0.2.6", 22 | "karma-phantomjs-launcher": "^0.1.4", 23 | "karma-qunit": "^0.1.3", 24 | "karma-requirejs": "^0.2.2", 25 | "phantomjs": "^1.9.9", 26 | "qunit-assert-html": "^0.2.1", 27 | "qunitjs": "~1.14.0", 28 | "requirejs": "^2.1.14" 29 | }, 30 | "scripts": { 31 | "test": "./node_modules/karma/bin/karma start --single-run" 32 | }, 33 | "repository": { 34 | "type": "git", 35 | "url": "git://github.com/Waxolunist/bootstrap3-wysihtml5-bower.git" 36 | }, 37 | "keywords": [ 38 | "bootstrap", 39 | "wysiwyg" 40 | ], 41 | "author": "Christian Sterzl ", 42 | "license": "MIT", 43 | "bugs": { 44 | "url": "https://github.com/Waxolunist/bootstrap3-wysihtml5-bower/issues" 45 | }, 46 | "homepage": "https://github.com/Waxolunist/bootstrap3-wysihtml5-bower" 47 | } 48 | -------------------------------------------------------------------------------- /src/bootstrap3-wysihtml5.css: -------------------------------------------------------------------------------- 1 | ul.wysihtml5-toolbar { 2 | margin: 0; 3 | padding: 0; 4 | display: block; 5 | } 6 | 7 | ul.wysihtml5-toolbar::after { 8 | clear: both; 9 | display: table; 10 | content: ""; 11 | } 12 | 13 | ul.wysihtml5-toolbar > li { 14 | float: left; 15 | display: list-item; 16 | list-style: none; 17 | margin: 0 5px 10px 0; 18 | } 19 | 20 | ul.wysihtml5-toolbar a[data-wysihtml5-command=bold] { 21 | font-weight: bold; 22 | } 23 | 24 | ul.wysihtml5-toolbar a[data-wysihtml5-command=italic] { 25 | font-style: italic; 26 | } 27 | 28 | ul.wysihtml5-toolbar a[data-wysihtml5-command=underline] { 29 | text-decoration: underline; 30 | } 31 | 32 | ul.wysihtml5-toolbar a.btn.wysihtml5-command-active { 33 | background-image: none; 34 | -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05); 35 | -moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05); 36 | box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05); 37 | background-color: #E6E6E6; 38 | background-color: #D9D9D9; 39 | outline: 0; 40 | } 41 | 42 | ul.wysihtml5-commands-disabled .dropdown-menu { 43 | display: none !important; 44 | } 45 | 46 | ul.wysihtml5-toolbar div.wysihtml5-colors { 47 | display:block; 48 | width: 50px; 49 | height: 20px; 50 | margin-top: 2px; 51 | margin-left: 5px; 52 | position: absolute; 53 | pointer-events: none; 54 | } 55 | 56 | ul.wysihtml5-toolbar a.wysihtml5-colors-title { 57 | padding-left: 70px; 58 | } 59 | 60 | ul.wysihtml5-toolbar div[data-wysihtml5-command-value="black"] { 61 | background: black !important; 62 | } 63 | 64 | ul.wysihtml5-toolbar div[data-wysihtml5-command-value="silver"] { 65 | background: silver !important; 66 | } 67 | 68 | ul.wysihtml5-toolbar div[data-wysihtml5-command-value="gray"] { 69 | background: gray !important; 70 | } 71 | 72 | ul.wysihtml5-toolbar div[data-wysihtml5-command-value="maroon"] { 73 | background: maroon !important; 74 | } 75 | 76 | ul.wysihtml5-toolbar div[data-wysihtml5-command-value="red"] { 77 | background: red !important; 78 | } 79 | 80 | ul.wysihtml5-toolbar div[data-wysihtml5-command-value="purple"] { 81 | background: purple !important; 82 | } 83 | 84 | ul.wysihtml5-toolbar div[data-wysihtml5-command-value="green"] { 85 | background: green !important; 86 | } 87 | 88 | ul.wysihtml5-toolbar div[data-wysihtml5-command-value="olive"] { 89 | background: olive !important; 90 | } 91 | 92 | ul.wysihtml5-toolbar div[data-wysihtml5-command-value="navy"] { 93 | background: navy !important; 94 | } 95 | 96 | ul.wysihtml5-toolbar div[data-wysihtml5-command-value="blue"] { 97 | background: blue !important; 98 | } 99 | 100 | ul.wysihtml5-toolbar div[data-wysihtml5-command-value="orange"] { 101 | background: orange !important; 102 | } 103 | 104 | .glyphicon-quote:before { 105 | content: "\201C"; 106 | font-family: Georgia, serif; 107 | font-size: 50px; 108 | position: absolute; 109 | top: -4px; 110 | left: -3px; 111 | max-height: 100%; 112 | } 113 | 114 | .glyphicon-quote:after { 115 | content: "\0000a0"; 116 | } 117 | 118 | -------------------------------------------------------------------------------- /src/commands/small.js: -------------------------------------------------------------------------------- 1 | (function(wysihtml5) { 2 | wysihtml5.commands.small = { 3 | exec: function(composer, command) { 4 | return wysihtml5.commands.formatInline.exec(composer, command, "small"); 5 | }, 6 | 7 | state: function(composer, command) { 8 | return wysihtml5.commands.formatInline.state(composer, command, "small"); 9 | } 10 | }; 11 | })(wysihtml5); 12 | 13 | -------------------------------------------------------------------------------- /src/generated/commands.js: -------------------------------------------------------------------------------- 1 | (function(wysihtml5) { 2 | wysihtml5.commands.small = { 3 | exec: function(composer, command) { 4 | return wysihtml5.commands.formatInline.exec(composer, command, "small"); 5 | }, 6 | 7 | state: function(composer, command) { 8 | return wysihtml5.commands.formatInline.state(composer, command, "small"); 9 | } 10 | }; 11 | })(wysihtml5); 12 | 13 | -------------------------------------------------------------------------------- /src/locales/bootstrap-wysihtml5.ar-AR.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Arabic translation for bootstrap-wysihtml5 3 | */ 4 | (function (factory) { 5 | if (typeof define === 'function' && define.amd) { 6 | // AMD. Register as an anonymous module. 7 | define('bootstrap.wysihtml5.ar-AR', ['jquery', 'bootstrap.wysihtml5'], factory); 8 | } else { 9 | // Browser globals 10 | factory(jQuery); 11 | } 12 | }(function($){ 13 | $.fn.wysihtml5.locale["ar-AR"] = { 14 | font_styles: { 15 | normal: "نص عادي", 16 | h1: "عنوان رئيسي 1", 17 | h2: "عنوان رئيسي 2", 18 | h3: "عنوان رئيسي 3", 19 | h4: "عنوان رئيسي 4", 20 | h5: "عنوان رئيسي 5", 21 | h6: "عنوان رئيسي 6" 22 | }, 23 | emphasis: { 24 | bold: "عريض", 25 | italic: "مائل", 26 | underline: "تحته خط" 27 | }, 28 | lists: { 29 | unordered: "قائمة منقطة", 30 | ordered: "قائمة مرقمة", 31 | outdent: "محاذاه للخارج", 32 | indent: "محاذاه للداخل" 33 | }, 34 | link: { 35 | insert: "إضافة رابط", 36 | cancel: "إلغاء", 37 | target: "فتح في نافذة جديدة" 38 | }, 39 | image: { 40 | insert: "إضافة صورة", 41 | cancel: "إلغاء" 42 | }, 43 | html: { 44 | edit: "تعديل HTML" 45 | }, 46 | 47 | colours: { 48 | black: "أسود", 49 | silver: "فضي", 50 | gray: "رمادي", 51 | maroon: "بني", 52 | red: "أحمر", 53 | purple: "بنفسجي", 54 | green: "أخضر", 55 | olive: "زيتوني", 56 | navy: "أزرق قاتم", 57 | blue: "أزرق نيلي", 58 | orange: "برتقالي" 59 | } 60 | }; 61 | })); 62 | -------------------------------------------------------------------------------- /src/locales/bootstrap-wysihtml5.bg-BG.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Bulgarian translation for bootstrap-wysihtml5 3 | */ 4 | (function (factory) { 5 | if (typeof define === 'function' && define.amd) { 6 | // AMD. Register as an anonymous module. 7 | define('bootstrap.wysihtml5.bg-BG', ['jquery', 'bootstrap.wysihtml5'], factory); 8 | } else { 9 | // Browser globals 10 | factory(jQuery); 11 | } 12 | }(function($){ 13 | $.fn.wysihtml5.locale["bg-BG"] = { 14 | font_styles: { 15 | normal: "Нормален текст", 16 | h1: "Заглавие 1", 17 | h2: "Заглавие 2", 18 | h3: "Заглавие 3", 19 | h4: "Заглавие 4", 20 | h5: "Заглавие 5", 21 | h6: "Заглавие 6" 22 | }, 23 | emphasis: { 24 | bold: "Удебелен", 25 | italic: "Курсив", 26 | underline: "Подчертан" 27 | }, 28 | lists: { 29 | unordered: "Неподреден списък", 30 | ordered: "Подреден списък", 31 | outdent: "Намали отстояние", 32 | indent: "Увеличи отстояние" 33 | }, 34 | link: { 35 | insert: "Вмъкни връзка", 36 | cancel: "Отмени", 37 | target: "Отваряне на връзката в нов прозорец" 38 | }, 39 | image: { 40 | insert: "Вмъкни картинка", 41 | cancel: "Отмени" 42 | }, 43 | html: { 44 | edit: "Редакртирай HTML" 45 | }, 46 | colours: { 47 | black: "Черен", 48 | silver: "Сребърен", 49 | gray: "Сив", 50 | maroon: "Коричневый", 51 | red: "Червен", 52 | purple: "Виолетов", 53 | green: "Зелен", 54 | olive: "Маслинен", 55 | navy: "Морско син", 56 | blue: "Син", 57 | orange: "Оранжев" 58 | } 59 | }; 60 | })); 61 | 62 | -------------------------------------------------------------------------------- /src/locales/bootstrap-wysihtml5.ca-CT.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Catalan translation for bootstrap-wysihtml5 3 | */ 4 | (function (factory) { 5 | if (typeof define === 'function' && define.amd) { 6 | // AMD. Register as an anonymous module. 7 | define('bootstrap.wysihtml5.ca-CT', ['jquery', 'bootstrap.wysihtml5'], factory); 8 | } else { 9 | // Browser globals 10 | factory(jQuery); 11 | } 12 | }(function($){ 13 | $.fn.wysihtml5.locale["ca-CT"] = { 14 | font_styles: { 15 | normal: "Text normal", 16 | h1: "Títol 1", 17 | h2: "Títol 2", 18 | h3: "Títol 3", 19 | h4: "Títol 4", 20 | h5: "Títol 5", 21 | h6: "Títol 6" 22 | }, 23 | emphasis: { 24 | bold: "Negreta", 25 | italic: "Cursiva", 26 | underline: "Subratllat" 27 | }, 28 | lists: { 29 | unordered: "Llista desordenada", 30 | ordered: "Llista ordenada", 31 | outdent: "Esborrar tabulació", 32 | indent: "Afegir tabulació" 33 | }, 34 | link: { 35 | insert: "Afegir enllaç", 36 | cancel: "Cancelar", 37 | target: "Obrir enllaç en una finestra" 38 | }, 39 | image: { 40 | insert: "Afegir imatge", 41 | cancel: "Cancelar" 42 | }, 43 | html: { 44 | edit: "Editar HTML" 45 | }, 46 | colours: { 47 | black: "Negre", 48 | silver: "Plata", 49 | gray: "Gris", 50 | maroon: "Marró", 51 | red: "Vermell", 52 | purple: "Porpre", 53 | green: "Verd", 54 | olive: "Oliva", 55 | navy: "Blau marí", 56 | blue: "Blau", 57 | orange: "Taronja" 58 | } 59 | }; 60 | })); 61 | -------------------------------------------------------------------------------- /src/locales/bootstrap-wysihtml5.cs-CZ.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Czech translation for bootstrap-wysihtml5 3 | */ 4 | (function (factory) { 5 | if (typeof define === 'function' && define.amd) { 6 | // AMD. Register as an anonymous module. 7 | define('bootstrap.wysihtml5.cs-CZ', ['jquery', 'bootstrap.wysihtml5'], factory); 8 | } else { 9 | // Browser globals 10 | factory(jQuery); 11 | } 12 | }(function($){ 13 | $.fn.wysihtml5.locale["cs-CZ"] = { 14 | font_styles: { 15 | normal: "Normální text", 16 | h1: "Nadpis úrovně 1", 17 | h2: "Nadpis úrovně 2", 18 | h3: "Nadpis úrovně 3", 19 | h4: "Nadpis úrovně 4", 20 | h5: "Nadpis úrovně 5", 21 | h6: "Nadpis úrovně 6" 22 | }, 23 | emphasis: { 24 | bold: "Tučné", 25 | italic: "Kurzíva", 26 | underline: "Podtržení" 27 | }, 28 | lists: { 29 | unordered: "Seznam s odrážkami", 30 | ordered: "Číslovaný seznam", 31 | outdent: "Zvětšit odsazení", 32 | indent: "Zmenšit odsazení" 33 | }, 34 | link: { 35 | insert: "Vložit odkaz", 36 | cancel: "Zrušit", 37 | target: "Otevřít odkaz v novém okně" 38 | }, 39 | image: { 40 | insert: "Vložit obrázek", 41 | cancel: "Zrušit" 42 | }, 43 | html: { 44 | edit: "Upravit HTML" 45 | }, 46 | colours: { 47 | black: "Černá", 48 | silver: "Stříbrná", 49 | gray: "Šedá", 50 | maroon: "Vínová", 51 | red: "Červená", 52 | purple: "Fialová", 53 | green: "Zelená", 54 | olive: "Olivová", 55 | navy: "Tmavomodrá", 56 | blue: "Modrá", 57 | orange: "Oranžová" 58 | } 59 | }; 60 | })); 61 | -------------------------------------------------------------------------------- /src/locales/bootstrap-wysihtml5.da-DK.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Danish translations 3 | */ 4 | (function (factory) { 5 | if (typeof define === 'function' && define.amd) { 6 | // AMD. Register as an anonymous module. 7 | define('bootstrap.wysihtml5.da-DK', ['jquery', 'bootstrap.wysihtml5'], factory); 8 | } else { 9 | // Browser globals 10 | factory(jQuery); 11 | } 12 | }(function($){ 13 | $.fn.wysihtml5.locale["da-DK"] = { 14 | font_styles: { 15 | normal: "Normal tekst", 16 | h1: "Overskrift 1", 17 | h2: "Overskrift 2", 18 | h3: "Overskrift 3", 19 | h4: "Overskrift 4", 20 | h5: "Overskrift 5", 21 | h6: "Overskrift 6" 22 | }, 23 | emphasis: { 24 | bold: "Fed", 25 | italic: "Kursiv", 26 | underline: "Understreget" 27 | }, 28 | lists: { 29 | unordered: "Uordnet liste", 30 | ordered: "Ordnet liste", 31 | outdent: "Udryk", 32 | indent: "Indryk" 33 | }, 34 | link: { 35 | insert: "Indsæt Link", 36 | cancel: "Annuler", 37 | target: "Åbn link i nyt vindue" 38 | }, 39 | image: { 40 | insert: "Indsæt billede", 41 | cancel: "Annuler" 42 | }, 43 | html: { 44 | edit: "Rediger HTML" 45 | }, 46 | colours: { 47 | black: "Sort", 48 | silver: "Sølv", 49 | gray: "Grå", 50 | maroon: "Mørkerød", 51 | red: "Rød", 52 | purple: "Lilla", 53 | green: "Grøn", 54 | olive: "Lysegrøn", 55 | navy: "Mørkeblå", 56 | blue: "Blå", 57 | orange: "Orange" 58 | } 59 | }; 60 | })); 61 | -------------------------------------------------------------------------------- /src/locales/bootstrap-wysihtml5.de-DE.js: -------------------------------------------------------------------------------- 1 | /** 2 | * German translation for bootstrap-wysihtml5 3 | */ 4 | (function (factory) { 5 | if (typeof define === 'function' && define.amd) { 6 | // AMD. Register as an anonymous module. 7 | define('bootstrap.wysihtml5.de-DE', ['jquery', 'bootstrap.wysihtml5'], factory); 8 | } else { 9 | // Browser globals 10 | factory(jQuery); 11 | } 12 | }(function($){ 13 | $.fn.wysihtml5.locale["de-DE"] = { 14 | font_styles: { 15 | normal: "Normaler Text", 16 | h1: "Überschrift 1", 17 | h2: "Überschrift 2", 18 | h3: "Überschrift 3", 19 | h4: "Überschrift 4", 20 | h5: "Überschrift 5", 21 | h6: "Überschrift 6" 22 | }, 23 | emphasis: { 24 | bold: "Fett", 25 | italic: "Kursiv", 26 | underline: "Unterstrichen", 27 | small: "Klein" 28 | }, 29 | lists: { 30 | unordered: "Ungeordnete Liste", 31 | ordered: "Geordnete Liste", 32 | outdent: "Einzug verkleinern", 33 | indent: "Einzug vergrößern" 34 | }, 35 | link: { 36 | insert: "Link einfügen", 37 | cancel: "Abbrechen", 38 | target: "Link in neuen Fenster öffnen" 39 | }, 40 | image: { 41 | insert: "Bild einfügen", 42 | cancel: "Abbrechen" 43 | }, 44 | html: { 45 | edit: "HTML bearbeiten" 46 | }, 47 | colours: { 48 | black: "Schwarz", 49 | silver: "Silber", 50 | gray: "Grau", 51 | maroon: "Kastanienbraun", 52 | red: "Rot", 53 | purple: "Violett", 54 | green: "Grün", 55 | olive: "Olivgrün", 56 | navy: "Marineblau", 57 | blue: "Blau", 58 | orange: "Orange" 59 | } 60 | }; 61 | })); 62 | -------------------------------------------------------------------------------- /src/locales/bootstrap-wysihtml5.el-GR.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Greek translation for bootstrap-wysihtml5 3 | */ 4 | (function (factory) { 5 | if (typeof define === 'function' && define.amd) { 6 | // AMD. Register as an anonymous module. 7 | define('bootstrap.wysihtml5.el-GR', ['jquery', 'bootstrap.wysihtml5'], factory); 8 | } else { 9 | // Browser globals 10 | factory(jQuery); 11 | } 12 | }(function($){ 13 | $.fn.wysihtml5.locale["el-GR"] = { 14 | font_styles: { 15 | normal: "Απλό κείμενο", 16 | h1: "Κεφαλίδα 1", 17 | h2: "Κεφαλίδα 2", 18 | h3: "Κεφαλίδα 3" 19 | }, 20 | emphasis: { 21 | bold: "B", 22 | italic: "I", 23 | underline: "U" 24 | }, 25 | lists: { 26 | unordered: "Λίστα με κουκκίδες", 27 | ordered: "Αριθμημένη λίστα", 28 | outdent: "Μείωση εσοχής", 29 | indent: "Αύξηση εσοχής" 30 | }, 31 | link: { 32 | insert: "Εισαγωγή Συνδέσμου", 33 | cancel: "Άκυρο", 34 | target: "Άνοιγμα συνδέσμου σε νέο παράθυρο" 35 | }, 36 | image: { 37 | insert: "Εισαγωγή Εικόνας", 38 | cancel: "Άκυρο" 39 | }, 40 | html: { 41 | edit: "Επεξεργασία HTML" 42 | }, 43 | colours: { 44 | black: "Μαύρο", 45 | silver: "Ασημί", 46 | gray: "Γκρι", 47 | maroon: "Καφέ", 48 | red: "Κόκκινο", 49 | purple: "Μωβ", 50 | green: "Πράσινο", 51 | olive: "Λαδί", 52 | navy: "Βαθύ Μπλε", 53 | blue: "Μπλε", 54 | orange: "Πορτοκαλί" 55 | } 56 | }; 57 | })); 58 | -------------------------------------------------------------------------------- /src/locales/bootstrap-wysihtml5.en-US.js: -------------------------------------------------------------------------------- 1 | /** 2 | * English translation for bootstrap-wysihtml5 3 | */ 4 | (function (factory) { 5 | if (typeof define === 'function' && define.amd) { 6 | // AMD. Register as an anonymous module. 7 | define('bootstrap.wysihtml5.en-US', ['jquery', 'bootstrap.wysihtml5'], factory); 8 | } else { 9 | // Browser globals 10 | factory(jQuery); 11 | } 12 | }(function ($) { 13 | $.fn.wysihtml5.locale.en = $.fn.wysihtml5.locale['en-US'] = { 14 | font_styles: { 15 | normal: 'Normal text', 16 | h1: 'Heading 1', 17 | h2: 'Heading 2', 18 | h3: 'Heading 3', 19 | h4: 'Heading 4', 20 | h5: 'Heading 5', 21 | h6: 'Heading 6' 22 | }, 23 | emphasis: { 24 | bold: 'Bold', 25 | italic: 'Italic', 26 | underline: 'Underline', 27 | small: 'Small' 28 | }, 29 | lists: { 30 | unordered: 'Unordered list', 31 | ordered: 'Ordered list', 32 | outdent: 'Outdent', 33 | indent: 'Indent' 34 | }, 35 | link: { 36 | insert: 'Insert link', 37 | cancel: 'Cancel', 38 | target: 'Open link in new window' 39 | }, 40 | image: { 41 | insert: 'Insert image', 42 | cancel: 'Cancel' 43 | }, 44 | html: { 45 | edit: 'Edit HTML' 46 | }, 47 | colours: { 48 | black: 'Black', 49 | silver: 'Silver', 50 | gray: 'Grey', 51 | maroon: 'Maroon', 52 | red: 'Red', 53 | purple: 'Purple', 54 | green: 'Green', 55 | olive: 'Olive', 56 | navy: 'Navy', 57 | blue: 'Blue', 58 | orange: 'Orange' 59 | } 60 | }; 61 | })); 62 | -------------------------------------------------------------------------------- /src/locales/bootstrap-wysihtml5.eo-EO.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Esperanto translation for bootstrap-wysihtml5 3 | */ 4 | (function (factory) { 5 | if (typeof define === 'function' && define.amd) { 6 | // AMD. Register as an anonymous module. 7 | define('bootstrap.wysihtml5.eo-EO', ['jquery', 'bootstrap.wysihtml5'], factory); 8 | } else { 9 | // Browser globals 10 | factory(jQuery); 11 | } 12 | }(function($){ 13 | $.fn.wysihtml5.locale["eo-EO"] = { 14 | font_styles: { 15 | normal: "Normala teksto", 16 | h1: "Titolo 1", 17 | h2: "Titolo 2", 18 | h3: "Titolo 3", 19 | h4: "Titolo 4", 20 | h5: "Titolo 5", 21 | h6: "Titolo 6" 22 | }, 23 | emphasis: { 24 | bold: "Grasa", 25 | italic: "Kursiva", 26 | underline: "Substreko", 27 | small: "Malgranda" 28 | }, 29 | lists: { 30 | unordered: "Neordigita listo", 31 | ordered: "Ordigita listo", 32 | outdent: "Malpligrandigi krommarĝenon", 33 | indent: "Pligrandigi krommarĝenon" 34 | }, 35 | link: { 36 | target: "Malfermi la ligilon en nova fenestro", 37 | insert: "Enmeti ligilon", 38 | cancel: "Rezigni" 39 | }, 40 | image: { 41 | insert: "Enmeti bildon", 42 | cancel: "Rezigni" 43 | }, 44 | html: { 45 | edit: "Redakti per HTML" 46 | }, 47 | colours: { 48 | black: "Nigra", 49 | silver: "Arĝenta", 50 | gray: "Griza", 51 | maroon: "Bruna", 52 | red: "Ruĝa", 53 | purple: "Purpura", 54 | green: "Verda", 55 | olive: "Oliva", 56 | navy: "Malhele blua", 57 | blue: "Blua", 58 | orange: "Oranĝa" 59 | } 60 | }; 61 | })); 62 | -------------------------------------------------------------------------------- /src/locales/bootstrap-wysihtml5.es-AR.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Spanish Argenina translation for bootstrap-wysihtml5 3 | */ 4 | (function (factory) { 5 | if (typeof define === 'function' && define.amd) { 6 | // AMD. Register as an anonymous module. 7 | define('bootstrap.wysihtml5.es-AR', ['jquery', 'bootstrap.wysihtml5'], factory); 8 | } else { 9 | // Browser globals 10 | factory(jQuery); 11 | } 12 | }(function($){ 13 | $.fn.wysihtml5.locale["es-AR"] = { 14 | font_styles: { 15 | normal: "Texto normal", 16 | h1: "Título 1", 17 | h2: "Título 2", 18 | h3: "Título 3", 19 | h4: "Título 4", 20 | h5: "Título 5", 21 | h6: "Título 6" 22 | }, 23 | emphasis: { 24 | bold: "Negrita", 25 | italic: "Itálica", 26 | underline: "Subrayado", 27 | small: "Subíndice" 28 | }, 29 | lists: { 30 | ordered: "Lista ordenada", 31 | unordered: "Lista desordenada", 32 | indent: "Agregar sangría", 33 | outdent: "Eliminar sangría" 34 | }, 35 | link: { 36 | insert: "Insertar enlace", 37 | cancel: "Cancelar", 38 | target: "Abrir enlace en una ventana nueva" 39 | }, 40 | image: { 41 | insert: "Insertar imagen", 42 | cancel: "Cancelar" 43 | }, 44 | html: { 45 | edit: "Editar HTML" 46 | }, 47 | colours: { 48 | black: "Negro", 49 | silver: "Plata", 50 | gray: "Gris", 51 | maroon: "Marrón", 52 | red: "Rojo", 53 | purple: "Púrpura", 54 | green: "Verde", 55 | olive: "Oliva", 56 | navy: "Azul Marino", 57 | blue: "Azul", 58 | orange: "Naranja" 59 | } 60 | }; 61 | })); 62 | -------------------------------------------------------------------------------- /src/locales/bootstrap-wysihtml5.es-ES.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Spanish translation for bootstrap-wysihtml5 3 | */ 4 | (function (factory) { 5 | if (typeof define === 'function' && define.amd) { 6 | // AMD. Register as an anonymous module. 7 | define('bootstrap.wysihtml5.es-ES', ['jquery', 'bootstrap.wysihtml5'], factory); 8 | } else { 9 | // Browser globals 10 | factory(jQuery); 11 | } 12 | }(function($){ 13 | $.fn.wysihtml5.locale["es-ES"] = { 14 | font_styles: { 15 | normal: "Texto normal", 16 | h1: "Título 1", 17 | h2: "Título 2", 18 | h3: "Título 3", 19 | h4: "Título 4", 20 | h5: "Título 5", 21 | h6: "Título 6" 22 | }, 23 | emphasis: { 24 | bold: "Negrita", 25 | italic: "Itálica", 26 | underline: "Subrayado", 27 | small: "Subíndice" 28 | }, 29 | lists: { 30 | unordered: "Lista desordenada", 31 | ordered: "Lista ordenada", 32 | outdent: "Eliminar sangría", 33 | indent: "Agregar sangría" 34 | }, 35 | link: { 36 | insert: "Insertar enlace", 37 | cancel: "Cancelar", 38 | target: "Abrir enlace en una ventana nueva" 39 | }, 40 | image: { 41 | insert: "Insertar imagen", 42 | cancel: "Cancelar" 43 | }, 44 | html: { 45 | edit: "Editar HTML" 46 | }, 47 | colours: { 48 | black: "Negro", 49 | silver: "Plata", 50 | gray: "Gris", 51 | maroon: "Marrón", 52 | red: "Rojo", 53 | purple: "Púrpura", 54 | green: "Verde", 55 | olive: "Oliva", 56 | navy: "Azul Marino", 57 | blue: "Azul", 58 | orange: "Naranja" 59 | } 60 | }; 61 | })); 62 | -------------------------------------------------------------------------------- /src/locales/bootstrap-wysihtml5.fr-FR.js: -------------------------------------------------------------------------------- 1 | /** 2 | * French translation for bootstrap-wysihtml5 3 | */ 4 | (function (factory) { 5 | if (typeof define === 'function' && define.amd) { 6 | // AMD. Register as an anonymous module. 7 | define('bootstrap.wysihtml5.fr-FR', ['jquery', 'bootstrap.wysihtml5'], factory); 8 | } else { 9 | // Browser globals 10 | factory(jQuery); 11 | } 12 | }(function($){ 13 | $.fn.wysihtml5.locale["fr-FR"] = { 14 | font_styles: { 15 | normal: "Texte normal", 16 | h1: "Titre 1", 17 | h2: "Titre 2", 18 | h3: "Titre 3", 19 | h4: "Titre 4", 20 | h5: "Titre 5", 21 | h6: "Titre 6" 22 | }, 23 | emphasis: { 24 | bold: "Gras", 25 | italic: "Italique", 26 | underline: "Souligné", 27 | small: "Petit" 28 | }, 29 | lists: { 30 | unordered: "Liste à puces", 31 | ordered: "Liste numérotée", 32 | outdent: "Diminuer le retrait", 33 | indent: "Augmenter le retrait" 34 | }, 35 | link: { 36 | target: "Ouvrir le lien dans une nouvelle fenêtre", 37 | insert: "Insérer un lien", 38 | cancel: "Annuler" 39 | }, 40 | image: { 41 | insert: "Insérer une image", 42 | cancel: "Annuler" 43 | }, 44 | html: { 45 | edit: "Editer en HTML" 46 | }, 47 | colours: { 48 | black: "Noir", 49 | silver: "Gris clair", 50 | gray: "Gris", 51 | maroon: "Marron", 52 | red: "Rouge", 53 | purple: "Pourpre", 54 | green: "Vert", 55 | olive: "Olive", 56 | navy: "Bleu marine", 57 | blue: "Bleu", 58 | orange: "Orange" 59 | } 60 | }; 61 | })); 62 | -------------------------------------------------------------------------------- /src/locales/bootstrap-wysihtml5.hr-HR.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Croatian localisation for bootstrap-wysihtml5 3 | */ 4 | (function (factory) { 5 | if (typeof define === 'function' && define.amd) { 6 | // AMD. Register as an anonymous module. 7 | define('bootstrap.wysihtml5.hr-HR', ['jquery', 'bootstrap.wysihtml5'], factory); 8 | } else { 9 | // Browser globals 10 | factory(jQuery); 11 | } 12 | }(function($){ 13 | $.fn.wysihtml5.locale["hr-HR"] = { 14 | font_styles: { 15 | normal: "Normalan tekst", 16 | h1: "Naslov 1", 17 | h2: "Naslov 2", 18 | h3: "Naslov 3" 19 | }, 20 | emphasis: { 21 | bold: "Podebljano", 22 | italic: "Nakrivljeno", 23 | underline: "Podcrtano" 24 | }, 25 | lists: { 26 | unordered: "Nesortirana lista", 27 | ordered: "Sortirana lista", 28 | outdent: "Izdubi", 29 | indent: "Udubi" 30 | }, 31 | link: { 32 | insert: "Umetni poveznicu", 33 | cancel: "Otkaži", 34 | target: "Otvori vezu u novom prozoru" 35 | }, 36 | image: { 37 | insert: "Umetni sliku", 38 | cancel: "Otkaži" 39 | }, 40 | html: { 41 | edit: "Izmjeni HTML" 42 | }, 43 | colours: { 44 | black: "Crna", 45 | silver: "Srebrna", 46 | gray: "Siva", 47 | maroon: "Kestenjasta", 48 | red: "Crvena", 49 | purple: "Ljubičasta", 50 | green: "Zelena", 51 | olive: "Maslinasta", 52 | navy: "Mornarska", 53 | blue: "Plava", 54 | orange: "Narandžasta" 55 | } 56 | }; 57 | })); 58 | -------------------------------------------------------------------------------- /src/locales/bootstrap-wysihtml5.hu-HU.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Hungarian translation for bootstrap-wysihtml5 3 | */ 4 | (function (factory) { 5 | if (typeof define === 'function' && define.amd) { 6 | // AMD. Register as an anonymous module. 7 | define('bootstrap.wysihtml5.hu-HU', ['jquery', 'bootstrap.wysihtml5'], factory); 8 | } else { 9 | // Browser globals 10 | factory(jQuery); 11 | } 12 | }(function($){ 13 | $.fn.wysihtml5.locale["hu-HU"] = { 14 | font_styles: { 15 | normal: "Szövegtörzs", 16 | h1: "Főcím", 17 | h2: "Alcím", 18 | h3: "Harmadrangú alcím", 19 | h4: "Negyedrangú alcím", 20 | h5: "Ötödrangú alcím", 21 | h6: "Hatodrangú alcím" 22 | }, 23 | emphasis: { 24 | bold: "Vastag", 25 | italic: "Dölt", 26 | underline: "Aláhúzott" 27 | }, 28 | lists: { 29 | unordered: "Pontozott lista", 30 | ordered: "Számozott lista", 31 | outdent: "Behúzás növelése", 32 | indent: "Behúzás csökkentése" 33 | }, 34 | link: { 35 | insert: "Hivatkozás beszúrása", 36 | cancel: "Mégsem", 37 | target: "Hivatkozás megnyitása új ablakban" 38 | }, 39 | image: { 40 | insert: "Kép beszúrása", 41 | cancel: "Mégsem" 42 | }, 43 | html: { 44 | edit: "HTML szerkesztése" 45 | }, 46 | colours: { 47 | black: "Fekete", 48 | silver: "Ezüst", 49 | gray: "Szürke", 50 | maroon: "Gesztenyebarna", 51 | red: "Piros", 52 | purple: "Lila", 53 | green: "Zöld", 54 | olive: "Olajzöld", 55 | navy: "Tengerkék", 56 | blue: "Kék", 57 | orange: "Narancs" 58 | } 59 | }; 60 | })); 61 | -------------------------------------------------------------------------------- /src/locales/bootstrap-wysihtml5.il-HE.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Hebrew translation for bootstrap-wysihtml5 3 | */ 4 | (function (factory) { 5 | if (typeof define === 'function' && define.amd) { 6 | // AMD. Register as an anonymous module. 7 | define('bootstrap.wysihtml5.il-HE', ['jquery', 'bootstrap.wysihtml5'], factory); 8 | } else { 9 | // Browser globals 10 | factory(jQuery); 11 | } 12 | }(function($){ 13 | $.fn.wysihtml5.locale["il-HE"] = { 14 | font_styles: { 15 | normal: "רגיל", 16 | h1: "כותרת 1", 17 | h2: "כותרת 2", 18 | h3: "כותרת 3", 19 | h4: "כותרת 4", 20 | h5: "כותרת 5", 21 | h6: "כותרת 6" 22 | }, 23 | emphasis: { 24 | bold: "מודגש", 25 | italic: "טקסט נטוי", 26 | underline: "קו תחתון", 27 | small: "קטן" 28 | }, 29 | lists: { 30 | unordered: "רשימה עם תבליטים", 31 | ordered: "רשימה ממוספרת", 32 | outdent: "הקטן כניסה", 33 | indent: "הגדל כניסה", 34 | indered: "הגדל כניסה" 35 | }, 36 | link: { 37 | insert: "הכנס קישור", 38 | cancel: "בטל קישור", 39 | target: "לפתוח את הקישור בחלון חדש" 40 | }, 41 | image: { 42 | insert: "הוסף תמונה", 43 | cancel: "בטל" 44 | }, 45 | html: { 46 | edit: "עורך HTML" 47 | }, 48 | colours: { 49 | black: "שחור", 50 | silver: "כסף", 51 | gray: "אפור", 52 | maroon: "חום", 53 | red: "אדום", 54 | purple: "סגול", 55 | green: "ירוק", 56 | olive: "ירוק זית", 57 | navy: "כחול צי", 58 | blue: "כחול", 59 | orange: "כתום" 60 | } 61 | }; 62 | })); 63 | -------------------------------------------------------------------------------- /src/locales/bootstrap-wysihtml5.it-IT.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Italian translation for bootstrap-wysihtml5 3 | */ 4 | (function (factory) { 5 | if (typeof define === 'function' && define.amd) { 6 | // AMD. Register as an anonymous module. 7 | define('bootstrap.wysihtml5.it-IT', ['jquery', 'bootstrap.wysihtml5'], factory); 8 | } else { 9 | // Browser globals 10 | factory(jQuery); 11 | } 12 | }(function($){ 13 | $.fn.wysihtml5.locale["it-IT"] = { 14 | font_styles: { 15 | normal: "Testo normale", 16 | h1: "Titolo 1", 17 | h2: "Titolo 2" 18 | }, 19 | emphasis: { 20 | bold: "Grassetto", 21 | italic: "Corsivo", 22 | underline: "Sottolineato" 23 | }, 24 | lists: { 25 | unordered: "Lista non ordinata", 26 | ordered: "Lista ordinata", 27 | outdent: "Elimina rientro", 28 | indent: "Aggiungi rientro" 29 | }, 30 | link: { 31 | insert: "Inserisci link", 32 | cancel: "Annulla", 33 | target: "Apri il link in una nuova finestra" 34 | }, 35 | image: { 36 | insert: "Inserisci immagine", 37 | cancel: "Annulla" 38 | }, 39 | html: { 40 | edit: "Modifica HTML" 41 | }, 42 | colours: { 43 | black: "Nero", 44 | silver: "Argento", 45 | gray: "Grigio", 46 | maroon: "Marrone", 47 | red: "Rosso", 48 | purple: "Viola", 49 | green: "Verde", 50 | olive: "Oliva", 51 | navy: "Blu Marino", 52 | blue: "Blu", 53 | orange: "Arancio" 54 | } 55 | }; 56 | })); 57 | -------------------------------------------------------------------------------- /src/locales/bootstrap-wysihtml5.ja-JP.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Japanese translation for bootstrap-wysihtml5 3 | */ 4 | (function (factory) { 5 | if (typeof define === 'function' && define.amd) { 6 | // AMD. Register as an anonymous module. 7 | define('bootstrap.wysihtml5.ja-JP', ['jquery', 'bootstrap.wysihtml5'], factory); 8 | } else { 9 | // Browser globals 10 | factory(jQuery); 11 | } 12 | }(function($){ 13 | $.fn.wysihtml5.locale["ja-JP"] = { 14 | font_styles: { 15 | normal: "通常の文字", 16 | h1: "見出し1", 17 | h2: "見出し2", 18 | h3: "見出し3" 19 | }, 20 | emphasis: { 21 | bold: "太字", 22 | italic: "斜体", 23 | underline: "下線" 24 | }, 25 | lists: { 26 | unordered: "点字リスト", 27 | ordered: "数字リスト", 28 | outdent: "左寄せ", 29 | indent: "右寄せ" 30 | }, 31 | link: { 32 | insert: "リンクの挿入", 33 | cancel: "キャンセル", 34 | target: "新しいウィンドウでリンクを開く" 35 | }, 36 | image: { 37 | insert: "画像の挿入", 38 | cancel: "キャンセル" 39 | }, 40 | html: { 41 | edit: "HTMLを編集" 42 | }, 43 | colours: { 44 | black: "黒色", 45 | silver: "シルバー", 46 | gray: "グレー", 47 | maroon: "栗色", 48 | red: "赤色", 49 | purple: "紫色", 50 | green: "緑色", 51 | olive: "オリーブ", 52 | navy: "ネイビー", 53 | blue: "青色", 54 | orange: "オレンジ" 55 | } 56 | 57 | }; 58 | })); 59 | -------------------------------------------------------------------------------- /src/locales/bootstrap-wysihtml5.ko-KR.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Korean translation for bootstrap-wysihtml5 3 | */ 4 | (function (factory) { 5 | if (typeof define === 'function' && define.amd) { 6 | // AMD. Register as an anonymous module. 7 | define('bootstrap.wysihtml5.ko-KR', ['jquery', 'bootstrap.wysihtml5'], factory); 8 | } else { 9 | // Browser globals 10 | factory(jQuery); 11 | } 12 | }(function($){ 13 | $.fn.wysihtml5.locale["ko-KR"] = { 14 | font_styles: { 15 | normal: "일반", 16 | h1: "헤드라인 1", 17 | h2: "헤드라인 2", 18 | h3: "헤드라인 3" 19 | }, 20 | emphasis: { 21 | bold: "굵게", 22 | italic: "기울게", 23 | underline: "밑줄" 24 | }, 25 | lists: { 26 | unordered: "기호목록", 27 | ordered: "숫자목록", 28 | outdent: "내어쓰기", 29 | indent: "들여쓰기" 30 | }, 31 | link: { 32 | insert: "링크 삽입", 33 | cancel: "취소", 34 | target: "새 창에서 링크 열기" 35 | }, 36 | image: { 37 | insert: "이미지 삽입", 38 | cancel: "취소" 39 | }, 40 | html: { 41 | edit: "HTML 편집" 42 | }, 43 | colours: { 44 | black: "검은색", 45 | silver: "은색", 46 | gray: "회색", 47 | maroon: "고동색", 48 | red: "빨간색", 49 | purple: "보라색", 50 | green: "초록색", 51 | olive: "올리브", 52 | navy: "네이비", 53 | blue: "파란색", 54 | orange: "주황색" 55 | } 56 | 57 | }; 58 | })); 59 | -------------------------------------------------------------------------------- /src/locales/bootstrap-wysihtml5.lt-LT.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Lithuanian translation for bootstrap-wysihtml5 3 | */ 4 | (function (factory) { 5 | if (typeof define === 'function' && define.amd) { 6 | // AMD. Register as an anonymous module. 7 | define('bootstrap.wysihtml5.lt-LT', ['jquery', 'bootstrap.wysihtml5'], factory); 8 | } else { 9 | // Browser globals 10 | factory(jQuery); 11 | } 12 | }(function($){ 13 | $.fn.wysihtml5.locale["lt-LT"] = { 14 | font_styles: { 15 | normal: "Normalus", 16 | h1: "Antraštė 1", 17 | h2: "Antraštė 2", 18 | h3: "Antraštė 3" 19 | }, 20 | emphasis: { 21 | bold: "Pastorintas", 22 | italic: "Kursyvas", 23 | underline: "Pabrauktas" 24 | }, 25 | lists: { 26 | unordered: "Suženklintas sąrašas", 27 | ordered: "Numeruotas sąrašas", 28 | outdent: "Padidinti įtrauką", 29 | indent: "Sumažinti įtrauką" 30 | }, 31 | link: { 32 | insert: "Įterpti nuorodą", 33 | cancel: "Atšaukti", 34 | target: "Atidaryti nuorodą naujame lange" 35 | }, 36 | image: { 37 | insert: "Įterpti atvaizdą", 38 | cancel: "Atšaukti" 39 | }, 40 | html: { 41 | edit: "Redaguoti HTML" 42 | }, 43 | colours: { 44 | black: "Juoda", 45 | silver: "Sidabrinė", 46 | gray: "Pilka", 47 | maroon: "Kaštoninė", 48 | red: "Raudona", 49 | purple: "Violetinė", 50 | green: "Žalia", 51 | olive: "Gelsvai žalia", 52 | navy: "Tamsiai mėlyna", 53 | blue: "Mėlyna", 54 | orange: "Oranžinė" 55 | } 56 | }; 57 | })); 58 | -------------------------------------------------------------------------------- /src/locales/bootstrap-wysihtml5.mo-MD.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Moldavian translation for bootstrap-wysihtml5 3 | */ 4 | (function (factory) { 5 | if (typeof define === 'function' && define.amd) { 6 | // AMD. Register as an anonymous module. 7 | define('bootstrap.wysihtml5.mo-MD', ['jquery', 'bootstrap.wysihtml5'], factory); 8 | } else { 9 | // Browser globals 10 | factory(jQuery); 11 | } 12 | }(function($){ 13 | $.fn.wysihtml5.locale["mo-MD"] = { 14 | font_styles: { 15 | normal: "Normal", 16 | h1: "Titlu 1", 17 | h2: "Titlu 2" 18 | }, 19 | emphasis: { 20 | bold: "Bold", 21 | italic: "Cursiv", 22 | underline: "Accentuat" 23 | }, 24 | lists: { 25 | unordered: "Neordonata", 26 | ordered: "Ordonata", 27 | outdent: "Margine", 28 | indent: "zimțuire" 29 | }, 30 | link: { 31 | insert: "Indroduce link-ul", 32 | cancel: "Anula" 33 | }, 34 | image: { 35 | insert: "Insera imagina", 36 | cancel: "Anula" 37 | }, 38 | html: { 39 | edit: "Editare HTML" 40 | }, 41 | 42 | colours: { 43 | black: "Negru", 44 | silver: "Argint", 45 | gray: "Gri", 46 | maroon: "Castaniu", 47 | red: "Roșu", 48 | purple: "Violet", 49 | green: "Verde", 50 | olive: "Oliv", 51 | navy: "Marin", 52 | blue: "Albastru", 53 | orange: "Portocaliu" 54 | } 55 | }; 56 | })); 57 | -------------------------------------------------------------------------------- /src/locales/bootstrap-wysihtml5.nb-NB.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Norwegian translation for bootstrap-wysihtml5 3 | */ 4 | (function (factory) { 5 | if (typeof define === 'function' && define.amd) { 6 | // AMD. Register as an anonymous module. 7 | define('bootstrap.wysihtml5.nb-NB', ['jquery', 'bootstrap.wysihtml5'], factory); 8 | } else { 9 | // Browser globals 10 | factory(jQuery); 11 | } 12 | }(function($){ 13 | $.fn.wysihtml5.locale["nb-NB"] = { 14 | font_styles: { 15 | normal: "Normal tekst", 16 | h1: "Tittel 1", 17 | h2: "Tittel 2", 18 | h3: "Tittel 3" 19 | }, 20 | emphasis: { 21 | bold: "Fet", 22 | italic: "Kursiv", 23 | underline: "Understrekning" 24 | }, 25 | lists: { 26 | unordered: "Usortert", 27 | ordered: "Sortert", 28 | outdent: "Detabuler", 29 | indent: "Tabuler", 30 | indered: "Tabuler" 31 | }, 32 | link: { 33 | insert: "Sett inn lenke", 34 | cancel: "Avbryt" 35 | }, 36 | image: { 37 | insert: "Sett inn bilde", 38 | cancel: "Avbryt" 39 | }, 40 | html: { 41 | edit: "Rediger HTML" 42 | }, 43 | colours: { 44 | black: "Svart", 45 | silver: "Sølv", 46 | gray: "Grå", 47 | maroon: "Brun", 48 | red: "Rød", 49 | purple: "Lilla", 50 | green: "Grønn", 51 | olive: "Oliven", 52 | navy: "Marineblå", 53 | blue: "Blå", 54 | orange: "Oransj" 55 | } 56 | }; 57 | })); 58 | -------------------------------------------------------------------------------- /src/locales/bootstrap-wysihtml5.nl-NL.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Dutch translation for bootstrap-wysihtml5 3 | */ 4 | (function (factory) { 5 | if (typeof define === 'function' && define.amd) { 6 | // AMD. Register as an anonymous module. 7 | define('bootstrap.wysihtml5.nl-NL', ['jquery', 'bootstrap.wysihtml5'], factory); 8 | } else { 9 | // Browser globals 10 | factory(jQuery); 11 | } 12 | }(function($){ 13 | $.fn.wysihtml5.locale["nl-NL"] = { 14 | font_styles: { 15 | normal: "Normale Tekst", 16 | h1: "Kop 1", 17 | h2: "Kop 2", 18 | h3: "Kop 3" 19 | }, 20 | emphasis: { 21 | bold: "Vet", 22 | italic: "Cursief", 23 | underline: "Onderstrepen" 24 | }, 25 | lists: { 26 | unordered: "Ongeordende lijst", 27 | ordered: "Geordende lijst", 28 | outdent: "Inspringen verkleinen", 29 | indent: "Inspringen vergroten" 30 | }, 31 | link: { 32 | insert: "Link invoegen", 33 | cancel: "Annuleren" 34 | }, 35 | image: { 36 | insert: "Afbeelding invoegen", 37 | cancel: "Annuleren" 38 | }, 39 | html: { 40 | edit: "HTML bewerken" 41 | }, 42 | colours: { 43 | black: "Zwart", 44 | silver: "Zilver", 45 | gray: "Grijs", 46 | maroon: "Kastanjebruin", 47 | red: "Rood", 48 | purple: "Paars", 49 | green: "Groen", 50 | olive: "Olijfgroen", 51 | navy: "Donkerblauw", 52 | blue: "Blauw", 53 | orange: "Oranje" 54 | } 55 | }; 56 | })); 57 | -------------------------------------------------------------------------------- /src/locales/bootstrap-wysihtml5.pl-PL.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Polish translation for bootstrap-wysihtml5 3 | */ 4 | (function (factory) { 5 | if (typeof define === 'function' && define.amd) { 6 | // AMD. Register as an anonymous module. 7 | define('bootstrap.wysihtml5.pl-PL', ['jquery', 'bootstrap.wysihtml5'], factory); 8 | } else { 9 | // Browser globals 10 | factory(jQuery); 11 | } 12 | }(function($){ 13 | $.fn.wysihtml5.locale["pl-PL"] = { 14 | font_styles: { 15 | normal: "Tekst podstawowy", 16 | h1: "Nagłówek 1", 17 | h2: "Nagłówek 2", 18 | h3: "Nagłówek 3", 19 | h4: "Nagłówek 4", 20 | h5: "Nagłówek 5", 21 | h6: "Nagłówek 6" 22 | }, 23 | emphasis: { 24 | bold: "Pogrubienie", 25 | italic: "Kursywa", 26 | underline: "Podkreślenie" 27 | }, 28 | lists: { 29 | unordered: "Lista wypunktowana", 30 | ordered: "Lista numerowana", 31 | outdent: "Zmniejsz wcięcie", 32 | indent: "Zwiększ wcięcie" 33 | }, 34 | link: { 35 | insert: "Wstaw odnośnik", 36 | cancel: "Anuluj", 37 | target: "Otwórz odnośnik w nowym oknie" 38 | }, 39 | image: { 40 | insert: "Wstaw obrazek", 41 | cancel: "Anuluj" 42 | }, 43 | html: { 44 | edit: "Edycja HTML" 45 | }, 46 | colours: { 47 | black: "Czarny", 48 | silver: "Srebrny", 49 | gray: "Szary", 50 | maroon: "Kasztanowy", 51 | red: "Czerwony", 52 | purple: "Fioletowy", 53 | green: "Zielony", 54 | olive: "Oliwkowy", 55 | navy: "Granatowy", 56 | blue: "Niebieski", 57 | orange: "Pomarańczowy" 58 | } 59 | }; 60 | })); 61 | -------------------------------------------------------------------------------- /src/locales/bootstrap-wysihtml5.pt-BR.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Brazilian portuguese translation for bootstrap-wysihtml5 3 | */ 4 | (function (factory) { 5 | if (typeof define === 'function' && define.amd) { 6 | // AMD. Register as an anonymous module. 7 | define('bootstrap.wysihtml5.pt-BR', ['jquery', 'bootstrap.wysihtml5'], factory); 8 | } else { 9 | // Browser globals 10 | factory(jQuery); 11 | } 12 | }(function($){ 13 | $.fn.wysihtml5.locale["pt-BR"] = { 14 | font_styles: { 15 | normal: "Texto normal", 16 | h1: "Título 1", 17 | h2: "Título 2", 18 | h3: "Título 3", 19 | h4: "Título 4", 20 | h5: "Título 5", 21 | h6: "Título 6" 22 | }, 23 | emphasis: { 24 | bold: "Negrito", 25 | italic: "Itálico", 26 | underline: "Sublinhado", 27 | small: "Pequeno" 28 | }, 29 | lists: { 30 | unordered: "Lista", 31 | ordered: "Lista numerada", 32 | outdent: "Remover indentação", 33 | indent: "Indentar" 34 | }, 35 | link: { 36 | insert: "Inserir link", 37 | cancel: "Cancelar", 38 | target: "Abrir link em um nova janela" 39 | }, 40 | image: { 41 | insert: "Inserir imagem", 42 | cancel: "Cancelar" 43 | }, 44 | html: { 45 | edit: "Editar HTML" 46 | }, 47 | colours: { 48 | black: "Preto", 49 | silver: "Prata", 50 | gray: "Cinza", 51 | maroon: "Marrom", 52 | red: "Vermelho", 53 | purple: "Roxo", 54 | green: "Verde", 55 | olive: "Oliva", 56 | navy: "Marinho", 57 | blue: "Azul", 58 | orange: "Laranja" 59 | } 60 | }; 61 | })); 62 | -------------------------------------------------------------------------------- /src/locales/bootstrap-wysihtml5.ru-RU.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Russian translation for bootstrap-wysihtml5 3 | */ 4 | (function (factory) { 5 | if (typeof define === 'function' && define.amd) { 6 | // AMD. Register as an anonymous module. 7 | define('bootstrap.wysihtml5.ru-RU', ['jquery', 'bootstrap.wysihtml5'], factory); 8 | } else { 9 | // Browser globals 10 | factory(jQuery); 11 | } 12 | }(function($){ 13 | $.fn.wysihtml5.locale["ru-RU"] = { 14 | font_styles: { 15 | normal: "Обычный текст", 16 | h1: "Заголовок 1", 17 | h2: "Заголовок 2", 18 | h3: "Заголовок 3", 19 | h4: "Заголовок 4", 20 | h5: "Заголовок 5", 21 | h6: "Заголовок 6" 22 | }, 23 | emphasis: { 24 | bold: "Полужирный", 25 | italic: "Курсив", 26 | underline: "Подчёркнутый", 27 | small: "Маленький" 28 | }, 29 | lists: { 30 | unordered: "Маркированный список", 31 | ordered: "Нумерованный список", 32 | outdent: "Уменьшить отступ", 33 | indent: "Увеличить отступ" 34 | }, 35 | link: { 36 | insert: "Вставить ссылку", 37 | cancel: "Отмена" 38 | }, 39 | image: { 40 | insert: "Вставить изображение", 41 | cancel: "Отмена" 42 | }, 43 | html: { 44 | edit: "HTML код" 45 | }, 46 | colours: { 47 | black: "Чёрный", 48 | silver: "Серебряный", 49 | gray: "Серый", 50 | maroon: "Коричневый", 51 | red: "Красный", 52 | purple: "Фиолетовый", 53 | green: "Зелёный", 54 | olive: "Оливковый", 55 | navy: "Тёмно-синий", 56 | blue: "Синий", 57 | orange: "Оранжевый" 58 | } 59 | }; 60 | })); 61 | 62 | -------------------------------------------------------------------------------- /src/locales/bootstrap-wysihtml5.sk-SK.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Slovak translation for bootstrap-wysihtml5 3 | */ 4 | (function (factory) { 5 | if (typeof define === 'function' && define.amd) { 6 | // AMD. Register as an anonymous module. 7 | define('bootstrap.wysihtml5.sk-SK', ['jquery', 'bootstrap.wysihtml5'], factory); 8 | } else { 9 | // Browser globals 10 | factory(jQuery); 11 | } 12 | }(function($){ 13 | $.fn.wysihtml5.locale["sk-SK"] = { 14 | font_styles: { 15 | normal: "Normálny text", 16 | h1: "Nadpis úrovne 1", 17 | h2: "Nadpis úrovne 2", 18 | h3: "Nadpis úrovne 3" 19 | }, 20 | emphasis: { 21 | bold: "Tučné", 22 | italic: "Kurzíva", 23 | underline: "Podčiarknuté" 24 | }, 25 | lists: { 26 | unordered: "Neusporiadaný zoznam", 27 | ordered: "Číslovaný zoznam", 28 | outdent: "Zväčšiť odsadenie", 29 | indent: "Zmenšiť odsadenie" 30 | }, 31 | link: { 32 | insert: "Vložiť odkaz", 33 | cancel: "Zrušiť" 34 | }, 35 | image: { 36 | insert: "Vložiť obrázok", 37 | cancel: "Zrušiť" 38 | }, 39 | html: { 40 | edit: "Editovať HTML" 41 | }, 42 | colours: { 43 | black: "Čierna", 44 | silver: "Strieborná", 45 | gray: "Šedá", 46 | maroon: "Bordová", 47 | red: "Červená", 48 | purple: "Fialová", 49 | green: "Zelená", 50 | olive: "Olivová", 51 | navy: "Tmavomodrá", 52 | blue: "Modrá", 53 | orange: "Oranžová" 54 | } 55 | }; 56 | })); 57 | -------------------------------------------------------------------------------- /src/locales/bootstrap-wysihtml5.sv-SE.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Swedish translation for bootstrap-wysihtml5 3 | */ 4 | (function (factory) { 5 | if (typeof define === 'function' && define.amd) { 6 | // AMD. Register as an anonymous module. 7 | define('bootstrap.wysihtml5.sv-SE', ['jquery', 'bootstrap.wysihtml5'], factory); 8 | } else { 9 | // Browser globals 10 | factory(jQuery); 11 | } 12 | }(function($){ 13 | $.fn.wysihtml5.locale["sv-SE"] = { 14 | font_styles: { 15 | normal: "Normal Text", 16 | h1: "Rubrik 1", 17 | h2: "Rubrik 2", 18 | h3: "Rubrik 3" 19 | }, 20 | emphasis: { 21 | bold: "Fet", 22 | italic: "Kursiv", 23 | underline: "Understruken" 24 | }, 25 | lists: { 26 | unordered: "Osorterad lista", 27 | ordered: "Sorterad lista", 28 | outdent: "Minska indrag", 29 | indent: "Öka indrag" 30 | }, 31 | link: { 32 | insert: "Lägg till länk", 33 | cancel: "Avbryt" 34 | }, 35 | image: { 36 | insert: "Lägg till Bild", 37 | cancel: "Avbryt" 38 | }, 39 | html: { 40 | edit: "Redigera HTML" 41 | }, 42 | colours: { 43 | black: "Svart", 44 | silver: "Silver", 45 | gray: "Grå", 46 | maroon: "Kastaniebrun", 47 | red: "Röd", 48 | purple: "Lila", 49 | green: "Grön", 50 | olive: "Olivgrön", 51 | navy: "Marinblå", 52 | blue: "Blå", 53 | orange: "Orange" 54 | } 55 | }; 56 | })); 57 | -------------------------------------------------------------------------------- /src/locales/bootstrap-wysihtml5.tr-TR.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Turkish translation for bootstrap-wysihtml5 3 | */ 4 | (function (factory) { 5 | if (typeof define === 'function' && define.amd) { 6 | // AMD. Register as an anonymous module. 7 | define('bootstrap.wysihtml5.tr-TR', ['jquery', 'bootstrap.wysihtml5'], factory); 8 | } else { 9 | // Browser globals 10 | factory(jQuery); 11 | } 12 | }(function($){ 13 | $.fn.wysihtml5.locale["tr-TR"] = { 14 | font_styles: { 15 | normal: "Normal", 16 | h1: "Başlık 1", 17 | h2: "Başlık 2", 18 | h3: "Başlık 3", 19 | h4: "Başlık 4", 20 | h5: "Başlık 5", 21 | h6: "Başlık 6" 22 | }, 23 | emphasis: { 24 | bold: "Kalın", 25 | italic: "İtalik", 26 | underline: "Altı Çizili", 27 | small: "Küçük" 28 | }, 29 | lists: { 30 | unordered: "Sırasız Liste", 31 | ordered: "Sıralı Liste", 32 | outdent: "Girintiyi Azalt", 33 | indent: "Girintiyi Arttır" 34 | }, 35 | link: { 36 | insert: "Ekle", 37 | cancel: "Vazgeç", 38 | target: "Bağlantıyı yeni pencerede aç" 39 | }, 40 | image: { 41 | insert: "Ekle", 42 | cancel: "Vazgeç" 43 | }, 44 | html: { 45 | edit: "HTML Göster" 46 | }, 47 | colours: { 48 | black: "Siyah", 49 | silver: "Gümüş", 50 | gray: "Gri", 51 | maroon: "Vişne Çürüğü", 52 | red: "Kırmızı", 53 | purple: "Mor", 54 | green: "Yeşil", 55 | olive: "Zeytin Yeşili", 56 | navy: "Lacivert", 57 | blue: "Mavi", 58 | orange: "Turuncu" 59 | } 60 | }; 61 | })); 62 | -------------------------------------------------------------------------------- /src/locales/bootstrap-wysihtml5.ua-UA.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Ukrainian translation for bootstrap-wysihtml5 3 | */ 4 | (function (factory) { 5 | if (typeof define === 'function' && define.amd) { 6 | // AMD. Register as an anonymous module. 7 | define('bootstrap.wysihtml5.ua-UA', ['jquery', 'bootstrap.wysihtml5'], factory); 8 | } else { 9 | // Browser globals 10 | factory(jQuery); 11 | } 12 | }(function($){ 13 | $.fn.wysihtml5.locale["ua-UA"] = { 14 | font_styles: { 15 | normal: "Звичайний текст", 16 | h1: "Заголовок 1", 17 | h2: "Заголовок 2", 18 | h3: "Заголовок 3" 19 | }, 20 | emphasis: { 21 | bold: "Напівжирний", 22 | italic: "Курсив", 23 | underline: "Підкреслений" 24 | }, 25 | lists: { 26 | unordered: "Маркований список", 27 | ordered: "Нумерований список", 28 | outdent: "Зменшити відступ", 29 | indent: "Збільшити відступ" 30 | }, 31 | link: { 32 | insert: "Вставити посилання", 33 | cancel: "Відміна" 34 | }, 35 | image: { 36 | insert: "Вставити зображення", 37 | cancel: "Відміна" 38 | }, 39 | html: { 40 | edit: "HTML код" 41 | }, 42 | colours: { 43 | black: "Чорний", 44 | silver: "Срібний", 45 | gray: "Сірий", 46 | maroon: "Коричневий", 47 | red: "Червоний", 48 | purple: "Фіолетовий", 49 | green: "Зелений", 50 | olive: "Оливковий", 51 | navy: "Темно-синій", 52 | blue: "Синій", 53 | orange: "Помаранчевий" 54 | } 55 | }; 56 | })); 57 | 58 | -------------------------------------------------------------------------------- /src/locales/bootstrap-wysihtml5.vi-VN.js: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Vietnamese translation for bootstrap3-wysihtml5 4 | */ 5 | (function (factory) { 6 | if (typeof define === 'function' && define.amd) { 7 | // AMD. Register as an anonymous module. 8 | define('bootstrap.wysihtml5.zh-CN', ['jquery', 'bootstrap.wysihtml5'], factory); 9 | } else { 10 | // Browser globals 11 | factory(jQuery); 12 | } 13 | }(function($){ 14 | $.fn.wysihtml5.locale["vi-VN"] = { 15 | font_styles: { 16 | normal: "Bình thường", 17 | h1: "Tiêu đề 1", 18 | h2: "Tiêu đề 2", 19 | h3: "Tiêu đề 3", 20 | h3: "Tiêu đề 4", 21 | h3: "Tiêu đề 5", 22 | h3: "Tiêu đề 6" 23 | }, 24 | emphasis: { 25 | bold: "Đậm", 26 | italic: "Nghiêng", 27 | underline: "Gạch dưới" 28 | }, 29 | lists: { 30 | unordered: "Không thứ tự", 31 | ordered: "Thứ tự", 32 | outdent: "Thụt ra", 33 | indent: "Thụt vào" 34 | }, 35 | link: { 36 | insert: "Chèn liên kết", 37 | cancel: "Huỷ" 38 | }, 39 | image: { 40 | insert: "Chèn ảnh", 41 | cancel: "Huỷ" 42 | }, 43 | html: { 44 | edit: "Sửa" 45 | }, 46 | colours: { 47 | black: "Đen", 48 | silver: "Bạc", 49 | gray: "Xám", 50 | maroon: "Nâu Maroon", 51 | red: "Đỏ", 52 | purple: "Tím Purple", 53 | green: "Xanh lá", 54 | olive: "Xanh Olive", 55 | navy: "Xanh Navy", 56 | blue: "Xanh dương", 57 | orange: "Cam" 58 | } 59 | }; 60 | })); 61 | -------------------------------------------------------------------------------- /src/locales/bootstrap-wysihtml5.zh-CN.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Chinese translation for bootstrap-wysihtml5 3 | */ 4 | (function (factory) { 5 | if (typeof define === 'function' && define.amd) { 6 | // AMD. Register as an anonymous module. 7 | define('bootstrap.wysihtml5.zh-CN', ['jquery', 'bootstrap.wysihtml5'], factory); 8 | } else { 9 | // Browser globals 10 | factory(jQuery); 11 | } 12 | }(function($){ 13 | $.fn.wysihtml5.locale["zh-CN"] = { 14 | font_styles: { 15 | normal: "正文", 16 | h1: "标题 1", 17 | h2: "标题 2", 18 | h3: "标题 3", 19 | h4: "标题 4", 20 | h5: "标题 5", 21 | h6: "标题 6" 22 | }, 23 | emphasis: { 24 | bold: "粗体", 25 | italic: "斜体", 26 | underline: "下划线" 27 | }, 28 | lists: { 29 | unordered: "项目符号", 30 | ordered: "编号", 31 | outdent: "减少缩进", 32 | indent: "增加缩进" 33 | }, 34 | link: { 35 | insert: "插入链接", 36 | cancel: "取消", 37 | target: "新窗口打开链接" 38 | }, 39 | image: { 40 | insert: "插入图片", 41 | cancel: "取消" 42 | }, 43 | html: { 44 | edit: "HTML代码" 45 | }, 46 | colours: { 47 | black: "黑色", 48 | silver: "银色", 49 | gray: "灰色", 50 | maroon: "赤红色", 51 | red: "红色", 52 | purple: "紫色", 53 | green: "绿色", 54 | olive: "橄榄色", 55 | navy: "深蓝色", 56 | blue: "蓝色", 57 | orange: "橙色" 58 | } 59 | }; 60 | })); 61 | -------------------------------------------------------------------------------- /src/locales/bootstrap-wysihtml5.zh-TW.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Chinese Traditional translation for bootstrap-wysihtml5 3 | */ 4 | (function (factory) { 5 | if (typeof define === 'function' && define.amd) { 6 | // AMD. Register as an anonymous module. 7 | define('bootstrap.wysihtml5.zh-TW', ['jquery', 'bootstrap.wysihtml5'], factory); 8 | } else { 9 | // Browser globals 10 | factory(jQuery); 11 | } 12 | }(function($){ 13 | $.fn.wysihtml5.locale["zh-TW"] = { 14 | font_styles: { 15 | normal: "內文", 16 | h1: "標題 1", 17 | h2: "標題 2", 18 | h3: "標題 3", 19 | h3: "標題 4", 20 | h3: "標題 5", 21 | h3: "標題 6" 22 | }, 23 | emphasis: { 24 | bold: "粗體", 25 | italic: "斜體", 26 | underline: "底線" 27 | }, 28 | lists: { 29 | unordered: "項目符號", 30 | ordered: "編號列表", 31 | outdent: "減少縮排", 32 | indent: "增加縮排" 33 | }, 34 | link: { 35 | insert: "插入超連結", 36 | cancel: "取消", 37 | target: "新窗口打開鏈接" 38 | }, 39 | image: { 40 | insert: "插入圖片連結", 41 | cancel: "取消" 42 | }, 43 | html: { 44 | edit: "HTML原始碼" 45 | }, 46 | colours: { 47 | black: "黑色", 48 | silver: "銀色", 49 | gray: "灰色", 50 | maroon: "栗色", 51 | red: "红色", 52 | purple: "紫色", 53 | green: "綠色", 54 | olive: "橄欖色", 55 | navy: "深藍色", 56 | blue: "藍色", 57 | orange: "橙色" 58 | } 59 | }; 60 | })); 61 | -------------------------------------------------------------------------------- /src/parser_rules/simple.json: -------------------------------------------------------------------------------- 1 | { 2 | "tags": { 3 | "a": { 4 | "check_attributes": { 5 | "href": "url" 6 | }, 7 | "set_attributes": { 8 | "rel": "nofollow", 9 | "target": "_blank" 10 | } 11 | }, 12 | "b": {}, 13 | "br": {}, 14 | "div": {}, 15 | "em": {}, 16 | "i": {}, 17 | "li": {}, 18 | "ol": {}, 19 | "p": {}, 20 | "span": {}, 21 | "strong": {}, 22 | "ul": {} 23 | } 24 | } -------------------------------------------------------------------------------- /src/templates/blockquote.hbs: -------------------------------------------------------------------------------- 1 |
  • 2 | 3 | {{#if options.toolbar.fa}} 4 | 5 | {{else}} 6 | 7 | {{/if}} 8 | 9 |
  • 10 | -------------------------------------------------------------------------------- /src/templates/color.hbs: -------------------------------------------------------------------------------- 1 | 20 | -------------------------------------------------------------------------------- /src/templates/emphasis.hbs: -------------------------------------------------------------------------------- 1 |
  • 2 |
    3 | {{locale.emphasis.bold}} 4 | {{locale.emphasis.italic}} 5 | {{locale.emphasis.underline}} 6 | {{#if options.toolbar.emphasis.small}} 7 | {{locale.emphasis.small}} 8 | {{/if}} 9 |
    10 |
  • 11 | -------------------------------------------------------------------------------- /src/templates/font-styles.hbs: -------------------------------------------------------------------------------- 1 | 21 | -------------------------------------------------------------------------------- /src/templates/html.hbs: -------------------------------------------------------------------------------- 1 |
  • 2 | 11 |
  • 12 | -------------------------------------------------------------------------------- /src/templates/image.hbs: -------------------------------------------------------------------------------- 1 |
  • 2 | 21 | 22 | {{#if options.toolbar.fa}} 23 | 24 | {{else}} 25 | 26 | {{/if}} 27 | 28 |
  • 29 | -------------------------------------------------------------------------------- /src/templates/link.hbs: -------------------------------------------------------------------------------- 1 |
  • 2 | 26 | 27 | {{#if options.toolbar.fa}} 28 | 29 | {{else}} 30 | 31 | {{/if}} 32 | 33 |
  • 34 | -------------------------------------------------------------------------------- /src/templates/lists.hbs: -------------------------------------------------------------------------------- 1 |
  • 2 | 32 |
  • 33 | -------------------------------------------------------------------------------- /test/bs/bootstrap_editor_changeView_test.js: -------------------------------------------------------------------------------- 1 | if (wysihtml5.browser.supported()) { 2 | 3 | module('bootstrap3-wysihtml5-bower.toolbar.link', { 4 | 5 | setup: function() { 6 | this.container = testhelper.prepareFixtureWithTextarea(); 7 | this.editableArea = testhelper.getEditableArea(); 8 | }, 9 | 10 | teardown: function() { 11 | QUnit.reset(); 12 | } 13 | }); 14 | 15 | asyncTest('change view with mouse', function(){ 16 | expect(2); 17 | 18 | var that = this; 19 | 20 | var onLoad = function() { 21 | //find changeview button 22 | var changeViewButton = that.container.find('[data-wysihtml5-action="change_view"]'); 23 | ok(changeViewButton.hasClass('btn'), 'Found button change view.'); 24 | 25 | changeViewButton.happen('click'); 26 | }; 27 | 28 | var onChangeView = function(event) { 29 | ok(true, 'change_view event was fired'); 30 | start(); 31 | }; 32 | 33 | var editor = this.editableArea.wysihtml5({ 34 | toolbar: { 35 | 'html': true 36 | }, 37 | events: { 38 | 'load': onLoad, 39 | 'change_view': onChangeView 40 | } 41 | }); 42 | 43 | }); 44 | 45 | } 46 | -------------------------------------------------------------------------------- /test/bs/bootstrap_editor_commands_test.js: -------------------------------------------------------------------------------- 1 | if (wysihtml5.browser.supported()) { 2 | module("wysihtml5.Editor.commands", { 3 | setup: function() { 4 | this.container = testhelper.prepareFixtureWithTextarea(); 5 | this.editableArea = testhelper.getEditableArea(); 6 | }, 7 | 8 | teardown: function() { 9 | QUnit.reset(); 10 | } 11 | }); 12 | 13 | 14 | asyncTest("Bootstrapwrapper formating tests", function() { 15 | 16 | //@ignore should be 4 17 | expect(2); 18 | var text = "once upon a time there was an unformated text."; 19 | 20 | var onLoad = function(event) { 21 | this.setValue(text, true); 22 | 23 | // basic 24 | this.composer.selection.selectNode(this.currentView.element); 25 | this.composer.commands.exec('small'); 26 | equal(this.getValue().toLowerCase(), "" + text + "", "Command small sets text as small correctly"); 27 | 28 | this.composer.selection.getSelection().collapseToStart(); 29 | ok(this.composer.selection.getSelection().isCollapsed, "Text caret is collapsed"); 30 | this.composer.commands.exec('small'); 31 | 32 | //@ignore 33 | //equal(this.getValue().toLowerCase(), text, "Small is correctly removed when text caret is inside small"); 34 | //ok(this.composer.selection.getSelection().isCollapsed, "Text caret did remain collapsed"); 35 | 36 | start(); 37 | }; 38 | 39 | var editor = this.editableArea.wysihtml5({ 40 | toolbar: { 41 | 'html': true 42 | }, 43 | events: { 44 | 'load': onLoad, 45 | }, 46 | parserRules: { 47 | tags: { 48 | small: 1 49 | } 50 | } 51 | }); 52 | }); 53 | 54 | } 55 | -------------------------------------------------------------------------------- /test/bs/bootstrap_editor_image_test.js: -------------------------------------------------------------------------------- 1 | if (wysihtml5.browser.supported()) { 2 | 3 | module('bootstrap3-wysihtml5-bower.toolbar.image', { 4 | 5 | setup: function() { 6 | this.container = testhelper.prepareFixtureWithTextarea(); 7 | this.editableArea = testhelper.getEditableArea(); 8 | }, 9 | 10 | teardown: function() { 11 | QUnit.reset(); 12 | } 13 | }); 14 | 15 | 16 | asyncTest('open image modal with mouse', function(){ 17 | expect(6); 18 | 19 | var that = this; 20 | 21 | var onLoad = function() { 22 | //find link modal 23 | var insertImageButton = that.container.find('[data-wysihtml5-command="insertImage"]'); 24 | ok(insertImageButton.hasClass('btn'), 'Found button link.'); 25 | 26 | var insertImageModal = that.container.find('.bootstrap-wysihtml5-insert-image-modal'); 27 | ok(!insertImageModal.hasClass('in'), 'InsertImage modal is hidden'); 28 | 29 | insertImageButton.happen('click'); 30 | 31 | ok(insertImageButton.hasClass('wysihtml5-command-dialog-opened'), 'CreateImage modal is visible (class on button)'); 32 | }; 33 | 34 | var onShow = function(event) { 35 | ok(true, 'show:dialog event was fired'); 36 | setTimeout(function() { 37 | var modal = $(event.dialogContainer); 38 | ok(modal.hasClass('in'), 'CreateImage modal is visible (class on modal)'); 39 | var cancelBtn = modal.find('[data-wysihtml5-dialog-action="cancel"]'); 40 | cancelBtn.happen('click'); 41 | }, 300); 42 | }; 43 | 44 | var onHide = function(event) { 45 | ok(true, 'cancel:dialog event was fired'); 46 | start(); 47 | }; 48 | 49 | var editor = this.editableArea.wysihtml5({ 50 | events: { 51 | 'load': onLoad, 52 | 'show:dialog': onShow, 53 | 'cancel:dialog': onHide 54 | } 55 | }); 56 | 57 | }); 58 | 59 | //Test for issue #82 60 | //Commented out, because it is failing 61 | /* 62 | asyncTest('set_class on img tag', function() { 63 | expect(2); 64 | 65 | var that = this; 66 | 67 | var onLoad = function() { 68 | //find link modal 69 | var insertImageButton = that.container.find('[data-wysihtml5-command="insertImage"]'); 70 | insertImageButton.happen('click'); 71 | }; 72 | 73 | var onShow = function(event) { 74 | ok(true, 'show:dialog event was fired'); 75 | //Wait for modal to fade in 76 | setTimeout(function() { 77 | var modal = event.dialogContainer; 78 | var input = $(modal).find('input').first(); 79 | var saveBtn = $(modal).find('[data-wysihtml5-dialog-action="save"]'); 80 | input.val('http://example.com/example.png'); 81 | saveBtn.happen('click'); 82 | }, 200); 83 | }; 84 | 85 | var onHide = function(event) { 86 | ok(true, 'save:dialog event was fired'); 87 | setTimeout(function() { 88 | QUnit.assert.htmlEqual(that.editableArea.val(), '', 'Class should be inserted into image tag.'); 89 | start(); 90 | }, 200); 91 | }; 92 | 93 | var editor = this.editableArea.wysihtml5({ 94 | toolbar: { 95 | html: true 96 | }, 97 | events: { 98 | 'load': onLoad, 99 | 'show:dialog': onShow, 100 | 'save:dialog': onHide 101 | }, 102 | parserRules: { 103 | classes: { 'mytxtimg': 1 }, 104 | tags: { 'img': 105 | { 'set_class': 'mytxtimg' } 106 | } 107 | } 108 | }); 109 | 110 | }); 111 | */ 112 | } 113 | -------------------------------------------------------------------------------- /test/bs/bootstrap_editor_link_test.js: -------------------------------------------------------------------------------- 1 | if (wysihtml5.browser.supported()) { 2 | 3 | module('bootstrap3-wysihtml5-bower.toolbar.link', { 4 | 5 | setup: function() { 6 | this.container = testhelper.prepareFixtureWithTextarea(); 7 | this.editableArea = testhelper.getEditableArea(); 8 | }, 9 | 10 | teardown: function() { 11 | QUnit.reset(); 12 | } 13 | }); 14 | 15 | asyncTest('open link modal with mouse', function(){ 16 | expect(6); 17 | 18 | var that = this; 19 | 20 | var onLoad = function() { 21 | //find link modal 22 | var createLinkButton = that.container.find('[data-wysihtml5-command="createLink"]'); 23 | ok(createLinkButton.hasClass('btn'), 'Found button link.'); 24 | 25 | var createLinkModal = that.container.find('[data-wysihtml5-dialog="createLink"]'); 26 | ok(!createLinkModal.hasClass('in'), 'CreateLink modal is hidden'); 27 | 28 | createLinkButton.happen('click'); 29 | 30 | ok(createLinkButton.hasClass('wysihtml5-command-dialog-opened'), 'CreateLink modal is visible (class on button)'); 31 | }; 32 | 33 | var onShow = function(event) { 34 | ok(true, 'show:dialog event was fired'); 35 | // 150 is the length of the fade transition 36 | setTimeout(function() { 37 | var modal = $(event.dialogContainer); 38 | ok(modal.hasClass('in'), 'CreateLink modal is visible (class on modal)'); 39 | var cancelBtn = modal.find('[data-wysihtml5-dialog-action="cancel"]'); 40 | cancelBtn.happen('click'); 41 | }, 200); 42 | }; 43 | 44 | var onHide = function(event) { 45 | ok(true, 'cancel:dialog event was fired'); 46 | start(); 47 | }; 48 | 49 | var editor = this.editableArea.wysihtml5({ 50 | events: { 51 | 'load': onLoad, 52 | 'show:dialog': onShow, 53 | 'cancel:dialog': onHide 54 | } 55 | }); 56 | 57 | }); 58 | 59 | asyncTest('open link modal with keyboard', function(){ 60 | expect(6); 61 | 62 | var that = this; 63 | 64 | var onLoad = function() { 65 | //find link modal 66 | var createLinkButton = that.container.find('[data-wysihtml5-command="createLink"]'); 67 | ok(createLinkButton.hasClass('btn'), 'Found button link.'); 68 | 69 | var createLinkModal = that.container.find('[data-wysihtml5-dialog="createLink"]'); 70 | ok(!createLinkModal.hasClass('in'), 'CreateLink modal is hidden'); 71 | 72 | //trigger key Ctrl+k 73 | $(this.composer.editableArea.contentDocument.body).happen({ type: 'keydown', keyCode: 75, ctrlKey: true }); 74 | 75 | ok(createLinkButton.hasClass('wysihtml5-command-dialog-opened'), 'CreateLink modal is visible (class on button)'); 76 | }; 77 | 78 | var onShow = function(event) { 79 | ok(true, 'show:dialog event was fired'); 80 | setTimeout(function() { 81 | var modal = $(event.dialogContainer); 82 | ok(modal.hasClass('in'), 'CreateLink modal is visible (class on modal)'); 83 | modal.happen({ type: 'keydown', keyCode: 27, ctrlKey: false }); 84 | }, 200); 85 | }; 86 | 87 | var onHide = function(event) { 88 | ok(true, 'cancel:dialog event was fired'); 89 | start(); 90 | }; 91 | 92 | var editor = this.editableArea.wysihtml5({ 93 | events: { 94 | 'load': onLoad, 95 | 'show:dialog': onShow, 96 | 'cancel:dialog': onHide 97 | }, 98 | shortcuts: { 99 | '75': 'createLink' //k 100 | } 101 | }); 102 | 103 | }); 104 | } 105 | -------------------------------------------------------------------------------- /test/dom/compare_document_position_test.js: -------------------------------------------------------------------------------- 1 | module("wysihtml5.dom.compareDocumentPosition", { 2 | setup: function() { 3 | this.container = document.createElement("div"); 4 | this.child1 = document.createElement("div"); 5 | this.child2 = document.createElement("div"); 6 | document.body.appendChild(this.container); 7 | this.container.appendChild(this.child1); 8 | this.container.appendChild(this.child2); 9 | }, 10 | 11 | teardown: function() { 12 | this.container.parentNode.removeChild(this.container); 13 | } 14 | }); 15 | 16 | 17 | test("Basic test", function() { 18 | strictEqual(wysihtml5.dom.compareDocumentPosition(this.container, this.child1), 20, 'compareDocumentPosition of nested element'); 19 | strictEqual(wysihtml5.dom.compareDocumentPosition(this.child1, this.child2), 4, 'compareDocumentPosition of sibling element'); 20 | strictEqual(wysihtml5.dom.compareDocumentPosition(this.child1, this.container), 10, 'compareDocumentPosition of parent element'); 21 | }); 22 | -------------------------------------------------------------------------------- /test/dom/contains_test.js: -------------------------------------------------------------------------------- 1 | module("wysihtml5.dom.contains", { 2 | setup: function() { 3 | this.container = document.createElement("div"); 4 | document.body.appendChild(this.container); 5 | }, 6 | 7 | teardown: function() { 8 | this.container.parentNode.removeChild(this.container); 9 | } 10 | }); 11 | 12 | 13 | test("Basic test", function() { 14 | ok(wysihtml5.dom.contains(document.documentElement, document.body)); 15 | ok(wysihtml5.dom.contains(document.body, this.container)); 16 | ok(!wysihtml5.dom.contains(this.container, document.body)); 17 | ok(!wysihtml5.dom.contains(document.body, document.body)); 18 | }); -------------------------------------------------------------------------------- /test/dom/convert_to_list_test.js: -------------------------------------------------------------------------------- 1 | module("wysihtml5.dom.convertToList", { 2 | equal: function(actual, expected, message) { 3 | return QUnit.assert.htmlEqual(actual, expected, message); 4 | }, 5 | 6 | convertToList: function(html, type) { 7 | var container = wysihtml5.dom.getAsDom(html); 8 | document.body.appendChild(container); 9 | wysihtml5.dom.convertToList(container.firstChild, type); 10 | var innerHTML = container.innerHTML; 11 | container.parentNode.removeChild(container); 12 | return innerHTML; 13 | } 14 | }); 15 | 16 | test("Basic tests for UL", function() { 17 | this.equal( 18 | this.convertToList("
    foo
    ", "ul"), 19 | "" 20 | ); 21 | 22 | this.equal( 23 | this.convertToList("", "ul"), 24 | "" 25 | ); 26 | 27 | this.equal( 28 | this.convertToList("foo
    bar
    ", "ul"), 29 | "" 30 | ); 31 | 32 | this.equal( 33 | this.convertToList("foo
    bar
    baz
    ", "ul"), 34 | "" 35 | ); 36 | 37 | this.equal( 38 | this.convertToList("

    yeah

    ", "ul"), 39 | "" 40 | ); 41 | 42 | this.equal( 43 | this.convertToList("foo bar
    foo bar
    ", "ul"), 44 | "" 45 | ); 46 | 47 | this.equal( 48 | this.convertToList("
    foo

    bar
    ", "ul"), 49 | "" 50 | ); 51 | 52 | this.equal( 53 | this.convertToList("
    foo
    bar
    ", "ul"), 54 | "" 55 | ); 56 | }); 57 | 58 | test("Basic tests for OL", function() { 59 | this.equal( 60 | this.convertToList("
    foo
    ", "ol"), 61 | "
    1. foo
    " 62 | ); 63 | 64 | this.equal( 65 | this.convertToList("", "ol"), 66 | "
    " 67 | ); 68 | 69 | this.equal( 70 | this.convertToList("foo
    bar
    ", "ol"), 71 | "
    1. foo
    2. bar
    " 72 | ); 73 | 74 | this.equal( 75 | this.convertToList("foo
    bar
    baz
    ", "ol"), 76 | "
    1. foo
    2. bar
    3. baz
    " 77 | ); 78 | 79 | this.equal( 80 | this.convertToList("

    yeah

    ", "ol"), 81 | "
    1. yeah

    " 82 | ); 83 | }); 84 | 85 | 86 | test("Test whether it doesn't convert dom trees that are already a list", function() { 87 | this.equal( 88 | this.convertToList("
    1. foo
    ", "ol"), 89 | "
    1. foo
    " 90 | ); 91 | 92 | this.equal( 93 | this.convertToList("
  • foo
  • ", "ol"), 94 | "
  • foo
  • " 95 | ); 96 | 97 | this.equal( 98 | this.convertToList("", "ol"), 99 | "" 100 | ); 101 | }); 102 | -------------------------------------------------------------------------------- /test/dom/copy_attributes_test.js: -------------------------------------------------------------------------------- 1 | module("wysihtml5.dom.copyAttributes", { 2 | setup: function() { 3 | this.div = document.createElement("div"); 4 | this.span = document.createElement("span"); 5 | this.anotherDiv = document.createElement("div"); 6 | this.iframe = document.createElement("iframe"); 7 | 8 | this.iframe.src = "javascript:''"; 9 | document.body.appendChild(this.iframe); 10 | }, 11 | 12 | teardown: function() { 13 | this.iframe.parentNode.removeChild(this.iframe); 14 | } 15 | }); 16 | 17 | 18 | test("Basic Tests", function() { 19 | var attributes = { title: "foobar", lang: "en", className: "foo bar" }; 20 | wysihtml5.dom.setAttributes(attributes).on(this.div); 21 | wysihtml5.dom.copyAttributes(["title", "lang", "className"]).from(this.div).to(this.span); 22 | 23 | equal(this.span.title, attributes.title, "Title correctly copied"); 24 | equal(this.span.lang, attributes.lang, "Lang correctly copied"); 25 | equal(this.span.className, attributes.className, "Class correctly copied"); 26 | }); 27 | 28 | 29 | asyncTest("Test copying attributes from one element to another element which is in an iframe", function() { 30 | expect(1); 31 | 32 | var that = this; 33 | 34 | // Timeout needed to make sure that the iframe is ready 35 | setTimeout(function() { 36 | var iframeDocument = that.iframe.contentWindow.document, 37 | iframeElement = iframeDocument.createElement("div"); 38 | 39 | iframeDocument.body.appendChild(iframeElement); 40 | that.span.title = "heya!"; 41 | 42 | wysihtml5.dom 43 | .copyAttributes(["title"]) 44 | .from(that.span) 45 | .to(iframeElement); 46 | 47 | equal(iframeElement.title, "heya!", "Element in iframe correctly got attributes copied over"); 48 | 49 | start(); 50 | }, 1000); 51 | }); -------------------------------------------------------------------------------- /test/dom/delegate_test.js: -------------------------------------------------------------------------------- 1 | module("wysihtml5.dom.delegate", { 2 | setup: function() { 3 | this.container = document.createElement("div"); 4 | this.link1 = document.createElement("a"); 5 | this.link2 = document.createElement("a"); 6 | this.nestedSpan = document.createElement("span"); 7 | 8 | this.link2.appendChild(this.nestedSpan); 9 | this.container.appendChild(this.link1); 10 | this.container.appendChild(this.link2); 11 | 12 | document.body.appendChild(this.container); 13 | }, 14 | 15 | teardown: function() { 16 | this.container.parentNode.removeChild(this.container); 17 | } 18 | }); 19 | 20 | test("Basic test", function() { 21 | expect(3); 22 | 23 | var that = this; 24 | 25 | wysihtml5.dom.delegate(this.container, "a", "click", function(event) { 26 | ok(true, "Callback handler executed"); 27 | equal(this, that.link1, "Callback handler executed in correct scope"); 28 | ok(event.stopPropagation && event.preventDefault, "Parameter passed into callback handler is a proper event object"); 29 | }); 30 | 31 | happen.click(this.link1); 32 | }); 33 | 34 | test("Click on nested element works as well", function() { 35 | expect(3); 36 | 37 | var that = this; 38 | 39 | wysihtml5.dom.delegate(this.container, "a", "click", function(event) { 40 | ok(true, "Callback handler executed"); 41 | equal(this, that.link2, "Callback handler executed in correct scope"); 42 | ok(event.stopPropagation && event.preventDefault, "Parameter passed into callback handler is a proper event object"); 43 | }); 44 | 45 | happen.click(this.nestedSpan); 46 | }); 47 | 48 | test("Delegation on the body", function() { 49 | expect(1); 50 | 51 | var delegater = wysihtml5.dom.delegate(document.body, ".delegation-test", "mousedown", function() { 52 | ok(true, "Callback handler executed"); 53 | }); 54 | 55 | this.link1.className = "delegation-test another-class"; 56 | 57 | happen.mousedown(this.link1); 58 | 59 | delegater.stop(); 60 | 61 | happen.mousedown(this.link1); 62 | }); 63 | -------------------------------------------------------------------------------- /test/dom/dom_node_test.js: -------------------------------------------------------------------------------- 1 | module("wysihtml5.dom.domNode", { 2 | setup: function() { 3 | this.container = document.createElement("div"); 4 | } 5 | }); 6 | 7 | test("Simple .prev() test", function() { 8 | this.container.innerHTML = "
    "; 9 | var lastItem = this.container.querySelector("div"), 10 | firstItem = this.container.querySelector("span"); 11 | equal(wysihtml5.dom.domNode(lastItem).prev(), firstItem); 12 | }); 13 | 14 | test(".prev() test with textnode in between", function() { 15 | this.container.innerHTML = " confusing text node
    "; 16 | var lastItem = this.container.querySelector("div"), 17 | firstItem = this.container.querySelector("span"); 18 | equal(wysihtml5.dom.domNode(lastItem).prev({nodeTypes: [1]}), firstItem); 19 | }); 20 | 21 | test(".prev() test if no prev element exists", function() { 22 | this.container.innerHTML = "
    "; 23 | var lastItem = this.container.querySelector("div"); 24 | equal(wysihtml5.dom.domNode(lastItem).prev(), null); 25 | }); 26 | 27 | test(".prev() test if no prev element exists with textnode", function() { 28 | this.container.innerHTML = "confusing text node
    "; 29 | var lastItem = this.container.querySelector("div"); 30 | equal(wysihtml5.dom.domNode(lastItem).prev({nodeTypes: [1]}), null); 31 | }); 32 | 33 | test(".prev() test with empty textnode in between and ignoreBlankTexts", function() { 34 | this.container.innerHTML = "
    "; 35 | var lastItem = this.container.querySelector("div"), 36 | firstItem = this.container.querySelector("span"); 37 | equal(wysihtml5.dom.domNode(lastItem).prev({ignoreBlankTexts: true}), firstItem); 38 | }); 39 | 40 | test("Simple .next() test", function() { 41 | this.container.innerHTML = "
    "; 42 | var firstItem = this.container.querySelector("div"), 43 | lastItem = this.container.querySelector("span"); 44 | equal(wysihtml5.dom.domNode(firstItem).next(), lastItem); 45 | }); 46 | 47 | test(".next() test with textnode in between", function() { 48 | this.container.innerHTML = "
    confusing text node "; 49 | var firstItem = this.container.querySelector("div"), 50 | lastItem = this.container.querySelector("span"); 51 | equal(wysihtml5.dom.domNode(firstItem).next({nodeTypes: [1]}), lastItem); 52 | }); 53 | 54 | test(".next() test if no next element exists", function() { 55 | this.container.innerHTML = "
    "; 56 | var lastItem = this.container.querySelector("div"); 57 | equal(wysihtml5.dom.domNode(lastItem).next(), null); 58 | }); 59 | 60 | test(".next() test if no next element exists with textnode", function() { 61 | this.container.innerHTML = "
    confusing text node "; 62 | var lastItem = this.container.querySelector("div"); 63 | equal(wysihtml5.dom.domNode(lastItem).next({nodeTypes: [1]}), null); 64 | }); 65 | 66 | test(".next() test with empty textnode in between and ignoreBlankTexts", function() { 67 | this.container.innerHTML = "
    "; 68 | var firstItem = this.container.querySelector("div"), 69 | lastItem = this.container.querySelector("span"); 70 | equal(wysihtml5.dom.domNode(firstItem).next({ignoreBlankTexts: true}), lastItem); 71 | }); -------------------------------------------------------------------------------- /test/dom/get_as_dom_test.js: -------------------------------------------------------------------------------- 1 | module("wysihtml5.dom.getAsDom", { 2 | teardown: function() { 3 | var iframe; 4 | while (iframe = document.querySelector("iframe.wysihtml5-sandbox")) { 5 | iframe.parentNode.removeChild(iframe); 6 | } 7 | } 8 | }); 9 | 10 | test("Basic test", function() { 11 | var result; 12 | 13 | result = wysihtml5.dom.getAsDom('foo'); 14 | equal(result.nodeName, "DIV"); 15 | equal(result.ownerDocument, document); 16 | equal(result.firstChild.nodeName, "SPAN"); 17 | equal(result.childNodes.length , 1); 18 | equal(result.firstChild.innerHTML, "foo"); 19 | ok(!document.getElementById("get-in-dom-element-test")); 20 | 21 | result = wysihtml5.dom.getAsDom("1 2"); 22 | equal(result.childNodes.length, 3); 23 | 24 | result = wysihtml5.dom.getAsDom(document.createElement("div")); 25 | equal(result.innerHTML.toLowerCase(), "
    "); 26 | }); 27 | 28 | 29 | test("HTML5 elements", function() { 30 | var result; 31 | 32 | result = wysihtml5.dom.getAsDom("
    foo
    "); 33 | equal(result.firstChild.nodeName.toLowerCase(), "article"); 34 | equal(result.firstChild.innerHTML.toLowerCase(), "foo"); 35 | 36 | result = wysihtml5.dom.getAsDom("foo"); 37 | equal(result.innerHTML.toLowerCase(), "foo"); 38 | }); 39 | 40 | 41 | asyncTest("Different document context", function() { 42 | expect(2); 43 | 44 | new wysihtml5.dom.Sandbox(function(sandbox) { 45 | var result; 46 | 47 | result = wysihtml5.dom.getAsDom("
    hello
    ", sandbox.getDocument()); 48 | equal(result.firstChild.ownerDocument, sandbox.getDocument()); 49 | 50 | result = wysihtml5.dom.getAsDom("
    hello
    ", sandbox.getDocument()); 51 | equal(result.innerHTML.toLowerCase(), "
    hello
    "); 52 | 53 | start(); 54 | }).insertInto(document.body); 55 | }); -------------------------------------------------------------------------------- /test/dom/get_next_previous_element.js: -------------------------------------------------------------------------------- 1 | module("wysihtml5.dom.getPrevElement", { 2 | setup: function() { 3 | this.container = document.createElement("div"); 4 | } 5 | }); 6 | 7 | test("Find simple prev element", function() { 8 | this.container.innerHTML = "
    "; 9 | var lastItem = this.container.querySelector("div"), 10 | firstItem = this.container.querySelector("span"); 11 | equal(wysihtml5.dom.getPreviousElement(lastItem), firstItem); 12 | }); 13 | 14 | test("Find previous element with textnode in between", function() { 15 | this.container.innerHTML = " confusing text node
    "; 16 | var lastItem = this.container.querySelector("div"), 17 | firstItem = this.container.querySelector("span"); 18 | equal(wysihtml5.dom.getPreviousElement(lastItem), firstItem); 19 | }); 20 | 21 | test("Find previous element if none exists", function() { 22 | this.container.innerHTML = "
    "; 23 | var lastItem = this.container.querySelector("div"); 24 | equal(wysihtml5.dom.getPreviousElement(lastItem), null); 25 | }); 26 | 27 | test("Find previous element if none exists with textnode", function() { 28 | this.container.innerHTML = "confusing text node
    "; 29 | var lastItem = this.container.querySelector("div"); 30 | equal(wysihtml5.dom.getPreviousElement(lastItem), null); 31 | }); 32 | 33 | 34 | module("wysihtml5.dom.getNextElement", { 35 | setup: function() { 36 | this.container = document.createElement("div"); 37 | } 38 | }); 39 | 40 | test("Find simple next element", function() { 41 | this.container.innerHTML = "
    "; 42 | var firstItem = this.container.querySelector("div"), 43 | lastItem = this.container.querySelector("span"); 44 | equal(wysihtml5.dom.getNextElement(firstItem), lastItem); 45 | }); 46 | 47 | test("Find next element with textnode in between", function() { 48 | this.container.innerHTML = "
    confusing text node "; 49 | var firstItem = this.container.querySelector("div"), 50 | lastItem = this.container.querySelector("span"); 51 | equal(wysihtml5.dom.getNextElement(firstItem), lastItem); 52 | }); 53 | 54 | test("Find next element if none exists", function() { 55 | this.container.innerHTML = "
    "; 56 | var lastItem = this.container.querySelector("div"); 57 | equal(wysihtml5.dom.getNextElement(lastItem), null); 58 | }); 59 | 60 | test("Find next element if none exists with textnode", function() { 61 | this.container.innerHTML = "
    confusing text node "; 62 | var lastItem = this.container.querySelector("div"); 63 | equal(wysihtml5.dom.getNextElement(lastItem), null); 64 | }); -------------------------------------------------------------------------------- /test/dom/get_style_test.js: -------------------------------------------------------------------------------- 1 | module("wysihtml5.dom.getStyle", { 2 | setup: function() { 3 | this.container = document.createElement("div"); 4 | document.body.appendChild(this.container); 5 | }, 6 | 7 | teardown: function() { 8 | this.container.parentNode.removeChild(this.container); 9 | } 10 | }); 11 | 12 | 13 | test("Basic test", function() { 14 | wysihtml5.dom.insertCSS([ 15 | ".test-element-2 { position: absolute }" 16 | ]).into(document); 17 | 18 | this.container.innerHTML = 'hello'; 19 | this.container.innerHTML += 'hello'; 20 | this.container.innerHTML += ''; 21 | this.container.innerHTML += '
    '; 22 | 23 | equal( 24 | wysihtml5.dom.getStyle("float").from(this.container.getElementsByTagName("span")[0]), 25 | "left" 26 | ); 27 | 28 | equal( 29 | wysihtml5.dom.getStyle("position").from(this.container.getElementsByTagName("span")[1]), 30 | "absolute" 31 | ); 32 | 33 | equal( 34 | wysihtml5.dom.getStyle("display").from(this.container.getElementsByTagName("div")[0]), 35 | "block" 36 | ); 37 | 38 | equal( 39 | wysihtml5.dom.getStyle("display").from(this.container.getElementsByTagName("i")[0]), 40 | "inline" 41 | ); 42 | }); 43 | 44 | 45 | test("Textarea width/height when value causes overflow", function() { 46 | var textarea = document.createElement("textarea"); 47 | textarea.style.width = "500px"; 48 | textarea.style.height = "200px"; 49 | textarea.value = Array(500).join("Lorem ipsum dolor foo bar"); 50 | this.container.appendChild(textarea); 51 | 52 | equal(wysihtml5.dom.getStyle("width") .from(textarea), "500px"); 53 | equal(wysihtml5.dom.getStyle("height") .from(textarea), "200px"); 54 | }); -------------------------------------------------------------------------------- /test/dom/has_element_with_class_name_test.js: -------------------------------------------------------------------------------- 1 | if ("querySelector" in document || wysihtml5.browser.supportsNativeGetElementsByClassName()) { 2 | module("wysihtml5.dom.hasElementWithClassName", { 3 | teardown: function() { 4 | var iframe; 5 | while (iframe = document.querySelector("iframe.wysihtml5-sandbox")) { 6 | iframe.parentNode.removeChild(iframe); 7 | } 8 | } 9 | }); 10 | 11 | 12 | asyncTest("Basic test", function() { 13 | expect(3); 14 | 15 | new wysihtml5.dom.Sandbox(function(sandbox) { 16 | var doc = sandbox.getDocument(), 17 | tempElement = doc.createElement("i"); 18 | tempElement.className = "wysiwyg-color-aqua"; 19 | 20 | ok(!wysihtml5.dom.hasElementWithClassName(doc, "wysiwyg-color-aqua")); 21 | doc.body.appendChild(tempElement); 22 | ok(wysihtml5.dom.hasElementWithClassName(doc, "wysiwyg-color-aqua")); 23 | tempElement.parentNode.removeChild(tempElement); 24 | ok(!wysihtml5.dom.hasElementWithClassName(doc, "wysiwyg-color-aqua")); 25 | 26 | start(); 27 | }).insertInto(document.body); 28 | }); 29 | } 30 | -------------------------------------------------------------------------------- /test/dom/has_element_with_tag_name_test.js: -------------------------------------------------------------------------------- 1 | module("wysihtml5.dom.hasElementWithTagName", { 2 | teardown: function() { 3 | var iframe; 4 | while (iframe = document.querySelector("iframe.wysihtml5-sandbox")) { 5 | iframe.parentNode.removeChild(iframe); 6 | } 7 | } 8 | }); 9 | 10 | 11 | asyncTest("Basic test", function() { 12 | expect(3); 13 | 14 | new wysihtml5.dom.Sandbox(function(sandbox) { 15 | var doc = sandbox.getDocument(), 16 | tempElement = doc.createElement("i"); 17 | ok(!wysihtml5.dom.hasElementWithTagName(doc, "I")); 18 | doc.body.appendChild(tempElement); 19 | ok(wysihtml5.dom.hasElementWithTagName(doc, "I")); 20 | tempElement.parentNode.removeChild(tempElement); 21 | ok(!wysihtml5.dom.hasElementWithTagName(doc, "I")); 22 | 23 | start(); 24 | }).insertInto(document.body); 25 | }); -------------------------------------------------------------------------------- /test/dom/insert_css_test.js: -------------------------------------------------------------------------------- 1 | if (wysihtml5.browser.supported()) { 2 | 3 | module("wysihtml5.dom.insertCSS", { 4 | teardown: function() { 5 | var iframe; 6 | while (iframe = document.querySelector("iframe.wysihtml5-sandbox")) { 7 | iframe.parentNode.removeChild(iframe); 8 | } 9 | } 10 | }); 11 | 12 | asyncTest("Basic Tests", function() { 13 | expect(3); 14 | 15 | new wysihtml5.dom.Sandbox(function(sandbox) { 16 | var doc = sandbox.getDocument(), 17 | body = doc.body, 18 | element = doc.createElement("sub"); 19 | 20 | body.appendChild(element); 21 | 22 | wysihtml5.dom.insertCSS([ 23 | "sub { display: block; text-align: right; }", 24 | "body { text-indent: 50px; }" 25 | ]).into(doc); 26 | 27 | equal(wysihtml5.dom.getStyle("display") .from(element), "block"); 28 | equal(wysihtml5.dom.getStyle("text-align") .from(element), "right"); 29 | equal(wysihtml5.dom.getStyle("text-indent").from(element), "50px"); 30 | 31 | start(); 32 | }).insertInto(document.body); 33 | }); 34 | 35 | asyncTest("Check whether CSS is inserted before any loaded stylesheets", function() { 36 | expect(1); 37 | 38 | new wysihtml5.dom.Sandbox(function(sandbox) { 39 | var doc = sandbox.getDocument(); 40 | 41 | wysihtml5.dom.insertCSS([".foo {}"]).into(doc); 42 | 43 | ok(doc.querySelector("style[type='text/css'] + link[rel=stylesheet]"), "CSS has been inserted before any included stylesheet"); 44 | 45 | start(); 46 | }, { 47 | stylesheets: "https://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/themes/blitzer/jquery-ui.css" 48 | }).insertInto(document.body); 49 | }); 50 | 51 | } -------------------------------------------------------------------------------- /test/dom/observe_test.js: -------------------------------------------------------------------------------- 1 | module("wysihtml5.dom.observe", { 2 | setup: function() { 3 | this.container = document.createElement("div"); 4 | this.element = document.createElement("textarea"); 5 | this.container.appendChild(this.element); 6 | document.body.appendChild(this.container); 7 | }, 8 | 9 | teardown: function() { 10 | this.container.parentNode.removeChild(this.container); 11 | 12 | var iframe; 13 | while (iframe = document.querySelector("iframe.wysihtml5-sandbox")) { 14 | iframe.parentNode.removeChild(iframe); 15 | } 16 | } 17 | }); 18 | 19 | 20 | test("Basic test", function() { 21 | expect(4); 22 | 23 | var element = this.element; 24 | 25 | wysihtml5.dom.observe(element, ["mouseover", "mouseout"], function(event) { 26 | ok(true, "'" + event.type + "' correctly fired"); 27 | }); 28 | 29 | wysihtml5.dom.observe(element, "click", function(event) { 30 | equal(event.target, element, "event.target or event.srcElement are set"); 31 | ok(true, "'click' correctly fired"); 32 | }); 33 | 34 | happen.once(element, {type: "mouseover"}); 35 | happen.once(element, {type: "mouseout"}); 36 | happen.once(element, {type: "click"}); 37 | }); 38 | 39 | 40 | test("Test stopPropagation and scope of event handler", function(event) { 41 | expect(2); 42 | var element = this.element; 43 | 44 | wysihtml5.dom.observe(this.container, "click", function(event) { 45 | ok(false, "The event shouldn't have been bubbled!"); 46 | }); 47 | 48 | wysihtml5.dom.observe(this.element, "click", function(event) { 49 | event.stopPropagation(); 50 | equal(this, element, "Event handler bound to correct scope"); 51 | ok(true, "stopPropagation correctly fired"); 52 | }); 53 | 54 | happen.once(this.element, {type: "click"}); 55 | }); 56 | 57 | test("Test detaching events", function() { 58 | expect(0); 59 | var eventListener = wysihtml5.dom.observe(this.element, "click", function() { 60 | ok(false, "This should not be triggered"); 61 | }); 62 | 63 | eventListener.stop(); 64 | happen.once(this.element, {type: "click"}); 65 | }); 66 | 67 | asyncTest("Advanced test observing within a sandboxed iframe", function() { 68 | expect(2); 69 | 70 | var sandbox = new wysihtml5.dom.Sandbox(function() { 71 | var element = sandbox.getDocument().createElement("div"); 72 | sandbox.getDocument().body.appendChild(element); 73 | wysihtml5.dom.observe(element, ["click", "mousedown"], function(event) { 74 | ok(true, "'" + event.type + "' correctly fired"); 75 | }); 76 | happen.click(element); 77 | happen.mousedown(element); 78 | 79 | start(); 80 | }); 81 | 82 | sandbox.insertInto(document.body); 83 | }); 84 | -------------------------------------------------------------------------------- /test/dom/rename_element_test.js: -------------------------------------------------------------------------------- 1 | module("wysihtml5.dom.renameElement", { 2 | equal: function(actual, expected, message) { 3 | return QUnit.assert.htmlEqual(actual, expected, message); 4 | }, 5 | 6 | renameElement: function(html, newNodeName) { 7 | var container = wysihtml5.dom.getAsDom(html); 8 | wysihtml5.dom.renameElement(container.firstChild, newNodeName); 9 | return container.innerHTML; 10 | } 11 | }); 12 | 13 | test("Basic tests", function() { 14 | this.equal( 15 | this.renameElement("

    foo

    ", "div"), 16 | "
    foo
    " 17 | ); 18 | 19 | this.equal( 20 | this.renameElement("", "ol"), 21 | "
    1. foo
    " 22 | ); 23 | 24 | this.equal( 25 | this.renameElement('

    ', "h2"), 26 | '

    ' 27 | ); 28 | }); 29 | -------------------------------------------------------------------------------- /test/dom/resolve_list_test.js: -------------------------------------------------------------------------------- 1 | module("wysihtml5.dom.resolveList", { 2 | equal: function(actual, expected, message) { 3 | return QUnit.assert.htmlEqual(actual, expected, message); 4 | }, 5 | 6 | resolveList: function(html, useLineBreaks) { 7 | var container = wysihtml5.dom.getAsDom(html); 8 | document.body.appendChild(container); 9 | wysihtml5.dom.resolveList(container.firstChild, useLineBreaks); 10 | var innerHTML = container.innerHTML; 11 | container.parentNode.removeChild(container); 12 | return innerHTML; 13 | } 14 | }); 15 | 16 | test("Basic tests (useLineBreaks = true)", function() { 17 | this.equal( 18 | this.resolveList("", true), 19 | "foo
    " 20 | ); 21 | 22 | this.equal( 23 | this.resolveList("", true), 24 | "foo
    bar
    " 25 | ); 26 | 27 | this.equal( 28 | this.resolveList("
    1. foo
    2. bar
    ", true), 29 | "foo
    bar
    " 30 | ); 31 | 32 | this.equal( 33 | this.resolveList("
    1. bar
    ", true), 34 | "bar
    " 35 | ); 36 | 37 | this.equal( 38 | this.resolveList("
    1. foo
    2. bar
    ", true), 39 | "foo
    bar
    " 40 | ); 41 | 42 | this.equal( 43 | this.resolveList("", true), 44 | "

    foo

    bar
    baz
    " 45 | ); 46 | }); 47 | 48 | test("Basic tests (useLineBreaks = false)", function() { 49 | this.equal( 50 | this.resolveList(""), 51 | "

    foo

    " 52 | ); 53 | 54 | this.equal( 55 | this.resolveList(""), 56 | "

    foo

    bar

    " 57 | ); 58 | 59 | this.equal( 60 | this.resolveList("
    1. foo
    2. bar
    "), 61 | "

    foo

    bar

    " 62 | ); 63 | 64 | this.equal( 65 | this.resolveList("
    1. bar
    "), 66 | "

    bar

    " 67 | ); 68 | 69 | this.equal( 70 | this.resolveList("
    1. foo
    2. bar
    "), 71 | "

    foo

    bar

    " 72 | ); 73 | 74 | this.equal( 75 | this.resolveList(""), 76 | "

    foo

    bar

    baz

    " 77 | ); 78 | }); 79 | -------------------------------------------------------------------------------- /test/dom/set_attributes_test.js: -------------------------------------------------------------------------------- 1 | module("wysihtml5.dom.setAttributes", { 2 | setup: function() { 3 | this.element = document.createElement("div"); 4 | } 5 | }); 6 | 7 | test("Basic test", function() { 8 | wysihtml5.dom.setAttributes({ 9 | id: "foo", 10 | "class": "bar" 11 | }).on(this.element); 12 | 13 | equal(this.element.id, "foo"); 14 | equal(this.element.className, "bar"); 15 | }); -------------------------------------------------------------------------------- /test/dom/set_styles_test.js: -------------------------------------------------------------------------------- 1 | module("wysihtml5.dom.setStyles", { 2 | setup: function() { 3 | this.element = document.createElement("div"); 4 | document.body.appendChild(this.element); 5 | }, 6 | 7 | teardown: function() { 8 | this.element.parentNode.removeChild(this.element); 9 | } 10 | }); 11 | 12 | test("Basic test", function() { 13 | wysihtml5.dom.setStyles("text-align: right; float: left").on(this.element); 14 | equal(wysihtml5.dom.getStyle("text-align").from(this.element), "right"); 15 | equal(wysihtml5.dom.getStyle("float").from(this.element), "left"); 16 | 17 | wysihtml5.dom.setStyles({ "float": "right" }).on(this.element); 18 | equal(wysihtml5.dom.getStyle("float").from(this.element), "right"); 19 | }); -------------------------------------------------------------------------------- /test/dom/unwrap_test.js: -------------------------------------------------------------------------------- 1 | module("wysihtml5.dom.unwrap", { 2 | setup: function() { 3 | this.inner = "test

    tes2

    "; 4 | this.container = document.createElement("div"); 5 | this.containerInner = document.createElement("div"); 6 | this.containerInner.innerHTML = this.inner; 7 | this.container.appendChild(this.containerInner); 8 | } 9 | }); 10 | 11 | test("Basic test", function() { 12 | wysihtml5.dom.unwrap(this.containerInner); 13 | equal(this.container.innerHTML, this.inner, "Unwrapping element works splendid."); 14 | }); 15 | -------------------------------------------------------------------------------- /test/incompatible_test.js: -------------------------------------------------------------------------------- 1 | module("wysihtml5 - Incompatible", { 2 | setup: function() { 3 | this.originalSupportCheck = wysihtml5.browser.supported; 4 | wysihtml5.browser.supported = function() { return false; }; 5 | 6 | this.textareaElement = document.createElement("textarea"); 7 | document.body.appendChild(this.textareaElement); 8 | }, 9 | 10 | teardown: function() { 11 | wysihtml5.browser.supported = this.originalSupportCheck; 12 | this.textareaElement.parentNode.removeChild(this.textareaElement); 13 | } 14 | }); 15 | 16 | 17 | asyncTest("Basic test", function() { 18 | expect(12); 19 | 20 | var that = this; 21 | 22 | var oldIframesLength = document.getElementsByTagName("iframe").length; 23 | 24 | var oldInputsLength = document.getElementsByTagName("input").length; 25 | 26 | var editor = new wysihtml5.Editor(this.textareaElement); 27 | editor.on("load", function() { 28 | ok(true, "'load' event correctly triggered"); 29 | ok(!wysihtml5.dom.hasClass(document.body, "wysihtml5-supported"), " didn't receive the 'wysihtml5-supported' class"); 30 | ok(!editor.isCompatible(), "isCompatible returns false when rich text editing is not correctly supported in the current browser"); 31 | equal(that.textareaElement.style.display, "", "Textarea is visible"); 32 | ok(!editor.composer, "Composer not initialized"); 33 | 34 | equal(document.getElementsByTagName("iframe").length, oldIframesLength, "No hidden field has been inserted into the dom"); 35 | equal(document.getElementsByTagName("input").length, oldInputsLength, "Composer not initialized"); 36 | 37 | var html = "foobar
    "; 38 | editor.setValue(html); 39 | equal(that.textareaElement.value, html); 40 | equal(editor.getValue(), html); 41 | editor.clear(); 42 | equal(that.textareaElement.value, ""); 43 | 44 | editor.on("focus", function() { 45 | ok(true, "Generic 'focus' event fired"); 46 | }); 47 | 48 | editor.on("focus:textarea", function() { 49 | ok(true, "Specific 'focus:textarea' event fired"); 50 | }); 51 | 52 | editor.on("focus:composer", function() { 53 | ok(false, "Specific 'focus:composer' event fired, and that's wrong, there shouldn't be a composer element/view"); 54 | }); 55 | 56 | var eventOptions = {}; 57 | eventOptions.type = wysihtml5.browser.supportsEvent("focusin") ? "focusin" : "focus"; 58 | happen.once(that.textareaElement, eventOptions); 59 | 60 | start(); 61 | }); 62 | }); 63 | -------------------------------------------------------------------------------- /test/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | wysihtml5 - Test Suite 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 69 | 70 |

    wysihtml5 - Test Suite

    71 |

    72 |
    73 |

    74 |
      75 |
      76 | -------------------------------------------------------------------------------- /test/karma/test-main.js: -------------------------------------------------------------------------------- 1 | var allTestFiles = []; 2 | var TEST_REGEXP = /(spec|test)\.js$/i; 3 | 4 | var pathToModule = function(path) { 5 | return path.replace(/^\/base\//, '').replace(/\.js$/, ''); 6 | }; 7 | 8 | Object.keys(window.__karma__.files).forEach(function(file) { 9 | if (TEST_REGEXP.test(file)) { 10 | // Normalize paths to RequireJS module names. 11 | allTestFiles.push(pathToModule(file)); 12 | } 13 | }); 14 | 15 | -------------------------------------------------------------------------------- /test/karma/testframework_test.js: -------------------------------------------------------------------------------- 1 | module('bootstrap3-wysihtml5-bower.testframework', { 2 | 3 | }); 4 | test("if test runner framework is working", function(){ 5 | ok(true, "hope it works"); 6 | }); 7 | -------------------------------------------------------------------------------- /test/lang/array_test.js: -------------------------------------------------------------------------------- 1 | module("wysihtml5.lang.array"); 2 | 3 | test("contains()", function() { 4 | var arr = [1, "2", "foo"]; 5 | ok(wysihtml5.lang.array(arr).contains(1)); 6 | ok(!wysihtml5.lang.array(arr).contains(2)); 7 | ok(wysihtml5.lang.array(arr).contains("2")); 8 | ok(wysihtml5.lang.array(arr).contains("foo")); 9 | }); 10 | 11 | test("without()", function() { 12 | var arr = [1, 2, 3]; 13 | deepEqual(wysihtml5.lang.array(arr).without([1]), [2, 3]); 14 | deepEqual(wysihtml5.lang.array(arr).without([4]), [1, 2, 3]); 15 | }); 16 | 17 | test("get()", function() { 18 | var nodeList = document.getElementsByTagName("*"), 19 | arr = wysihtml5.lang.array(nodeList).get(); 20 | equal(arr.length, nodeList.length); 21 | ok(arr instanceof Array); 22 | }); -------------------------------------------------------------------------------- /test/lang/object_test.js: -------------------------------------------------------------------------------- 1 | module("wysihtml5.lang.object"); 2 | 3 | test("merge()", function() { 4 | var obj = { foo: 1, bar: 1 }, 5 | returnValue = wysihtml5.lang.object(obj).merge({ bar: 2, baz: 3 }).get(); 6 | equal(returnValue, obj); 7 | deepEqual(obj, { foo: 1, bar: 2, baz: 3 }); 8 | }); 9 | 10 | test("clone()", function() { 11 | var obj = { foo: true }, 12 | returnValue = wysihtml5.lang.object(obj).clone(); 13 | ok(obj != returnValue); 14 | deepEqual(obj, returnValue); 15 | }); 16 | 17 | test("deep clone()", function() { 18 | var obj = { 19 | boo : { 20 | foo: true 21 | } 22 | }, 23 | returnValueShallow = wysihtml5.lang.object(obj).clone(), 24 | returnValueDeep = wysihtml5.lang.object(obj).clone(true); 25 | 26 | ok(obj != returnValueShallow && obj.boo === returnValueShallow.boo); 27 | deepEqual(obj, returnValueShallow); 28 | 29 | ok(obj != returnValueDeep && obj.boo !== returnValueDeep.boo); 30 | deepEqual(obj, returnValueDeep); 31 | }); 32 | 33 | test("isArray()", function() { 34 | ok(wysihtml5.lang.object([]).isArray()); 35 | ok(!wysihtml5.lang.object({}).isArray()); 36 | ok(!wysihtml5.lang.object(document.body.childNodes).isArray()); 37 | ok(!wysihtml5.lang.object("1,2,3").isArray()); 38 | }); 39 | 40 | test("isFunction()", function() { 41 | ok(wysihtml5.lang.object(function() {}).isFunction()); 42 | ok(!wysihtml5.lang.object({}).isFunction()); 43 | ok(!wysihtml5.lang.object([]).isFunction()); 44 | ok(!wysihtml5.lang.object(document.body.childNodes).isFunction()); 45 | ok(!wysihtml5.lang.object("1,2,3").isFunction()); 46 | }); -------------------------------------------------------------------------------- /test/lang/string_test.js: -------------------------------------------------------------------------------- 1 | module("wysihtml5.lang.string"); 2 | 3 | test("trim()", function() { 4 | equal(wysihtml5.lang.string(" foo \n").trim(), "foo"); 5 | }); 6 | 7 | test("interpolate()", function() { 8 | equal( 9 | wysihtml5.lang.string("Hello #{name}, I LOVE YOUR NAME. IT'S VERY GERMAN AND SOUNDS STRONG.").interpolate({ name: "Reinhold" }), 10 | "Hello Reinhold, I LOVE YOUR NAME. IT'S VERY GERMAN AND SOUNDS STRONG." 11 | ); 12 | }); 13 | 14 | test("replace()", function() { 15 | equal( 16 | wysihtml5.lang.string("I LOVE CAKE").replace("CAKE").by("BOOBS"), 17 | "I LOVE BOOBS" 18 | ); 19 | }); 20 | 21 | test("escapeHTML()", function() { 22 | equal(wysihtml5.lang.string('&<>"').escapeHTML(), "&<>""); 23 | }); -------------------------------------------------------------------------------- /test/testhelper.js: -------------------------------------------------------------------------------- 1 | testhelper = { 2 | //Fixture 3 | fixtureID: 'qunit-fixture', 4 | getFixtureSelector: function() { 5 | return '#' + this.fixtureID; 6 | }, 7 | fixtureExists: function() { 8 | return this.getFixture().length > 0; 9 | }, 10 | prepareFixture: function() { 11 | var qunitFixture; 12 | if(!this.fixtureExists()) { 13 | qunitFixture = $('
      '); 14 | qunitFixture.attr('id', this.fixtureID); 15 | $('body').append(qunitFixture); 16 | } 17 | this.resetFixture(); 18 | return this.getFixture(); 19 | }, 20 | getFixture: function() { 21 | return $(this.getFixtureSelector()); 22 | }, 23 | resetFixture: function() { 24 | this.getFixture().empty(); 25 | }, 26 | //Container 27 | editableAreaID: 'wysihtml5-test-editable', 28 | getEditableAreaSelector: function() { 29 | return '#' + this.editableAreaID; 30 | }, 31 | editableAreaClass: 'wysihtml5-test-class', 32 | containerID: 'container', 33 | getContainerSelector: function() { 34 | return '#' + this.containerID; 35 | }, 36 | createContainer: function() { 37 | var div = $('
      '); 38 | div.attr('id', this.containerID); 39 | return div; 40 | }, 41 | setEditableAreaClassAndID: function(el) { 42 | el.attr('id', this.editableAreaID); 43 | el.addClass(this.editableAreaClass); 44 | return el; 45 | }, 46 | createEditableAreaDiv: function() { 47 | var editableArea = $('
      '); 48 | return this.setEditableAreaClassAndID(editableArea); 49 | }, 50 | createEditableAreaTextarea: function() { 51 | var editableArea = $(''); 52 | return this.setEditableAreaClassAndID(editableArea); 53 | }, 54 | prepareDiv: function() { 55 | var div = this.createContainer(); 56 | div.append(this.createEditableAreaDiv()); 57 | return div; 58 | }, 59 | prepareTextarea: function() { 60 | var div = this.createContainer(); 61 | div.append(this.createEditableAreaTextarea()); 62 | return div; 63 | }, 64 | getEditableArea: function() { 65 | return $(this.getEditableAreaSelector()); 66 | }, 67 | //put all together 68 | //returns container 69 | prepareFixtureWithDiv: function() { 70 | var fixture = this.prepareFixture(), 71 | container = this.prepareDiv(); 72 | fixture.append(container); 73 | return container; 74 | }, 75 | prepareFixtureWithTextarea: function() { 76 | var fixture = this.prepareFixture(), 77 | container = this.prepareTextarea(); 78 | fixture.append(container); 79 | return container; 80 | } 81 | }; 82 | -------------------------------------------------------------------------------- /test/undo_manager_test.js: -------------------------------------------------------------------------------- 1 | if (wysihtml5.browser.supportsCommand(document, "insertHTML")) { 2 | 3 | module("wysihtml5.UndoManager", { 4 | setup: function() { 5 | this.textareaElement = document.createElement("textarea"); 6 | this.textareaElement.value = "1"; 7 | 8 | document.body.appendChild(this.textareaElement); 9 | }, 10 | 11 | teardown: function() { 12 | var leftover; 13 | while (leftover = document.querySelector("iframe.wysihtml5-sandbox, input[name='_wysihtml5_mode']")) { 14 | leftover.parentNode.removeChild(leftover); 15 | } 16 | document.body.removeChild(this.textareaElement); 17 | }, 18 | 19 | triggerUndo: function(editor) { 20 | this.triggerKey(editor, 90); 21 | }, 22 | 23 | triggerRedo: function(editor) { 24 | this.triggerKey(editor, 89); 25 | }, 26 | 27 | triggerKey: function(editor, keyCode) { 28 | var event; 29 | try { 30 | event = editor.composer.sandbox.getDocument().createEvent("KeyEvents"); 31 | event.initKeyEvent("keydown", true, true, editor.composer.sandbox.getWindow(), true, false, false, false, keyCode, keyCode); 32 | } catch(e) { 33 | event = editor.composer.sandbox.getDocument().createEvent("Events"); 34 | event.initEvent("keydown", true, true); 35 | event.ctrlKey = true; 36 | event.keyCode = keyCode; 37 | } 38 | editor.composer.element.dispatchEvent(event); 39 | } 40 | }); 41 | 42 | 43 | asyncTest("Basic test", function() { 44 | expect(5); 45 | 46 | var that = this, 47 | editor = new wysihtml5.Editor(this.textareaElement); 48 | editor.on("load", function() { 49 | editor.setValue("1 2").fire("newword:composer"); 50 | editor.setValue("1 2 3").fire("newword:composer"); 51 | editor.setValue("1 2 3 4").fire("newword:composer"); 52 | editor.setValue("1 2 3 4 5"); 53 | 54 | that.triggerUndo(editor); 55 | equal(editor.getValue(false, false), "1 2 3 4"); 56 | that.triggerRedo(editor); 57 | that.triggerRedo(editor); 58 | equal(editor.getValue(false, false), "1 2 3 4 5"); 59 | that.triggerUndo(editor); 60 | that.triggerUndo(editor); 61 | equal(editor.getValue(false, false), "1 2 3"); 62 | that.triggerUndo(editor); 63 | that.triggerUndo(editor); 64 | equal(editor.getValue(false, false), "1"); 65 | that.triggerUndo(editor); 66 | that.triggerUndo(editor); 67 | equal(editor.getValue(false, false), "1"); 68 | 69 | start(); 70 | }); 71 | }); 72 | 73 | 74 | asyncTest("Test commands", function() { 75 | expect(3); 76 | 77 | var that = this, 78 | editor = new wysihtml5.Editor(this.textareaElement); 79 | editor.on("load", function() { 80 | editor.setValue("1").fire("beforecommand:composer"); 81 | editor.setValue("1").fire("beforecommand:composer"); 82 | 83 | that.triggerUndo(editor); 84 | equal(editor.getValue(false, false), "1"); 85 | that.triggerRedo(editor); 86 | equal(editor.getValue(false, false), "1"); 87 | that.triggerUndo(editor); 88 | that.triggerUndo(editor); 89 | equal(editor.getValue(false, false), "1"); 90 | 91 | start(); 92 | }); 93 | }); 94 | } 95 | --------------------------------------------------------------------------------