@toast-ui/editor 3.2.0 → 3.2.2

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.
Files changed (54) hide show
  1. package/dist/esm/i18n/ar.js +1 -1
  2. package/dist/esm/i18n/cs-cz.js +1 -1
  3. package/dist/esm/i18n/de-de.js +1 -1
  4. package/dist/esm/i18n/en-us.js +1 -1
  5. package/dist/esm/i18n/es-es.js +1 -1
  6. package/dist/esm/i18n/fi-fi.js +1 -1
  7. package/dist/esm/i18n/fr-fr.js +1 -1
  8. package/dist/esm/i18n/gl-es.js +1 -1
  9. package/dist/esm/i18n/hr-hr.js +1 -1
  10. package/dist/esm/i18n/i18n.js +1 -1
  11. package/dist/esm/i18n/it-it.js +1 -1
  12. package/dist/esm/i18n/ja-jp.js +1 -1
  13. package/dist/esm/i18n/ko-kr.js +1 -1
  14. package/dist/esm/i18n/nb-no.js +1 -1
  15. package/dist/esm/i18n/nl-nl.js +1 -1
  16. package/dist/esm/i18n/pl-pl.js +1 -1
  17. package/dist/esm/i18n/pt-br.js +1 -1
  18. package/dist/esm/i18n/ru-ru.js +1 -1
  19. package/dist/esm/i18n/sv-se.js +1 -1
  20. package/dist/esm/i18n/tr-tr.js +1 -1
  21. package/dist/esm/i18n/uk-ua.js +1 -1
  22. package/dist/esm/i18n/zh-cn.js +1 -1
  23. package/dist/esm/i18n/zh-tw.js +1 -1
  24. package/dist/esm/index.js +30 -63
  25. package/dist/esm/indexViewer.js +1 -1
  26. package/dist/i18n/ar.js +1 -1
  27. package/dist/i18n/cs-cz.js +1 -1
  28. package/dist/i18n/de-de.js +1 -1
  29. package/dist/i18n/es-es.js +1 -1
  30. package/dist/i18n/fi-fi.js +1 -1
  31. package/dist/i18n/fr-fr.js +1 -1
  32. package/dist/i18n/gl-es.js +1 -1
  33. package/dist/i18n/hr-hr.js +1 -1
  34. package/dist/i18n/it-it.js +1 -1
  35. package/dist/i18n/ja-jp.js +1 -1
  36. package/dist/i18n/ko-kr.js +1 -1
  37. package/dist/i18n/nb-no.js +1 -1
  38. package/dist/i18n/nl-nl.js +1 -1
  39. package/dist/i18n/pl-pl.js +1 -1
  40. package/dist/i18n/pt-br.js +1 -1
  41. package/dist/i18n/ru-ru.js +1 -1
  42. package/dist/i18n/sv-se.js +1 -1
  43. package/dist/i18n/tr-tr.js +1 -1
  44. package/dist/i18n/uk-ua.js +1 -1
  45. package/dist/i18n/zh-cn.js +1 -1
  46. package/dist/i18n/zh-tw.js +1 -1
  47. package/dist/toastui-editor-only.css +2 -2
  48. package/dist/toastui-editor-viewer.css +1 -1
  49. package/dist/toastui-editor-viewer.js +1 -10
  50. package/dist/toastui-editor.css +2 -2
  51. package/dist/toastui-editor.js +10 -44
  52. package/package.json +1 -1
  53. package/types/convertor.d.ts +2 -4
  54. package/types/index.d.ts +1 -1
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @toast-ui/editor : i18n
3
- * @version 3.2.0 | Fri Aug 05 2022
3
+ * @version 3.2.2 | Fri Feb 17 2023
4
4
  * @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
5
5
  * @license MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @toast-ui/editor : i18n
3
- * @version 3.2.0 | Fri Aug 05 2022
3
+ * @version 3.2.2 | Fri Feb 17 2023
4
4
  * @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
5
5
  * @license MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @toast-ui/editor : i18n
3
- * @version 3.2.0 | Fri Aug 05 2022
3
+ * @version 3.2.2 | Fri Feb 17 2023
4
4
  * @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
5
5
  * @license MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @toast-ui/editor : i18n
3
- * @version 3.2.0 | Fri Aug 05 2022
3
+ * @version 3.2.2 | Fri Feb 17 2023
4
4
  * @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
5
5
  * @license MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @toast-ui/editor : i18n
3
- * @version 3.2.0 | Fri Aug 05 2022
3
+ * @version 3.2.2 | Fri Feb 17 2023
4
4
  * @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
5
5
  * @license MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @toast-ui/editor : i18n
3
- * @version 3.2.0 | Fri Aug 05 2022
3
+ * @version 3.2.2 | Fri Feb 17 2023
4
4
  * @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
5
5
  * @license MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @toast-ui/editor : i18n
3
- * @version 3.2.0 | Fri Aug 05 2022
3
+ * @version 3.2.2 | Fri Feb 17 2023
4
4
  * @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
5
5
  * @license MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @toast-ui/editor : i18n
3
- * @version 3.2.0 | Fri Aug 05 2022
3
+ * @version 3.2.2 | Fri Feb 17 2023
4
4
  * @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
