wysiwyg-rails 3.2.6 → 4.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/froala_editor.min.js +2 -2
- data/app/assets/javascripts/froala_editor.pkgd.min.js +2 -2
- data/app/assets/javascripts/languages/ar.js +1 -1
- data/app/assets/javascripts/languages/bs.js +1 -1
- data/app/assets/javascripts/languages/cs.js +1 -1
- data/app/assets/javascripts/languages/da.js +1 -1
- data/app/assets/javascripts/languages/de.js +1 -1
- data/app/assets/javascripts/languages/el.js +1 -1
- data/app/assets/javascripts/languages/en_ca.js +1 -1
- data/app/assets/javascripts/languages/en_gb.js +1 -1
- data/app/assets/javascripts/languages/es.js +20 -1
- data/app/assets/javascripts/languages/et.js +1 -1
- data/app/assets/javascripts/languages/fa.js +1 -1
- data/app/assets/javascripts/languages/fi.js +1 -1
- data/app/assets/javascripts/languages/fr.js +5 -1
- data/app/assets/javascripts/languages/he.js +1 -1
- data/app/assets/javascripts/languages/hr.js +1 -1
- data/app/assets/javascripts/languages/hu.js +1 -1
- data/app/assets/javascripts/languages/id.js +1 -1
- data/app/assets/javascripts/languages/it.js +18 -3
- data/app/assets/javascripts/languages/ja.js +1 -1
- data/app/assets/javascripts/languages/ko.js +40 -12
- data/app/assets/javascripts/languages/ku.js +1 -1
- data/app/assets/javascripts/languages/me.js +1 -1
- data/app/assets/javascripts/languages/nb.js +1 -1
- data/app/assets/javascripts/languages/nl.js +1 -1
- data/app/assets/javascripts/languages/pl.js +18 -1
- data/app/assets/javascripts/languages/pt_br.js +1 -1
- data/app/assets/javascripts/languages/pt_pt.js +18 -1
- data/app/assets/javascripts/languages/ro.js +1 -1
- data/app/assets/javascripts/languages/ru.js +1 -1
- data/app/assets/javascripts/languages/sk.js +1 -1
- data/app/assets/javascripts/languages/sl.js +1 -1
- data/app/assets/javascripts/languages/sr.js +1 -1
- data/app/assets/javascripts/languages/sv.js +1 -1
- data/app/assets/javascripts/languages/th.js +1 -1
- data/app/assets/javascripts/languages/tr.js +1 -1
- data/app/assets/javascripts/languages/uk.js +1 -1
- data/app/assets/javascripts/languages/vi.js +1 -1
- data/app/assets/javascripts/languages/zh_cn.js +1 -1
- data/app/assets/javascripts/languages/zh_tw.js +1 -1
- data/app/assets/javascripts/plugins/align.min.js +1 -1
- data/app/assets/javascripts/plugins/char_counter.min.js +2 -2
- data/app/assets/javascripts/plugins/code_beautifier.min.js +1 -1
- data/app/assets/javascripts/plugins/code_view.min.js +1 -1
- data/app/assets/javascripts/plugins/colors.min.js +1 -1
- data/app/assets/javascripts/plugins/cryptojs.min.js +1 -1
- data/app/assets/javascripts/plugins/draggable.min.js +1 -1
- data/app/assets/javascripts/plugins/edit_in_popup.min.js +1 -1
- data/app/assets/javascripts/plugins/emoticons.min.js +1 -1
- data/app/assets/javascripts/plugins/entities.min.js +1 -1
- data/app/assets/javascripts/plugins/file.min.js +2 -2
- data/app/assets/javascripts/plugins/files_manager.min.js +2 -2
- data/app/assets/javascripts/plugins/font_family.min.js +1 -1
- data/app/assets/javascripts/plugins/font_size.min.js +1 -1
- data/app/assets/javascripts/plugins/forms.min.js +1 -1
- data/app/assets/javascripts/plugins/fullscreen.min.js +2 -2
- data/app/assets/javascripts/plugins/help.min.js +1 -1
- data/app/assets/javascripts/plugins/image.min.js +2 -2
- data/app/assets/javascripts/plugins/image_manager.min.js +2 -2
- data/app/assets/javascripts/plugins/inline_class.min.js +1 -1
- data/app/assets/javascripts/plugins/inline_style.min.js +1 -1
- data/app/assets/javascripts/plugins/line_breaker.min.js +1 -1
- data/app/assets/javascripts/plugins/line_height.min.js +1 -1
- data/app/assets/javascripts/plugins/link.min.js +2 -2
- data/app/assets/javascripts/plugins/lists.min.js +2 -2
- data/app/assets/javascripts/plugins/markdown.min.js +7 -0
- data/app/assets/javascripts/plugins/paragraph_format.min.js +2 -2
- data/app/assets/javascripts/plugins/paragraph_style.min.js +2 -2
- data/app/assets/javascripts/plugins/print.min.js +1 -1
- data/app/assets/javascripts/plugins/quick_insert.min.js +2 -2
- data/app/assets/javascripts/plugins/quote.min.js +2 -2
- data/app/assets/javascripts/plugins/save.min.js +1 -1
- data/app/assets/javascripts/plugins/special_characters.min.js +1 -1
- data/app/assets/javascripts/plugins/table.min.js +2 -2
- data/app/assets/javascripts/plugins/track_changes.min.js +7 -0
- data/app/assets/javascripts/plugins/trim_video.min.js +1 -1
- data/app/assets/javascripts/plugins/url.min.js +2 -2
- data/app/assets/javascripts/plugins/video.min.js +2 -2
- data/app/assets/javascripts/plugins/word_paste.min.js +2 -2
- data/app/assets/javascripts/plugins.pkgd.min.js +2 -2
- data/app/assets/javascripts/third_party/embedly.min.js +2 -2
- data/app/assets/javascripts/third_party/font_awesome.min.js +2 -2
- data/app/assets/javascripts/third_party/image_tui.min.js +1 -1
- data/app/assets/javascripts/third_party/showdown.min.js +7 -0
- data/app/assets/javascripts/third_party/spell_checker.min.js +1 -1
- data/app/assets/stylesheets/froala_editor.css +70 -9
- data/app/assets/stylesheets/froala_editor.min.css +2 -2
- data/app/assets/stylesheets/froala_editor.pkgd.css +225 -17
- data/app/assets/stylesheets/froala_editor.pkgd.min.css +2 -2
- data/app/assets/stylesheets/froala_style.css +3 -3
- data/app/assets/stylesheets/froala_style.min.css +2 -2
- data/app/assets/stylesheets/plugins/char_counter.css +1 -1
- data/app/assets/stylesheets/plugins/char_counter.min.css +1 -1
- data/app/assets/stylesheets/plugins/code_view.css +1 -1
- data/app/assets/stylesheets/plugins/code_view.min.css +1 -1
- data/app/assets/stylesheets/plugins/colors.css +1 -1
- data/app/assets/stylesheets/plugins/colors.min.css +1 -1
- data/app/assets/stylesheets/plugins/draggable.css +1 -1
- data/app/assets/stylesheets/plugins/draggable.min.css +1 -1
- data/app/assets/stylesheets/plugins/emoticons.css +1 -1
- data/app/assets/stylesheets/plugins/emoticons.min.css +1 -1
- data/app/assets/stylesheets/plugins/file.css +1 -1
- data/app/assets/stylesheets/plugins/file.min.css +1 -1
- data/app/assets/stylesheets/plugins/files_manager.css +7 -7
- data/app/assets/stylesheets/plugins/files_manager.min.css +2 -2
- data/app/assets/stylesheets/plugins/fullscreen.css +1 -1
- data/app/assets/stylesheets/plugins/fullscreen.min.css +1 -1
- data/app/assets/stylesheets/plugins/help.css +1 -1
- data/app/assets/stylesheets/plugins/help.min.css +1 -1
- data/app/assets/stylesheets/plugins/image.css +3 -1
- data/app/assets/stylesheets/plugins/image.min.css +2 -2
- data/app/assets/stylesheets/plugins/image_manager.css +1 -1
- data/app/assets/stylesheets/plugins/image_manager.min.css +1 -1
- data/app/assets/stylesheets/plugins/line_breaker.css +1 -1
- data/app/assets/stylesheets/plugins/line_breaker.min.css +1 -1
- data/app/assets/stylesheets/plugins/markdown.css +149 -0
- data/app/assets/stylesheets/plugins/markdown.min.css +7 -0
- data/app/assets/stylesheets/plugins/quick_insert.css +1 -1
- data/app/assets/stylesheets/plugins/quick_insert.min.css +1 -1
- data/app/assets/stylesheets/plugins/special_characters.css +1 -1
- data/app/assets/stylesheets/plugins/special_characters.min.css +1 -1
- data/app/assets/stylesheets/plugins/table.css +1 -1
- data/app/assets/stylesheets/plugins/table.min.css +1 -1
- data/app/assets/stylesheets/plugins/trim_video.css +1 -1
- data/app/assets/stylesheets/plugins/trim_video.min.css +1 -1
- data/app/assets/stylesheets/plugins/video.css +1 -1
- data/app/assets/stylesheets/plugins/video.min.css +1 -1
- data/app/assets/stylesheets/plugins.pkgd.css +154 -7
- data/app/assets/stylesheets/plugins.pkgd.min.css +2 -2
- data/app/assets/stylesheets/themes/dark.css +29 -7
- data/app/assets/stylesheets/themes/dark.min.css +2 -2
- data/app/assets/stylesheets/themes/gray.css +29 -7
- data/app/assets/stylesheets/themes/gray.min.css +2 -2
- data/app/assets/stylesheets/themes/royal.css +29 -7
- data/app/assets/stylesheets/themes/royal.min.css +2 -2
- data/app/assets/stylesheets/third_party/embedly.css +1 -1
- data/app/assets/stylesheets/third_party/embedly.min.css +1 -1
- data/app/assets/stylesheets/third_party/font_awesome.css +1 -1
- data/app/assets/stylesheets/third_party/font_awesome.min.css +1 -1
- data/app/assets/stylesheets/third_party/image_tui.css +1 -1
- data/app/assets/stylesheets/third_party/image_tui.min.css +1 -1
- data/app/assets/stylesheets/third_party/spell_checker.css +1 -1
- data/app/assets/stylesheets/third_party/spell_checker.min.css +1 -1
- data/lib/wysiwyg-rails/version.rb +1 -1
- metadata +13 -8
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* froala_editor
|
2
|
+
* froala_editor v4.0.7 (https://www.froala.com/wysiwyg-editor)
|
3
3
|
* License https://froala.com/wysiwyg-editor/terms/
|
4
4
|
* Copyright 2014-2021 Froala Labs
|
5
5
|
*/
|
@@ -19,6 +19,25 @@
|
|
19
19
|
translation: {
|
20
20
|
// Place holder
|
21
21
|
'Type something': 'Escriba algo',
|
22
|
+
// Missing translations
|
23
|
+
'More Text': 'Más texto',
|
24
|
+
'Text Color': 'Color de texto',
|
25
|
+
'Background Color': 'Color de fondo',
|
26
|
+
'Inline Class': 'Clase en línea',
|
27
|
+
'Default': 'Defecto',
|
28
|
+
'Lower Alpha': 'Alpha inferiores',
|
29
|
+
'Lower Greek': 'Griegas inferiores',
|
30
|
+
'Lower Roman': 'Romanas inferiores',
|
31
|
+
'Upper Alpha': 'Alpha superiores',
|
32
|
+
'Upper Roman': 'Romanas superiores',
|
33
|
+
'Circle': 'Circulo',
|
34
|
+
'Disc': 'Dto',
|
35
|
+
'Square': 'Cuadrado',
|
36
|
+
'Single': 'Soltero',
|
37
|
+
'Double': 'Doble',
|
38
|
+
'More Rich': 'Más Rico',
|
39
|
+
'More Misc': 'Más Diverso',
|
40
|
+
'Download PDF': 'Descargar PDF',
|
22
41
|
// Basic formatting
|
23
42
|
'Bold': 'Negrita',
|
24
43
|
'Italic': "It\xE1lica",
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* froala_editor
|
2
|
+
* froala_editor v4.0.7 (https://www.froala.com/wysiwyg-editor)
|
3
3
|
* License https://froala.com/wysiwyg-editor/terms/
|
4
4
|
* Copyright 2014-2021 Froala Labs
|
5
5
|
*/
|
@@ -153,6 +153,10 @@
|
|
153
153
|
'Align Middle': 'Aligner au centre',
|
154
154
|
'Align Bottom': 'Aligner en bas',
|
155
155
|
'Cell Style': 'Style de cellule',
|
156
|
+
'Dashed Borders': 'Bordures pointillées',
|
157
|
+
'Alternate Rows': 'Lignes alternatives',
|
158
|
+
'Highlighted': 'Souligné',
|
159
|
+
'Thick': 'Épais',
|
156
160
|
// Files
|
157
161
|
'Upload File': "T\xE9l\xE9verser un fichier",
|
158
162
|
'Drop file': 'Cliquer pour parcourir',
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* froala_editor
|
2
|
+
* froala_editor v4.0.7 (https://www.froala.com/wysiwyg-editor)
|
3
3
|
* License https://froala.com/wysiwyg-editor/terms/
|
4
4
|
* Copyright 2014-2021 Froala Labs
|
5
5
|
*/
|
@@ -19,6 +19,21 @@
|
|
19
19
|
translation: {
|
20
20
|
// Place holder
|
21
21
|
'Type something': 'Digita qualcosa',
|
22
|
+
//Missing translations
|
23
|
+
'Text Color': 'Colore del testo',
|
24
|
+
'Background Color': 'Colore di sfondo',
|
25
|
+
'Inline Class': 'Classe inline',
|
26
|
+
'Default': 'Predefinito',
|
27
|
+
'Lower Alpha': 'Alfa minuscole',
|
28
|
+
'Lower Greek': 'Greche minuscole',
|
29
|
+
'Lower Roman': 'Romane minuscole',
|
30
|
+
'Upper Alpha': 'Alfa maiuscole',
|
31
|
+
'Upper Roman': 'Romane maiuscole',
|
32
|
+
'Circle': 'Cerchio',
|
33
|
+
'Disc': 'Disco',
|
34
|
+
'Square': 'Quadrato',
|
35
|
+
'Double': 'Doppio',
|
36
|
+
'Download PDF': 'Scarica il PDF',
|
22
37
|
// Basic formatting
|
23
38
|
'Bold': 'Grassetto',
|
24
39
|
'Italic': 'Corsivo',
|
@@ -267,8 +282,8 @@
|
|
267
282
|
'Characters': 'Caratteri',
|
268
283
|
'Words': 'Parole',
|
269
284
|
// More Buttons
|
270
|
-
'More Text': 'Altro
|
271
|
-
'More Paragraph': 'Altro
|
285
|
+
'More Text': 'Altro Testo',
|
286
|
+
'More Paragraph': 'Altro Paragrafo',
|
272
287
|
'More Rich': 'Altro Ricco',
|
273
288
|
'More Misc': 'Altro Varie'
|
274
289
|
},
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* froala_editor
|
2
|
+
* froala_editor v4.0.7 (https://www.froala.com/wysiwyg-editor)
|
3
3
|
* License https://froala.com/wysiwyg-editor/terms/
|
4
4
|
* Copyright 2014-2021 Froala Labs
|
5
5
|
*/
|
@@ -12,13 +12,46 @@
|
|
12
12
|
|
13
13
|
FE = FE && FE.hasOwnProperty('default') ? FE['default'] : FE;
|
14
14
|
|
15
|
-
|
16
|
-
|
17
|
-
|
15
|
+
function _defineProperty(obj, key, value) {
|
16
|
+
if (key in obj) {
|
17
|
+
Object.defineProperty(obj, key, {
|
18
|
+
value: value,
|
19
|
+
enumerable: true,
|
20
|
+
configurable: true,
|
21
|
+
writable: true
|
22
|
+
});
|
23
|
+
} else {
|
24
|
+
obj[key] = value;
|
25
|
+
}
|
26
|
+
|
27
|
+
return obj;
|
28
|
+
}
|
29
|
+
|
30
|
+
var _translation;
|
18
31
|
FE.LANGUAGE['ko'] = {
|
19
|
-
translation: {
|
32
|
+
translation: (_translation = {
|
20
33
|
// Place holder
|
21
34
|
'Type something': "\uB0B4\uC6A9\uC744 \uC785\uB825\uD558\uC138\uC694",
|
35
|
+
// Missing translations
|
36
|
+
'More Text': '더 많은 텍스트',
|
37
|
+
'Text Color': '텍스트 색상',
|
38
|
+
'Background Color': '배경색',
|
39
|
+
'Inline Class': '인라인 클래스',
|
40
|
+
'Default': '기본값',
|
41
|
+
'Lower Alpha': '소문자 알파',
|
42
|
+
'Lower Greek': '그리스어 소문자',
|
43
|
+
'Lower Roman': '로만 소문자',
|
44
|
+
'Upper Alpha': '알파 대문자',
|
45
|
+
'Upper Roman': '로만 대문자',
|
46
|
+
'Circle': '서클',
|
47
|
+
'Disc': '디스크',
|
48
|
+
'Square': '정사각형',
|
49
|
+
'Single': '싱글',
|
50
|
+
'Double': '더블',
|
51
|
+
'More Rich': '풍부한 콘텐츠',
|
52
|
+
'More Misc': '더 기타',
|
53
|
+
'Insert Files': '파일 삽입',
|
54
|
+
'Download PDF': 'PDF 다운로드',
|
22
55
|
// Basic formatting
|
23
56
|
'Bold': "\uAD75\uAC8C",
|
24
57
|
'Italic': "\uAE30\uC6B8\uC784\uAF34",
|
@@ -264,13 +297,8 @@
|
|
264
297
|
'Clean': "\uC815\uB9AC",
|
265
298
|
'Word Paste Detected': "\uC6CC\uB4DC \uBD99\uC5EC \uB123\uAE30\uAC00 \uAC80\uCD9C \uB418\uC5C8\uC2B5\uB2C8\uB2E4.",
|
266
299
|
// Character Counter
|
267
|
-
'Characters': '문자'
|
268
|
-
|
269
|
-
'More Text': '더 본문',
|
270
|
-
'More Paragraph': '더 절',
|
271
|
-
'More Rich': '더 풍부한',
|
272
|
-
'More Misc': '더 기타'
|
273
|
-
},
|
300
|
+
'Characters': '문자'
|
301
|
+
}, _defineProperty(_translation, "More Text", '더 본문'), _defineProperty(_translation, 'More Paragraph', '더 절'), _defineProperty(_translation, "More Rich", '더 풍부한'), _defineProperty(_translation, "More Misc", '더 기타'), _translation),
|
274
302
|
direction: 'ltr'
|
275
303
|
};
|
276
304
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* froala_editor
|
2
|
+
* froala_editor v4.0.7 (https://www.froala.com/wysiwyg-editor)
|
3
3
|
* License https://froala.com/wysiwyg-editor/terms/
|
4
4
|
* Copyright 2014-2021 Froala Labs
|
5
5
|
*/
|
@@ -19,6 +19,23 @@
|
|
19
19
|
translation: {
|
20
20
|
// Place holder
|
21
21
|
'Type something': "Wpisz co\u015B",
|
22
|
+
// Missing translations
|
23
|
+
'Text Color': 'Kolor tekstu',
|
24
|
+
'Background Color': 'Kolor tła',
|
25
|
+
'Inline Class': 'Klasa inline',
|
26
|
+
'Default': 'Domyślna',
|
27
|
+
'Lower Alpha': 'Małe litery alfabetu',
|
28
|
+
'Lower Greek': 'Małe litery greckie',
|
29
|
+
'Lower Roman': 'Małe litery rzymskie',
|
30
|
+
'Upper Alpha': 'Wielkie litery alfabetu',
|
31
|
+
'Upper Roman': 'Wielkie litery rzymskie',
|
32
|
+
'Circle': 'Okrąg',
|
33
|
+
'Disc': 'Dysk',
|
34
|
+
'Square': 'Kwadrat',
|
35
|
+
'Single': 'Pojedynczy',
|
36
|
+
'Double': 'Podwójnie',
|
37
|
+
'Insert Files': 'Wstaw pliki',
|
38
|
+
'Download PDF': 'Pobierz PDF',
|
22
39
|
// Basic formatting
|
23
40
|
'Bold': 'Pogrubienie',
|
24
41
|
'Italic': 'Kursywa',
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* froala_editor
|
2
|
+
* froala_editor v4.0.7 (https://www.froala.com/wysiwyg-editor)
|
3
3
|
* License https://froala.com/wysiwyg-editor/terms/
|
4
4
|
* Copyright 2014-2021 Froala Labs
|
5
5
|
*/
|
@@ -19,6 +19,23 @@
|
|
19
19
|
translation: {
|
20
20
|
// Place holder
|
21
21
|
'Type something': 'Digite algo',
|
22
|
+
// Missing translations
|
23
|
+
'Text Color': 'Cor do texto',
|
24
|
+
'Background Color': 'Cor de fundo',
|
25
|
+
'Inline Class': 'Classe Inline',
|
26
|
+
'Default': 'Padrão',
|
27
|
+
'Lower Alpha': 'Alfa minúsculo',
|
28
|
+
'Lower Greek': 'Grego minúsculo',
|
29
|
+
'Lower Roman': 'Roman minúsculo',
|
30
|
+
'Upper Alpha': 'Alfa maiúsculo',
|
31
|
+
'Upper Roman': 'Roman maiúscula',
|
32
|
+
'Circle': 'Círculo',
|
33
|
+
'Disc': 'Disco',
|
34
|
+
'Square': 'Quadrado',
|
35
|
+
'Single': 'Único',
|
36
|
+
'Double': 'Duplo',
|
37
|
+
'Insert Files': 'Inserir arquivos',
|
38
|
+
'Download PDF': 'Baixar PDF',
|
22
39
|
// Basic formatting
|
23
40
|
'Bold': 'Negrito',
|
24
41
|
'Italic': "It\xE1lico",
|
@@ -1,7 +1,7 @@
|
|
1
1
|
/*!
|
2
|
-
* froala_editor
|
2
|
+
* froala_editor v4.0.7 (https://www.froala.com/wysiwyg-editor)
|
3
3
|
* License https://froala.com/wysiwyg-editor/terms/
|
4
4
|
* Copyright 2014-2021 Froala Labs
|
5
5
|
*/
|
6
6
|
|
7
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(require("froala-editor")):"function"==typeof define&&define.amd?define(["froala-editor"],e):e(t.FroalaEditor)}(this,function(i){"use strict";i=i&&i.hasOwnProperty("default")?i["default"]:i,Object.assign(i.DEFAULTS,{charCounterMax:-1,charCounterCount:!0}),i.PLUGINS.charCounter=function(n){var r,e=n.$,o=function o(){return(n.el.textContent||"").replace(/\u200B/g,"").length};function t(t){if(n.opts.charCounterMax<0)return!0;if(o()<n.opts.charCounterMax)return!0;var e=t.which;return!(!n.keys.ctrlKey(t)&&n.keys.isCharacter(e)||e===i.KEYCODE.IME)||(t.preventDefault(),t.stopPropagation(),n.events.trigger("charCounter.exceeded"),!1)}function a(t){return n.opts.charCounterMax<0?t:e("<div>").html(t).text().length+o()<=n.opts.charCounterMax?t:(n.events.trigger("charCounter.exceeded"),"")}function c(){if(n.opts.charCounterCount){var t=o()+(0<n.opts.charCounterMax?"/"+n.opts.charCounterMax:"");r.text("".concat(n.language.translate("Characters")," : ").concat(t)),n.opts.toolbarBottom&&r.css("margin-bottom",n.$tb.outerHeight(!0));var e=n.$wp.get(0).offsetWidth-n.$wp.get(0).clientWidth;0<=e&&("rtl"==n.opts.direction?r.css("margin-left",e):r.css("margin-right",e))}}return{_init:function u(){return!!n.$wp&&!!n.opts.charCounterCount&&((r=e(document.createElement("span")).attr("class","fr-counter")).css("bottom",n.$wp.css("border-bottom-width")),n.$second_tb
|
7
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(require("froala-editor")):"function"==typeof define&&define.amd?define(["froala-editor"],e):e(t.FroalaEditor)}(this,function(i){"use strict";i=i&&i.hasOwnProperty("default")?i["default"]:i,Object.assign(i.DEFAULTS,{charCounterMax:-1,charCounterCount:!0}),i.PLUGINS.charCounter=function(n){var r,e=n.$,o=function o(){return(n.el.textContent||"").replace(/\u200B/g,"").length};function t(t){if(n.opts.charCounterMax<0)return!0;if(o()<n.opts.charCounterMax)return!0;var e=t.which;return!(!n.keys.ctrlKey(t)&&n.keys.isCharacter(e)||e===i.KEYCODE.IME)||(t.preventDefault(),t.stopPropagation(),n.events.trigger("charCounter.exceeded"),!1)}function a(t){return n.opts.charCounterMax<0?t:e("<div>").html(t).text().length+o()<=n.opts.charCounterMax?t:(n.events.trigger("charCounter.exceeded"),"")}function c(){if(n.opts.charCounterCount){var t=o()+(0<n.opts.charCounterMax?"/"+n.opts.charCounterMax:"");r.text("".concat(n.language.translate("Characters")," : ").concat(t)),n.opts.toolbarBottom&&r.css("margin-bottom",n.$tb.outerHeight(!0));var e=n.$wp.get(0).offsetWidth-n.$wp.get(0).clientWidth;0<=e&&("rtl"==n.opts.direction?r.css("margin-left",e):r.css("margin-right",e))}}return{_init:function u(){return!!n.$wp&&!!n.opts.charCounterCount&&((r=e(document.createElement("span")).attr("class","fr-counter")).css("bottom",n.$wp.css("border-bottom-width")),n.$second_tb?n.$second_tb.append(r):n.$wp.append(r),n.events.on("keydown",t,!0),n.events.on("paste.afterCleanup",a),n.events.on("keyup contentChanged input",function(){n.events.trigger("charCounter.update")}),n.events.on("charCounter.update",c),n.events.trigger("charCounter.update"),void n.events.on("destroy",function(){e(n.o_win).off("resize.char".concat(n.id)),r.removeData().remove(),r=null}))},count:o}}});
|