suneditor 2.47.3 → 2.47.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "suneditor",
3
- "version": "2.47.3",
3
+ "version": "2.47.5",
4
4
  "description": "Vanilla javascript based WYSIWYG web editor, with no dependencies",
5
5
  "author": "JiHong.Lee",
6
6
  "license": "MIT",
@@ -45,7 +45,7 @@
45
45
  "karma": "~6.3.19",
46
46
  "karma-chrome-launcher": "~2.2.0",
47
47
  "karma-jasmine": "~1.1.2",
48
- "katex": "~0.16.10",
48
+ "katex": "^0.16.21",
49
49
  "mini-css-extract-plugin": "~0.4.5",
50
50
  "optimize-css-assets-webpack-plugin": "~5.0.4",
51
51
  "url-loader": "~1.1.2",
@@ -0,0 +1,5 @@
1
+ import { Lang } from './Lang';
2
+
3
+ declare const hu: Lang;
4
+
5
+ export default hu;
package/src/lang/hu.js ADDED
@@ -0,0 +1,188 @@
1
+ /*
2
+ * wysiwyg web editor
3
+ *
4
+ * suneditor.js
5
+ * Copyright 2017 JiHong Lee.
6
+ * MIT license.
7
+ */
8
+ 'use strict';
9
+
10
+ (function (global, factory) {
11
+ if (typeof module === 'object' && typeof module.exports === 'object') {
12
+ module.exports = global.document ?
13
+ factory(global, true) :
14
+ function (w) {
15
+ if (!w.document) {
16
+ throw new Error('SUNEDITOR_LANG a window with a document');
17
+ }
18
+ return factory(w);
19
+ };
20
+ } else {
21
+ factory(global);
22
+ }
23
+ }(typeof window !== 'undefined' ? window : this, function (window, noGlobal) {
24
+ const lang = {
25
+ code: 'hu',
26
+ toolbar: {
27
+ default: 'Alapértelmezett',
28
+ save: 'Mentés',
29
+ font: 'Betűtípus',
30
+ formats: 'Formázás',
31
+ fontSize: 'Betűméret',
32
+ bold: 'Félkövér',
33
+ underline: 'Aláhúzott',
34
+ italic: 'Dőlt',
35
+ strike: 'Áthúzott',
36
+ subscript: 'Alsó index',
37
+ superscript: 'Felső index',
38
+ removeFormat: 'Formázás törlése',
39
+ fontColor: 'Betűszín',
40
+ hiliteColor: 'Háttérszín',
41
+ indent: 'Behúzás növelése',
42
+ outdent: 'Behúzás csökkentése',
43
+ align: 'Igazítás',
44
+ alignLeft: 'Balra igazítás',
45
+ alignRight: 'Jobbra igazítás',
46
+ alignCenter: 'Középre igazítás',
47
+ alignJustify: 'Sorkizárt',
48
+ list: 'Lista',
49
+ orderList: 'Számozott lista',
50
+ unorderList: 'Számozatlan lista',
51
+ horizontalRule: 'Elválasztó',
52
+ hr_solid: 'Folytonos',
53
+ hr_dotted: 'Pontozott',
54
+ hr_dashed: 'Szaggatott',
55
+ table: 'Táblázat',
56
+ link: 'Hivatkozás',
57
+ math: 'Matematika',
58
+ image: 'Kép',
59
+ video: 'Videó',
60
+ audio: 'Hang',
61
+ fullScreen: 'Teljes képernyő',
62
+ showBlocks: 'Blokkok megjelenítése',
63
+ codeView: 'Forráskód nézet',
64
+ undo: 'Visszavonás',
65
+ redo: 'Visszavonás visszavonása',
66
+ preview: 'Előnézet',
67
+ print: 'Nyomtatás',
68
+ tag_p: 'Bekezdés',
69
+ tag_div: 'Normál (DIV)',
70
+ tag_h: 'Fejléc',
71
+ tag_blockquote: 'Idézet',
72
+ tag_pre: 'Kód',
73
+ template: 'Minta',
74
+ lineHeight: 'Sormagasság',
75
+ paragraphStyle: 'Bekezdésstílus',
76
+ textStyle: 'Karakterstílus',
77
+ imageGallery: 'Képgalléria',
78
+ dir_ltr: 'Balról jobbra',
79
+ dir_rtl: 'Jobbról balra',
80
+ mention: 'Említés'
81
+ },
82
+ dialogBox: {
83
+ linkBox: {
84
+ title: 'Link beszúrása',
85
+ url: 'URL',
86
+ text: 'Megjelenített szöveg',
87
+ newWindowCheck: 'Megnyitás új ablakban',
88
+ downloadLinkCheck: 'Letöltési hivatkozás',
89
+ bookmark: 'Könyvjelző'
90
+ },
91
+ mathBox: {
92
+ title: 'Matematika',
93
+ inputLabel: 'Matematikai jelölések',
94
+ fontSizeLabel: 'Betűméret',
95
+ previewLabel: 'Előnézet'
96
+ },
97
+ imageBox: {
98
+ title: 'Kép beszúrása',
99
+ file: 'Fájlfeltöltés',
100
+ url: 'Képhivatkozás',
101
+ altText: 'Alternatív szöveg'
102
+ },
103
+ videoBox: {
104
+ title: 'Videó beszúrása',
105
+ file: 'Fájlfeltöltés',
106
+ url: 'Beágyazható URL, YouTube/Vimeo'
107
+ },
108
+ audioBox: {
109
+ title: 'Hang beszúrása',
110
+ file: 'Fájlfeltöltés',
111
+ url: 'Hang URL'
112
+ },
113
+ browser: {
114
+ tags: 'Címkék',
115
+ search: 'Keresés',
116
+ },
117
+ caption: 'Képaláírás',
118
+ close: 'Bezárás',
119
+ submitButton: 'Küldés',
120
+ revertButton: 'Mégse',
121
+ proportion: 'Méretkorlátok',
122
+ basic: 'Alapszintű',
123
+ left: 'Balra',
124
+ right: 'Jobbra',
125
+ center: 'Középre',
126
+ width: 'Szélesség',
127
+ height: 'Magasság',
128
+ size: 'Méret',
129
+ ratio: 'Képarány'
130
+ },
131
+ controller: {
132
+ edit: 'Szerkesztés',
133
+ unlink: 'Link eltávolítása',
134
+ remove: 'Törlés',
135
+ insertRowAbove: 'Új sor fölötte',
136
+ insertRowBelow: 'Új sor alatta',
137
+ deleteRow: 'Sor törlése',
138
+ insertColumnBefore: 'Új oszlop balra',
139
+ insertColumnAfter: 'Új oszlop jobbra',
140
+ deleteColumn: 'Oszlop törlése',
141
+ fixedColumnWidth: 'Rögzített oszlopszélesség',
142
+ resize100: 'Átméretezés: 100%',
143
+ resize75: 'Átméretezés: 75%',
144
+ resize50: 'Átméretezés: 50%',
145
+ resize25: 'Átméretezés: 25%',
146
+ autoSize: 'Automatikus méret',
147
+ mirrorHorizontal: 'Vízszintes tükrözés',
148
+ mirrorVertical: 'Függőleges tükrözés',
149
+ rotateLeft: 'Forgatás balra',
150
+ rotateRight: 'Forgatás jobbra',
151
+ maxSize: 'Maximális méret',
152
+ minSize: 'Minimális méret',
153
+ tableHeader: 'Táblázatfejléc',
154
+ mergeCells: 'Cellák egyesítése',
155
+ splitCells: 'Cellák szétválasztása',
156
+ HorizontalSplit: 'Szétválasztás vízszintesen',
157
+ VerticalSplit: 'Szétválasztás függőlegesen'
158
+ },
159
+ menu: {
160
+ spaced: 'Ritkított',
161
+ bordered: 'Keretezett',
162
+ neon: 'Neon',
163
+ translucent: 'Áttetsző',
164
+ shadow: 'Árnyék',
165
+ code: 'Kód'
166
+ }
167
+ };
168
+
169
+ if (typeof noGlobal === typeof undefined) {
170
+ if (!window.SUNEDITOR_LANG) {
171
+ Object.defineProperty(window, 'SUNEDITOR_LANG', {
172
+ enumerable: true,
173
+ writable: false,
174
+ configurable: false,
175
+ value: {}
176
+ });
177
+ }
178
+
179
+ Object.defineProperty(window.SUNEDITOR_LANG, 'hu', {
180
+ enumerable: true,
181
+ writable: true,
182
+ configurable: true,
183
+ value: lang
184
+ });
185
+ }
186
+
187
+ return lang;
188
+ }));
@@ -6,6 +6,7 @@ import en from './en';
6
6
  import es from './es';