5
5
  * @license MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @toast-ui/editor : i18n
3
- * @version 3.2.0 | Fri Aug 05 2022
3
+ * @version 3.2.2 | Fri Feb 17 2023
4
4
  * @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
5
5
  * @license MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @toast-ui/editor : i18n
3
- * @version 3.2.0 | Fri Aug 05 2022
3
+ * @version 3.2.2 | Fri Feb 17 2023
4
4
  * @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
5
5
  * @license MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @toast-ui/editor : i18n
3
- * @version 3.2.0 | Fri Aug 05 2022
3
+ * @version 3.2.2 | Fri Feb 17 2023
4
4
  * @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
5
5
  * @license MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @toast-ui/editor : i18n
3
- * @version 3.2.0 | Fri Aug 05 2022
3
+ * @version 3.2.2 | Fri Feb 17 2023
4
4
  * @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
5
5
  * @license MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @toast-ui/editor : i18n
3
- * @version 3.2.0 | Fri Aug 05 2022
3
+ * @version 3.2.2 | Fri Feb 17 2023
4
4
  * @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
5
5
  * @license MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @toast-ui/editor : i18n
3
- * @version 3.2.0 | Fri Aug 05 2022
3
+ * @version 3.2.2 | Fri Feb 17 2023
4
4
  * @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
5
5
  * @license MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @toast-ui/editor : i18n
3
- * @version 3.2.0 | Fri Aug 05 2022
3
+ * @version 3.2.2 | Fri Feb 17 2023
4
4
  * @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
5
5
  * @license MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @toast-ui/editor : i18n
3
- * @version 3.2.0 | Fri Aug 05 2022
3
+ * @version 3.2.2 | Fri Feb 17 2023
4
4
  * @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
5
5
  * @license MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @toast-ui/editor : i18n
3
- * @version 3.2.0 | Fri Aug 05 2022
3
+ * @version 3.2.2 | Fri Feb 17 2023
4
4
  * @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
5
5
  * @license MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @toast-ui/editor : i18n
3
- * @version 3.2.0 | Fri Aug 05 2022
3
+ * @version 3.2.2 | Fri Feb 17 2023
4
4
  * @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
5
5
  * @license MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @toast-ui/editor : i18n
3
- * @version 3.2.0 | Fri Aug 05 2022
3
+ * @version 3.2.2 | Fri Feb 17 2023
4
4
  * @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
5
5
  * @license MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @toast-ui/editor : i18n
3
- * @version 3.2.0 | Fri Aug 05 2022
3
+ * @version 3.2.2 | Fri Feb 17 2023
4
4
  * @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
5
5
  * @license MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @toast-ui/editor : i18n
3
- * @version 3.2.0 | Fri Aug 05 2022
3
+ * @version 3.2.2 | Fri Feb 17 2023
4
4
  * @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
5
5
  * @license MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @toast-ui/editor : i18n
3
- * @version 3.2.0 | Fri Aug 05 2022
3
+ * @version 3.2.2 | Fri Feb 17 2023
4
4
  * @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
5
5
  * @license MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @toast-ui/editor : i18n
3
- * @version 3.2.0 | Fri Aug 05 2022
3
+ * @version 3.2.2 | Fri Feb 17 2023
4
4
  * @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
5
5
  * @license MIT
6
6
  */
package/dist/esm/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @toast-ui/editor
3
- * @version 3.2.0 | Fri Aug 05 2022
3
+ * @version 3.2.2 | Fri Feb 17 2023
4
4
  * @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
5
5
  * @license MIT
6
6
  */
