@toast-ui/editor 3.2.1 → 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 +10 -43
  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.1 | Thu Sep 29 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.1 | Thu Sep 29 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.1 | Thu Sep 29 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.1 | Thu Sep 29 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.1 | Thu Sep 29 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.1 | Thu Sep 29 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.1 | Thu Sep 29 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.1 | Thu Sep 29 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.1 | Thu Sep 29 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.1 | Thu Sep 29 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.1 | Thu Sep 29 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.1 | Thu Sep 29 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.1 | Thu Sep 29 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.1 | Thu Sep 29 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.1 | Thu Sep 29 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.1 | Thu Sep 29 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.1 | Thu Sep 29 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.1 | Thu Sep 29 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.1 | Thu Sep 29 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.1 | Thu Sep 29 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.1 | Thu Sep 29 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.1 | Thu Sep 29 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.1 | Thu Sep 29 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.1 | Thu Sep 29 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);
@@ -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.1 | Thu Sep 29 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.1
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.1
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.1
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.1
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.1
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.1
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.1
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.1
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.1
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.1
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.1
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.1
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.1
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.1
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.1
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.1
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.1
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.1
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.1
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.1
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.1
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.1 | Thu Sep 29 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.1 | Thu Sep 29 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.1 | Thu Sep 29 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.1 | Thu Sep 29 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.1 | Thu Sep 29 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.1",
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.1
1
+ // Type definitions for TOAST UI Editor v3.2.2
2
2
  // TypeScript Version: 4.2.3
3
3
  import {
4
4
  EditorCore,