7
7
  import fr from './fr';
8
8
  import he from './he';
9
+ import hu from './hu';
9
10
  import it from './it';
10
11
  import ja from './ja';
11
12
  import ko from './ko';
@@ -20,4 +21,4 @@ import ua from './ua';
20
21
  import ur from './ur';
21
22
  import zh_cn from './zh_cn';
22
23
 
23
- export { ckb, cs, da, de, en, es, fr, he, it, ja, ko, lv, nl, pl, pt_br, ro, ru, se, ua, ur, zh_cn };
24
+ export { ckb, cs, da, de, en, es, fr, he, hu, it, ja, ko, lv, nl, pl, pt_br, ro, ru, se, ua, ur, zh_cn };
package/src/lang/index.js CHANGED
@@ -8,6 +8,7 @@ import en from './en';
8
8
  import es from './es';
9
9
  import fr from './fr';
10
10
  import he from './he';
11
+ import hu from './hu';
11
12
  import it from './it';
12
13
  import ja from './ja';
13
14
  import ko from './ko';
@@ -22,5 +23,5 @@ import ua from './ua';
22
23
  import ur from './ur';
23
24
  import zh_cn from './zh_cn';
24
25
 
25
- export { ckb, cs, da, de, en, es, fr, he, it, ja, ko, lv, nl, pl, pt_br, ro, ru, se, ua, ur, zh_cn };
26
- export default { ckb, cs, da, de, en, es, fr, he, it, ja, ko, lv, nl, pl, pt_br, ro, ru, se, ua, ur, zh_cn };
26
+ export { ckb, cs, da, de, en, es, fr, he, hu, it, ja, ko, lv, nl, pl, pt_br, ro, ru, se, ua, ur, zh_cn };
27
+ export default { ckb, cs, da, de, en, es, fr, he, hu, it, ja, ko, lv, nl, pl, pt_br, ro, ru, se, ua, ur, zh_cn };
package/src/lib/core.js CHANGED
@@ -6355,6 +6355,7 @@ export default function (context, pluginCallButtons, plugins, lang, options, _re
6355
6355
  _responsiveCurrentSize: 'default',
6356
6356
  _responsiveButtonSize: null,
6357
6357
  _responsiveButtons: null,
6358
+ _deleteKeyCode: new _w.RegExp('^(8|46)$'),
6358
6359
  _cursorMoveKeyCode: new _w.RegExp('^(8|3[2-9]|40|46)$'),
6359
6360
  _directionKeyCode: new _w.RegExp('^(8|13|3[2-9]|40|46)$'),
6360
6361
  _nonTextKeyCode: new _w.RegExp('^(8|13|1[6-9]|20|27|3[3-9]|40|45|46|11[2-9]|12[0-3]|144|145)$'),
@@ -7918,6 +7919,11 @@ export default function (context, pluginCallButtons, plugins, lang, options, _re
7918
7919
  core.setRange(selectionNode, so < 0 ? 0 : so, selectionNode, eo < 0 ? 0 : eo);
7919
7920
  }
7920
7921
 
7922
+ if (event._deleteKeyCode.test(keyCode) && formatEl && util.onlyZeroWidthSpace(formatEl.textContent) && !formatEl.previousElementSibling) {
7923
+ formatEl.innerHTML = '<br>';
7924
+ core.setRange(formatEl, 0, formatEl, 0);
7925
+ }
7926
+
7921
7927
  core._charCount('');
7922
7928
 
7923
7929
  // user event
package/src/lib/util.js CHANGED
@@ -1610,6 +1610,7 @@ const util = {
1610
1610
  child = children[i];
1611
1611
  next = children[i + 1];
1612
1612
  if (!child) break;
1613
+ if (inst.isBreak(child) || inst.isMedia(child) || inst.isInputElement(child)) continue;
1613
1614
  if((onlyText && inst._isIgnoreNodeChange(child)) || (!onlyText && (inst.isTable(child) || inst.isListCell(child) || (inst.isFormatElement(child) && !inst.isFreeFormatElement(child))))) {
1614
1615
  if (inst.isTable(child) || inst.isListCell(child)) {
1615
1616
  recursionFunc(child, depth + 1, i);
@@ -1646,6 +1647,7 @@ const util = {
1646
1647
  current.parentNode.insertBefore(child, current);
1647
1648
  inst.removeItem(current);
1648
1649
  }
1650
+
1649
1651
  if (!next) {
1650
1652
  if (child.nodeType === 1) recursionFunc(child, depth + 1, i);
1651
1653
  break;