@@ -914,14 +914,6 @@ function assign(targetObj, obj) {
914
914
  function getSortedNumPair(valueA, valueB) {
915
915
  return valueA > valueB ? [valueB, valueA] : [valueA, valueB];
916
916
  }
917
- function isStartWithSpace(text) {
918
- var reStartWithSpace = /^\s(\S*)/g;
919
- return reStartWithSpace.test(text);
920
- }
921
- function isEndWithSpace(text) {
922
- var reEndWithSpace = /(\S*)\s$/g;
923
- return reEndWithSpace.test(text);
924
- }
925
917
 
926
918
  /**
927
919
  * @fileoverview Transform the Array-like object to Array.
@@ -1373,7 +1365,6 @@ var reHTMLTag = new RegExp("^" + HTML_TAG, 'i');
1373
1365
  var reBR = /<br\s*\/*>/i;
1374
1366
  var reHTMLComment = /<! ---->|<!--(?:-?[^>-])(?:-?[^-])*-->/;
1375
1367
  var ALTERNATIVE_TAG_FOR_BR = '</p><p>';
1376
- var DEFAULT_TEXT_NOT_START_OR_END_WITH_SPACE = 'a';
1377
1368
 
1378
1369
  function isPositionInBox(style, offsetX, offsetY) {
1379
1370
  var left = parseInt(style.left, 10);
@@ -15756,7 +15747,7 @@ function getDefaultCustomAttrs() {
15756
15747
  classNames: { default: null },
15757
15748
  };
15758
15749
  }
15759
- function getCustomAttrs$1(attrs) {
15750
+ function getCustomAttrs(attrs) {
15760
15751
  var htmlAttrs = attrs.htmlAttrs, classNames = attrs.classNames;
15761
15752
  return __assign$1(__assign$1({}, htmlAttrs), { class: classNames ? classNames.join(' ') : null });
15762
15753
  }
@@ -17103,7 +17094,7 @@ var ImageView = /** @class */ (function () {
17103
17094
  ImageView.prototype.createImageElement = function (node) {
17104
17095
  var image = document.createElement('img');
17105
17096
  var _a = node.attrs, imageUrl = _a.imageUrl, altText = _a.altText;
17106
- var attrs = getCustomAttrs$1(node.attrs);
17097
+ var attrs = getCustomAttrs(node.attrs);
17107
17098
  image.src = imageUrl;
17108
17099
  if (altText) {
17109
17100
  image.alt = altText;
@@ -17173,7 +17164,7 @@ var CodeBlockView = /** @class */ (function () {
17173
17164
  var pre = document.createElement('pre');
17174
17165
  var code = document.createElement('code');
17175
17166
  var language = this.node.attrs.language;
17176
- var attrs = getCustomAttrs$1(this.node.attrs);
17167
+ var attrs = getCustomAttrs(this.node.attrs);
17177
17168
  if (language) {
17178
17169
  code.setAttribute('data-language', language);
17179
17170
  }
@@ -17754,7 +17745,7 @@ var Paragraph = /** @class */ (function (_super) {
17754
17745
  parseDOM: [{ tag: 'p' }],
17755
17746
  toDOM: function (_a) {
17756
17747
  var attrs = _a.attrs;
17757
- return ['p', getCustomAttrs$1(attrs), 0];
17748
+ return ['p', getCustomAttrs(attrs), 0];
17758
17749
  },
17759
17750
  };
17760
17751
  },
@@ -17863,7 +17854,7 @@ var Heading = /** @class */ (function (_super) {
17863
17854
  parseDOM: parseDOM,
17864
17855
  toDOM: function (_a) {
17865
17856
  var attrs = _a.attrs;
17866
- return ["h" + attrs.level, getCustomAttrs$1(attrs), 0];
17857
+ return ["h" + attrs.level, getCustomAttrs(attrs), 0];
17867
17858
  },
17868
17859
  };
17869
17860
  },
@@ -17915,7 +17906,7 @@ var CodeBlock = /** @class */ (function (_super) {
17915
17906
  var attrs = _a.attrs;
17916
17907
  return [
17917
17908
  attrs.rawHTML || 'pre',
17918
- ['code', __assign$1({ 'data-language': attrs.language }, getCustomAttrs$1(attrs)), 0],
17909
+ ['code', __assign$1({ 'data-language': attrs.language }, getCustomAttrs(attrs)), 0],
17919
17910
  ];
17920
17911
  },
17921
17912
  };
@@ -17984,7 +17975,7 @@ var BulletList = /** @class */ (function (_super) {
17984
17975
  parseDOM: [createDOMInfoParsedRawHTML('ul')],
17985
17976
  toDOM: function (_a) {
17986
17977
  var attrs = _a.attrs;
17987
- return ['ul', getCustomAttrs$1(attrs), 0];
17978
+ return ['ul', getCustomAttrs(attrs), 0];
17988
17979
  },
17989
17980
  };
17990
17981
  },
@@ -18045,7 +18036,7 @@ var OrderedList = /** @class */ (function (_super) {
18045
18036
  var attrs = _a.attrs;
18046
18037
  return [
18047
18038
  attrs.rawHTML || 'ol',
18048
- __assign$1({ start: attrs.order === 1 ? null : attrs.order }, getCustomAttrs$1(attrs)),
18039
+ __assign$1({ start: attrs.order === 1 ? null : attrs.order }, getCustomAttrs(attrs)),
18049
18040
  0,
18050
18041
  ];
18051
18042
  },
@@ -18183,7 +18174,7 @@ var BlockQuote = /** @class */ (function (_super) {
18183
18174
  parseDOM: [createDOMInfoParsedRawHTML('blockquote')],
18184
18175
  toDOM: function (_a) {
18185
18176
  var attrs = _a.attrs;
18186
- return ['blockquote', getCustomAttrs$1(attrs), 0];
18177
+ return ['blockquote', getCustomAttrs(attrs), 0];
18187
18178
  },
18188
18179
  };
18189
18180
  },
@@ -18420,7 +18411,7 @@ var Table = /** @class */ (function (_super) {
18420
18411
  parseDOM: [createDOMInfoParsedRawHTML('table')],
18421
18412
  toDOM: function (_a) {
18422
18413
  var attrs = _a.attrs;
18423
- return ['table', getCustomAttrs$1(attrs), 0];
18414
+ return ['table', getCustomAttrs(attrs), 0];
18424
18415
  },
18425
18416
  };
18426
18417
  },
@@ -18770,7 +18761,7 @@ var TableHead = /** @class */ (function (_super) {
18770
18761
  parseDOM: [createDOMInfoParsedRawHTML('thead')],
18771
18762
  toDOM: function (_a) {
18772
18763
  var attrs = _a.attrs;
18773
- return ['thead', getCustomAttrs$1(attrs), 0];
18764
+ return ['thead', getCustomAttrs(attrs), 0];
18774
18765
  },
18775
18766
  };
18776
18767
  },
@@ -18813,7 +18804,7 @@ var TableBody = /** @class */ (function (_super) {
18813
18804
  ],
18814
18805
  toDOM: function (_a) {
18815
18806
  var attrs = _a.attrs;
18816
- return ['tbody', getCustomAttrs$1(attrs), 0];
18807
+ return ['tbody', getCustomAttrs(attrs), 0];
18817
18808
  },
18818
18809
  };
18819
18810
  },
@@ -18855,7 +18846,7 @@ var TableRow = /** @class */ (function (_super) {
18855
18846
  ],
18856
18847
  toDOM: function (_a) {
18857
18848
  var attrs = _a.attrs;
18858
- return ['tr', getCustomAttrs$1(attrs), 0];
18849
+ return ['tr', getCustomAttrs(attrs), 0];
18859
18850
  },
18860
18851
  };
18861
18852
  },
@@ -18887,7 +18878,7 @@ var TableHeadCell = /** @class */ (function (_super) {
18887
18878
  toDOM: function (_a) {
18888
18879
  var attrs = _a.attrs;
18889
18880
  var cellAttrs = createCellAttrs(attrs);
18890
- return ['th', __assign$1(__assign$1({}, cellAttrs), getCustomAttrs$1(attrs)), 0];
18881
+ return ['th', __assign$1(__assign$1({}, cellAttrs), getCustomAttrs(attrs)), 0];
18891
18882
  },
18892
18883
  };
18893
18884
  },
@@ -18973,7 +18964,7 @@ var Image = /** @class */ (function (_super) {
18973
18964
  var attrs = _a.attrs;
18974
18965
  return [
18975
18966
  attrs.rawHTML || 'img',
18976
- __assign$1(__assign$1({ src: escapeXml$1(attrs.imageUrl) }, (attrs.altText && { alt: attrs.altText })), getCustomAttrs$1(attrs)),
18967
+ __assign$1(__assign$1({ src: escapeXml$1(attrs.imageUrl) }, (attrs.altText && { alt: attrs.altText })), getCustomAttrs(attrs)),
18977
18968
  ];
18978
18969
  },
18979
18970
  };
@@ -19023,7 +19014,7 @@ var ThematicBreak = /** @class */ (function (_super) {
19023
19014
  selectable: false,
19024
19015
  toDOM: function (_a) {
19025
19016
  var attrs = _a.attrs;
19026
- return ['div', getCustomAttrs$1(attrs), [attrs.rawHTML || 'hr']];
19017
+ return ['div', getCustomAttrs(attrs), [attrs.rawHTML || 'hr']];
19027
19018
  },
19028
19019
  };
19029
19020
  },
@@ -19093,7 +19084,7 @@ var Strong = /** @class */ (function (_super) {
19093
19084
  parseDOM: parseDOM,
19094
19085
  toDOM: function (_a) {
19095
19086
  var attrs = _a.attrs;
19096
- return [attrs.rawHTML || 'strong', getCustomAttrs$1(attrs)];
19087
+ return [attrs.rawHTML || 'strong', getCustomAttrs(attrs)];
19097
19088
  },
19098
19089
  };
19099
19090
  },
@@ -19144,7 +19135,7 @@ var Emph = /** @class */ (function (_super) {
19144
19135
  parseDOM: parseDOM,
19145
19136
  toDOM: function (_a) {
19146
19137
  var attrs = _a.attrs;
19147
- return [attrs.rawHTML || 'em', getCustomAttrs$1(attrs)];
19138
+ return [attrs.rawHTML || 'em', getCustomAttrs(attrs)];
19148
19139
  },
19149
19140
  };
19150
19141
  },
@@ -19195,7 +19186,7 @@ var Strike = /** @class */ (function (_super) {
19195
19186
  parseDOM: parseDOM,
19196
19187
  toDOM: function (_a) {
19197
19188
  var attrs = _a.attrs;
19198
- return [attrs.rawHTML || 'del', getCustomAttrs$1(attrs)];
19189
+ return [attrs.rawHTML || 'del', getCustomAttrs(attrs)];
19199
19190
  },
19200
19191
  };
19201
19192
  },
@@ -19322,7 +19313,7 @@ var Code = /** @class */ (function (_super) {
19322
19313
  ],
19323
19314
  toDOM: function (_a) {
19324
19315
  var attrs = _a.attrs;
19325
- return [attrs.rawHTML || 'code', getCustomAttrs$1(attrs)];
19316
+ return [attrs.rawHTML || 'code', getCustomAttrs(attrs)];
19326
19317
  },
19327
19318
  };
19328
19319
  },
@@ -21174,42 +21165,30 @@ var toMdConvertors = {
21174
21165
  text: node.textContent,
21175
21166
  };
21176
21167
  },
21177
- strong: function (_a, _b, betweenSpace) {
21168
+ strong: function (_a, _b) {
21178
21169
  var node = _a.node;
21179
21170
  var entering = _b.entering;
21180
21171
  var rawHTML = node.attrs.rawHTML;
21181
- var delim = '**';
21182
- if (!betweenSpace) {
21183
- delim = entering ? '<strong>' : '</strong>';
21184
- }
21185
21172
  return {
21186
- delim: delim,
21173
+ delim: '**',
21187
21174
  rawHTML: entering ? getOpenRawHTML(rawHTML) : getCloseRawHTML(rawHTML),
21188
21175
  };
21189
21176
  },
21190
- emph: function (_a, _b, betweenSpace) {
21177
+ emph: function (_a, _b) {
21191
21178
  var node = _a.node;
21192
21179
  var entering = _b.entering;
21193
21180
  var rawHTML = node.attrs.rawHTML;
21194
- var delim = '*';
21195
- if (!betweenSpace) {
21196
- delim = entering ? '<em>' : '</em>';
21197
- }
21198
21181
  return {
21199
- delim: delim,
21182
+ delim: '*',
21200
21183
  rawHTML: entering ? getOpenRawHTML(rawHTML) : getCloseRawHTML(rawHTML),
21201
21184
  };
21202
21185
  },
21203
- strike: function (_a, _b, betweenSpace) {
21186
+ strike: function (_a, _b) {
21204
21187
  var node = _a.node;
21205
21188
  var entering = _b.entering;
21206
21189
  var rawHTML = node.attrs.rawHTML;
21207
- var delim = '~~';
21208
- if (!betweenSpace) {
21209
- delim = entering ? '<del>' : '</del>';
21210
- }
21211
21190
  return {
21212
- delim: delim,
21191
+ delim: '~~',
21213
21192
  rawHTML: entering ? getOpenRawHTML(rawHTML) : getCloseRawHTML(rawHTML),
21214
21193
  };
21215
21194
  },
@@ -21316,7 +21295,7 @@ function createMarkTypeConvertors(convertors) {
21316
21295
  var markTypeConvertors = {};
21317
21296
  var markTypes = Object.keys(markTypeOptions);
21318
21297
  markTypes.forEach(function (type) {
21319
- markTypeConvertors[type] = function (nodeInfo, entering, betweenSpace) {
21298
+ markTypeConvertors[type] = function (nodeInfo, entering) {
21320
21299
  var markOption = markTypeOptions[type];
21321
21300
  var convertor = convertors[type];
21322
21301
  // There are two ways to call the mark type converter
@@ -21324,9 +21303,7 @@ function createMarkTypeConvertors(convertors) {
21324
21303
  // When calling the converter without using `delim` and `rawHTML` values,
21325
21304
  // the converter is called without parameters.
21326
21305
  var runConvertor = convertor && nodeInfo && !isUndefined_1(entering);
21327
- var params = runConvertor
21328
- ? convertor(nodeInfo, { entering: entering }, betweenSpace)
21329
- : {};
21306
+ var params = runConvertor ? convertor(nodeInfo, { entering: entering }) : {};
21330
21307
  return __assign$1(__assign$1({}, params), markOption);
21331
21308
  };
21332
21309
  });
@@ -21387,20 +21364,10 @@ var ToMdConvertorState = /** @class */ (function () {
21387
21364
  ToMdConvertorState.prototype.isInBlank = function () {
21388
21365
  return /(^|\n)$/.test(this.result);
21389
21366
  };
21390
- ToMdConvertorState.prototype.isBetweenSpaces = function (parent, index) {
21391
- var _a, _b;
21392
- var content = parent.content;
21393
- var isFrontNodeEndWithSpace = index === 0 ||
21394
- isEndWithSpace((_a = content.child(index - 1).text) !== null && _a !== void 0 ? _a : DEFAULT_TEXT_NOT_START_OR_END_WITH_SPACE);
21395
- var isRearNodeStartWithSpace = index >= content.childCount - 1 ||
21396
- isStartWithSpace((_b = content.child(index + 1).text) !== null && _b !== void 0 ? _b : DEFAULT_TEXT_NOT_START_OR_END_WITH_SPACE);
21397
- return isFrontNodeEndWithSpace && isRearNodeStartWithSpace;
21398
- };
21399
21367
  ToMdConvertorState.prototype.markText = function (mark, entering, parent, index) {
21400
21368
  var convertor = this.getMarkConvertor(mark);
21401
21369
  if (convertor) {
21402
- var betweenSpace = this.isBetweenSpaces(parent, entering ? index : index - 1);
21403
- var _a = convertor({ node: mark, parent: parent, index: index }, entering, betweenSpace), delim = _a.delim, rawHTML = _a.rawHTML;
21370
+ var _a = convertor({ node: mark, parent: parent, index: index }, entering), delim = _a.delim, rawHTML = _a.rawHTML;
21404
21371
  return rawHTML || delim;
21405
21372
  }
21406
21373
  return '';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @toast-ui/editor : viewer
3
- * @version 3.2.0 | Fri Aug 05 2022
3
+ * @version 3.2.2 | Fri Feb 17 2023
4
4
  * @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
5
5
  * @license MIT
6
6
  */
package/dist/i18n/ar.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * TOAST UI Editor : i18n
3
- * @version 3.2.0
3
+ * @version 3.2.2
4
4
  * @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
5
5
  * @license MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * TOAST UI Editor : i18n
3
- * @version 3.2.0
3
+ * @version 3.2.2
4
4
  * @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
5
5
  * @license MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * TOAST UI Editor : i18n
3
- * @version 3.2.0
3
+ * @version 3.2.2
4
4
  * @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
5
5
  * @license MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * TOAST UI Editor : i18n
3
- * @version 3.2.0
3
+ * @version 3.2.2
4
4
  * @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
5
5
  * @license MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * TOAST UI Editor : i18n
3
- * @version 3.2.0
3
+ * @version 3.2.2
4
4
  * @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
5
5
  * @license MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * TOAST UI Editor : i18n
3
- * @version 3.2.0
3
+ * @version 3.2.2
4
4
  * @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
5
5
  * @license MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * TOAST UI Editor : i18n
3
- * @version 3.2.0
3
+ * @version 3.2.2
4
4
  * @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
5
5
  * @license MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * TOAST UI Editor : i18n
3
- * @version 3.2.0
3
+ * @version 3.2.2
4
4
  * @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
5
5
  * @license MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * TOAST UI Editor : i18n
3
- * @version 3.2.0
3
+ * @version 3.2.2
4
4
  * @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
5
5
  * @license MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * TOAST UI Editor : i18n
3
- * @version 3.2.0
3
+ * @version 3.2.2
4
4
  * @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
5
5
  * @license MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * TOAST UI Editor : i18n
3
- * @version 3.2.0
3
+ * @version 3.2.2
4
4
  * @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
5
5
  * @license MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * TOAST UI Editor : i18n
3
- * @version 3.2.0
3
+ * @version 3.2.2
4
4
  * @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
5
5
  * @license MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * TOAST UI Editor : i18n
3
- * @version 3.2.0
3
+ * @version 3.2.2
4
4
  * @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
5
5
  * @license MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * TOAST UI Editor : i18n
3
- * @version 3.2.0
3
+ * @version 3.2.2
4
4
  * @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
5
5
  * @license MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * TOAST UI Editor : i18n
3
- * @version 3.2.0
3
+ * @version 3.2.2
4
4
  * @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
5
5
  * @license MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * TOAST UI Editor : i18n
3
- * @version 3.2.0
3
+ * @version 3.2.2
4
4
  * @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
5
5
  * @license MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * TOAST UI Editor : i18n
3
- * @version 3.2.0
3
+ * @version 3.2.2
4
4
  * @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
5
5
  * @license MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * TOAST UI Editor : i18n
3
- * @version 3.2.0
3
+ * @version 3.2.2
4
4
  * @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
5
5
  * @license MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * TOAST UI Editor : i18n
3
- * @version 3.2.0
3
+ * @version 3.2.2
4
4
  * @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
5
5
  * @license MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * TOAST UI Editor : i18n
3
- * @version 3.2.0
3
+ * @version 3.2.2
4
4
  * @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
5
5
  * @license MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * TOAST UI Editor : i18n
3
- * @version 3.2.0
3
+ * @version 3.2.2
4
4
  * @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
5
5
  * @license MIT
6
6
  */
@@ -1,10 +1,9 @@
1
1
  /*!
2
2
  * @toast-ui/editor
3
- * @version 3.2.0 | Fri Aug 05 2022
3
+ * @version 3.2.2 | Fri Feb 17 2023
4
4
  * @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
5
5
  * @license MIT
6
6
  */
7
- @charset "utf-8";
8
7
  /* height */
9
8
  .auto-height,
10
9
  .auto-height .toastui-editor-defaultUI {
@@ -894,6 +893,7 @@
894
893
  max-width: none;
895
894
  }
896
895
  }
896
+
897
897
  .toastui-editor-contents .toastui-editor-md-preview-highlight {
898
898
  position: relative;
899
899
  z-index: 0;
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * @toast-ui/editor
3
- * @version 3.2.0 | Fri Aug 05 2022
3
+ * @version 3.2.2 | Fri Feb 17 2023
4
4
  * @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
5
5
  * @license MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * @toast-ui/editor
3
- * @version 3.2.0 | Fri Aug 05 2022
3
+ * @version 3.2.2 | Fri Feb 17 2023
4
4
  * @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
5
5
  * @license MIT
6
6
  */
@@ -12088,7 +12088,6 @@ var reHTMLTag = new RegExp("^" + constants_HTML_TAG, 'i');
12088
12088
  var constants_reBR = /<br\s*\/*>/i;
12089
12089
  var reHTMLComment = /<! ---->|<!--(?:-?[^>-])(?:-?[^-])*-->/;
12090
12090
  var constants_ALTERNATIVE_TAG_FOR_BR = '</p><p>';
12091
- var DEFAULT_TEXT_NOT_START_OR_END_WITH_SPACE = 'a';
12092
12091
 
12093
12092
  // EXTERNAL MODULE: ../../node_modules/tui-code-snippet/type/isNull.js
12094
12093
  var type_isNull = __webpack_require__(934);
@@ -12317,14 +12316,6 @@ function common_assign(targetObj, obj) {
12317
12316
  function getSortedNumPair(valueA, valueB) {
12318
12317
  return valueA > valueB ? [valueB, valueA] : [valueA, valueB];
12319
12318
  }
12320
- function isStartWithSpace(text) {
12321
- var reStartWithSpace = /^\s(\S*)/g;
12322
- return reStartWithSpace.test(text);
12323
- }
12324
- function isEndWithSpace(text) {
12325
- var reEndWithSpace = /(\S*)\s$/g;
12326
- return reEndWithSpace.test(text);
12327
- }
12328
12319
 
12329
12320
  ;// CONCATENATED MODULE: ./src/utils/dom.ts
12330
12321
 
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * @toast-ui/editor
3
- * @version 3.2.0 | Fri Aug 05 2022
3
+ * @version 3.2.2 | Fri Feb 17 2023
4
4
  * @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
5
5
  * @license MIT
6
6
  */
@@ -56,7 +56,6 @@ img.ProseMirror-separator {
56
56
  margin: 0 !important;
57
57
  }
58
58
 
59
- @charset "utf-8";
60
59
  /* height */
61
60
  .auto-height,
62
61
  .auto-height .toastui-editor-defaultUI {
@@ -946,6 +945,7 @@ img.ProseMirror-separator {
946
945
  max-width: none;
947
946
  }
948
947
  }
948
+
949
949
  /*
950
950
  z-index basis
951
951
  -1: pseudo element
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * @toast-ui/editor
3
- * @version 3.2.0 | Fri Aug 05 2022
3
+ * @version 3.2.2 | Fri Feb 17 2023
4
4
  * @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
5
5
  * @license MIT
6
6
  */
@@ -3602,14 +3602,6 @@ function common_assign(targetObj, obj) {
3602
3602
  function getSortedNumPair(valueA, valueB) {
3603
3603
  return valueA > valueB ? [valueB, valueA] : [valueA, valueB];
3604
3604
  }
3605
- function isStartWithSpace(text) {
3606
- var reStartWithSpace = /^\s(\S*)/g;
3607
- return reStartWithSpace.test(text);
3608
- }
3609
- function isEndWithSpace(text) {
3610
- var reEndWithSpace = /(\S*)\s$/g;
3611
- return reEndWithSpace.test(text);
3612
- }
3613
3605
 
3614
3606
  // EXTERNAL MODULE: external {"commonjs":"prosemirror-view","commonjs2":"prosemirror-view","amd":"prosemirror-view"}
3615
3607
  var external_commonjs_prosemirror_view_commonjs2_prosemirror_view_amd_prosemirror_view_ = __webpack_require__(311);
@@ -4014,7 +4006,6 @@ var reHTMLTag = new RegExp("^" + HTML_TAG, 'i');
4014
4006
  var reBR = /<br\s*\/*>/i;
4015
4007
  var reHTMLComment = /<! ---->|<!--(?:-?[^>-])(?:-?[^-])*-->/;
4016
4008
  var ALTERNATIVE_TAG_FOR_BR = '</p><p>';
4017
- var DEFAULT_TEXT_NOT_START_OR_END_WITH_SPACE = 'a';
4018
4009
 
4019
4010
  ;// CONCATENATED MODULE: ./src/utils/dom.ts
4020
4011
 
@@ -22741,42 +22732,30 @@ var toMdConvertors = {
22741
22732
  text: node.textContent,
22742
22733
  };
22743
22734
  },
22744
- strong: function (_a, _b, betweenSpace) {
22735
+ strong: function (_a, _b) {
22745
22736
  var node = _a.node;
22746
22737
  var entering = _b.entering;
22747
22738
  var rawHTML = node.attrs.rawHTML;
22748
- var delim = '**';
22749
- if (!betweenSpace) {
22750
- delim = entering ? '<strong>' : '</strong>';
22751
- }
22752
22739
  return {
22753
- delim: delim,
22740
+ delim: '**',
22754
22741
  rawHTML: entering ? getOpenRawHTML(rawHTML) : getCloseRawHTML(rawHTML),
22755
22742
  };
22756
22743
  },
22757
- emph: function (_a, _b, betweenSpace) {
22744
+ emph: function (_a, _b) {
22758
22745
  var node = _a.node;
22759
22746
  var entering = _b.entering;
22760
22747
  var rawHTML = node.attrs.rawHTML;
22761
- var delim = '*';
22762
- if (!betweenSpace) {
22763
- delim = entering ? '<em>' : '</em>';
22764
- }
22765
22748
  return {
22766
- delim: delim,
22749
+ delim: '*',
22767
22750
  rawHTML: entering ? getOpenRawHTML(rawHTML) : getCloseRawHTML(rawHTML),
22768
22751
  };
22769
22752
  },
22770
- strike: function (_a, _b, betweenSpace) {
22753
+ strike: function (_a, _b) {
22771
22754
  var node = _a.node;
22772
22755
  var entering = _b.entering;
22773
22756
  var rawHTML = node.attrs.rawHTML;
22774
- var delim = '~~';
22775
- if (!betweenSpace) {
22776
- delim = entering ? '<del>' : '</del>';
22777
- }
22778
22757
  return {
22779
- delim: delim,
22758
+ delim: '~~',
22780
22759
  rawHTML: entering ? getOpenRawHTML(rawHTML) : getCloseRawHTML(rawHTML),
22781
22760
  };
22782
22761
  },
@@ -22883,7 +22862,7 @@ function createMarkTypeConvertors(convertors) {
22883
22862
  var markTypeConvertors = {};
22884
22863
  var markTypes = Object.keys(markTypeOptions);
22885
22864
  markTypes.forEach(function (type) {
22886
- markTypeConvertors[type] = function (nodeInfo, entering, betweenSpace) {
22865
+ markTypeConvertors[type] = function (nodeInfo, entering) {
22887
22866
  var markOption = markTypeOptions[type];
22888
22867
  var convertor = convertors[type];
22889
22868
  // There are two ways to call the mark type converter
@@ -22891,9 +22870,7 @@ function createMarkTypeConvertors(convertors) {
22891
22870
  // When calling the converter without using `delim` and `rawHTML` values,
22892
22871
  // the converter is called without parameters.
22893
22872
  var runConvertor = convertor && nodeInfo && !isUndefined_default()(entering);
22894
- var params = runConvertor
22895
- ? convertor(nodeInfo, { entering: entering }, betweenSpace)
22896
- : {};
22873
+ var params = runConvertor ? convertor(nodeInfo, { entering: entering }) : {};
22897
22874
  return __assign(__assign({}, params), markOption);
22898
22875
  };
22899
22876
  });
@@ -22937,7 +22914,6 @@ function createMdConvertors(customConvertors) {
22937
22914
 
22938
22915
  ;// CONCATENATED MODULE: ./src/convertors/toMarkdown/toMdConvertorState.ts
22939
22916
 
22940
-
22941
22917
  var ToMdConvertorState = /** @class */ (function () {
22942
22918
  function ToMdConvertorState(_a) {
22943
22919
  var nodeTypeConvertors = _a.nodeTypeConvertors, markTypeConvertors = _a.markTypeConvertors;
@@ -22957,20 +22933,10 @@ var ToMdConvertorState = /** @class */ (function () {
22957
22933
  ToMdConvertorState.prototype.isInBlank = function () {
22958
22934
  return /(^|\n)$/.test(this.result);
22959
22935
  };
22960
- ToMdConvertorState.prototype.isBetweenSpaces = function (parent, index) {
22961
- var _a, _b;
22962
- var content = parent.content;
22963
- var isFrontNodeEndWithSpace = index === 0 ||
22964
- isEndWithSpace((_a = content.child(index - 1).text) !== null && _a !== void 0 ? _a : DEFAULT_TEXT_NOT_START_OR_END_WITH_SPACE);
22965
- var isRearNodeStartWithSpace = index >= content.childCount - 1 ||
22966
- isStartWithSpace((_b = content.child(index + 1).text) !== null && _b !== void 0 ? _b : DEFAULT_TEXT_NOT_START_OR_END_WITH_SPACE);
22967
- return isFrontNodeEndWithSpace && isRearNodeStartWithSpace;
22968
- };
22969
22936
  ToMdConvertorState.prototype.markText = function (mark, entering, parent, index) {
22970
22937
  var convertor = this.getMarkConvertor(mark);
22971
22938
  if (convertor) {
22972
- var betweenSpace = this.isBetweenSpaces(parent, entering ? index : index - 1);
22973
- var _a = convertor({ node: mark, parent: parent, index: index }, entering, betweenSpace), delim = _a.delim, rawHTML = _a.rawHTML;
22939
+ var _a = convertor({ node: mark, parent: parent, index: index }, entering), delim = _a.delim, rawHTML = _a.rawHTML;
22974
22940
  return rawHTML || delim;
22975
22941
  }
22976
22942
  return '';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@toast-ui/editor",
3
- "version": "3.2.0",
3
+ "version": "3.2.2",
4
4
  "description": "GFM Markdown Wysiwyg Editor - Productive and Extensible",
5
5
  "keywords": [
6
6
  "nhn",
@@ -113,8 +113,7 @@ export type ToMdNodeTypeConvertorMap = Partial<Record<WwNodeType, ToMdNodeTypeCo
113
113
 
114
114
  type ToMdMarkTypeConvertor = (
115
115
  nodeInfo?: MarkInfo,
116
- entering?: boolean,
117
- betweenSpace?: boolean
116
+ entering?: boolean
118
117
  ) => ToMdConvertorReturnValues & ToMdMarkTypeOption;
119
118
 
120
119
  export type ToMdMarkTypeConvertorMap = Partial<Record<WwMarkType, ToMdMarkTypeConvertor>>;
@@ -127,8 +126,7 @@ interface ToMdConvertorContext {
127
126
 
128
127
  type ToMdConvertor = (
129
128
  nodeInfo: NodeInfo | MarkInfo,
130
- context: ToMdConvertorContext,
131
- betweenSpace?: boolean
129
+ context: ToMdConvertorContext
132
130
  ) => ToMdConvertorReturnValues;
133
131
 
134
132
  export type ToMdConvertorMap = Partial<Record<WwNodeType | MdNodeType, ToMdConvertor>>;
package/types/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- // Type definitions for TOAST UI Editor v3.2.0
1
+ // Type definitions for TOAST UI Editor v3.2.2
2
2
  // TypeScript Version: 4.2.3
3
3
  import {
4
4
  EditorCore,