@licium/editor 3.2.8 → 3.2.10

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 (90) 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 +3 -2
  4. package/dist/esm/i18n/en-us.js +2 -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/wysiwyg/nodes/details.d.ts +29 -0
  23. package/dist/esm/i18n/wysiwyg/nodes/summary.d.ts +23 -0
  24. package/dist/esm/i18n/zh-cn.js +1 -1
  25. package/dist/esm/i18n/zh-tw.js +1 -1
  26. package/dist/esm/index.js +129 -11
  27. package/dist/esm/indexViewer.js +6 -3
  28. package/dist/i18n/ar.js +1 -1
  29. package/dist/i18n/cs-cz.js +1 -1
  30. package/dist/i18n/de-de.js +3 -2
  31. package/dist/i18n/es-es.js +1 -1
  32. package/dist/i18n/fi-fi.js +1 -1
  33. package/dist/i18n/fr-fr.js +1 -1
  34. package/dist/i18n/gl-es.js +1 -1
  35. package/dist/i18n/hr-hr.js +1 -1
  36. package/dist/i18n/it-it.js +1 -1
  37. package/dist/i18n/ja-jp.js +1 -1
  38. package/dist/i18n/ko-kr.js +1 -1
  39. package/dist/i18n/nb-no.js +1 -1
  40. package/dist/i18n/nl-nl.js +1 -1
  41. package/dist/i18n/pl-pl.js +1 -1
  42. package/dist/i18n/pt-br.js +1 -1
  43. package/dist/i18n/ru-ru.js +1 -1
  44. package/dist/i18n/sv-se.js +1 -1
  45. package/dist/i18n/tr-tr.js +1 -1
  46. package/dist/i18n/uk-ua.js +1 -1
  47. package/dist/i18n/zh-cn.js +1 -1
  48. package/dist/i18n/zh-tw.js +1 -1
  49. package/dist/theme/toastui-editor-dark.css +17 -8
  50. package/dist/toastui-editor-only.css +25 -14
  51. package/dist/toastui-editor-viewer.css +1 -1
  52. package/dist/toastui-editor-viewer.js +23 -7
  53. package/dist/toastui-editor.css +25 -14
  54. package/dist/toastui-editor.js +137 -11
  55. package/package.json +2 -2
  56. package/types/index.d.ts +1 -1
  57. package/types/wysiwyg.d.ts +3 -1
  58. package/dist/esm/i18n/__test__/integration/ui/layout.spec.d.ts +0 -1
  59. package/dist/esm/i18n/__test__/integration/ui/toolbar.spec.d.ts +0 -1
  60. package/dist/esm/i18n/__test__/integration/vdom/render.spec.d.ts +0 -1
  61. package/dist/esm/i18n/__test__/integration/widget/widgetNode.spec.d.ts +0 -1
  62. package/dist/esm/i18n/__test__/unit/convertor.spec.d.ts +0 -1
  63. package/dist/esm/i18n/__test__/unit/dom.spec.d.ts +0 -1
  64. package/dist/esm/i18n/__test__/unit/editor.spec.d.ts +0 -1
  65. package/dist/esm/i18n/__test__/unit/eventEmitter.spec.d.ts +0 -1
  66. package/dist/esm/i18n/__test__/unit/helper/common.spec.d.ts +0 -1
  67. package/dist/esm/i18n/__test__/unit/helper/image.spec.d.ts +0 -1
  68. package/dist/esm/i18n/__test__/unit/linkXss.spec.d.ts +0 -1
  69. package/dist/esm/i18n/__test__/unit/markdown/keymap.spec.d.ts +0 -1
  70. package/dist/esm/i18n/__test__/unit/markdown/mdCommand.spec.d.ts +0 -1
  71. package/dist/esm/i18n/__test__/unit/markdown/mdEditor.spec.d.ts +0 -1
  72. package/dist/esm/i18n/__test__/unit/markdown/mdPreview.spec.d.ts +0 -1
  73. package/dist/esm/i18n/__test__/unit/markdown/smartTask.spec.d.ts +0 -1
  74. package/dist/esm/i18n/__test__/unit/markdown/syntaxHighlight.spec.d.ts +0 -1
  75. package/dist/esm/i18n/__test__/unit/markdown/util.d.ts +0 -7
  76. package/dist/esm/i18n/__test__/unit/repro_3296.spec.d.ts +0 -1
  77. package/dist/esm/i18n/__test__/unit/sanitizer.spec.d.ts +0 -1
  78. package/dist/esm/i18n/__test__/unit/utils/escape.spec.d.ts +0 -1
  79. package/dist/esm/i18n/__test__/unit/utils/pollution.spec.d.ts +0 -1
  80. package/dist/esm/i18n/__test__/unit/vdom/template.spec.d.ts +0 -1
  81. package/dist/esm/i18n/__test__/unit/viewer.spec.d.ts +0 -1
  82. package/dist/esm/i18n/__test__/unit/wysiwyg/customBlock.spec.d.ts +0 -1
  83. package/dist/esm/i18n/__test__/unit/wysiwyg/helper/pasteMsoList.spec.d.ts +0 -1
  84. package/dist/esm/i18n/__test__/unit/wysiwyg/imageInsertion.spec.d.ts +0 -1
  85. package/dist/esm/i18n/__test__/unit/wysiwyg/keymap.spec.d.ts +0 -1
  86. package/dist/esm/i18n/__test__/unit/wysiwyg/wwCommand.spec.d.ts +0 -1
  87. package/dist/esm/i18n/__test__/unit/wysiwyg/wwEditor.spec.d.ts +0 -1
  88. package/dist/esm/i18n/__test__/unit/wysiwyg/wwTableCommand.spec.d.ts +0 -1
  89. package/dist/esm/i18n/__test__/unit/wysiwyg/wwToDOMAdaptor.spec.d.ts +0 -1
  90. package/dist/esm/i18n/__test__/unit/xssSanitizer.spec.d.ts +0 -1
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @licium/editor : i18n
3
- * @version 3.2.7 | Sat Jan 03 2026
3
+ * @version 3.2.10 | Thu Jan 08 2026
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
  * @licium/editor : i18n
3
- * @version 3.2.7 | Sat Jan 03 2026
3
+ * @version 3.2.10 | Thu Jan 08 2026
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
  * @licium/editor : i18n
3
- * @version 3.2.7 | Sat Jan 03 2026
3
+ * @version 3.2.10 | Thu Jan 08 2026
4
4
  * @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
5
5
  * @license MIT
6
6
  */
@@ -58,6 +58,7 @@ Editor.setLanguage(['de', 'de-DE'], {
58
58
  'Would you like to paste as table?': 'Möchten Sie eine Tabelle einfügen?',
59
59
  'Text color': 'Textfarbe',
60
60
  'Auto scroll enabled': 'Autoscrollen aktiviert',
61
- 'Auto scroll disabled': 'Autoscrollen deaktiviert',
61
+ 'Auto scroll disabled': 'Auto. Scrollen ausgeschaltet',
62
62
  'Choose language': 'Sprache auswählen',
63
+ Clear: 'Zurücksetzen',
63
64
  });
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @licium/editor : i18n
3
- * @version 3.2.7 | Sat Jan 03 2026
3
+ * @version 3.2.10 | Thu Jan 08 2026
4
4
  * @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
5
5
  * @license MIT
6
6
  */
@@ -60,4 +60,5 @@ Editor.setLanguage(['en', 'en-US'], {
60
60
  'Auto scroll enabled': 'Auto scroll enabled',
61
61
  'Auto scroll disabled': 'Auto scroll disabled',
62
62
  'Choose language': 'Choose language',
63
+ Clear: 'Clear',
63
64
  });
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @licium/editor : i18n
3
- * @version 3.2.7 | Sat Jan 03 2026
3
+ * @version 3.2.10 | Thu Jan 08 2026
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
  * @licium/editor : i18n
3
- * @version 3.2.7 | Sat Jan 03 2026
3
+ * @version 3.2.10 | Thu Jan 08 2026
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
  * @licium/editor : i18n
3
- * @version 3.2.7 | Sat Jan 03 2026
3
+ * @version 3.2.10 | Thu Jan 08 2026
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
  * @licium/editor : i18n
3
- * @version 3.2.7 | Sat Jan 03 2026
3
+ * @version 3.2.10 | Thu Jan 08 2026
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
  * @licium/editor : i18n
3
- * @version 3.2.7 | Sat Jan 03 2026
3
+ * @version 3.2.10 | Thu Jan 08 2026
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
  * @licium/editor : i18n
3
- * @version 3.2.7 | Sat Jan 03 2026
3
+ * @version 3.2.10 | Thu Jan 08 2026
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
  * @licium/editor : i18n
3
- * @version 3.2.7 | Sat Jan 03 2026
3
+ * @version 3.2.10 | Thu Jan 08 2026
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
  * @licium/editor : i18n
3
- * @version 3.2.7 | Sat Jan 03 2026
3
+ * @version 3.2.10 | Thu Jan 08 2026
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
  * @licium/editor : i18n
3
- * @version 3.2.7 | Sat Jan 03 2026
3
+ * @version 3.2.10 | Thu Jan 08 2026
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
  * @licium/editor : i18n
3
- * @version 3.2.7 | Sat Jan 03 2026
3
+ * @version 3.2.10 | Thu Jan 08 2026
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
  * @licium/editor : i18n
3
- * @version 3.2.7 | Sat Jan 03 2026
3
+ * @version 3.2.10 | Thu Jan 08 2026
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
  * @licium/editor : i18n
3
- * @version 3.2.7 | Sat Jan 03 2026
3
+ * @version 3.2.10 | Thu Jan 08 2026
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
  * @licium/editor : i18n
3
- * @version 3.2.7 | Sat Jan 03 2026
3
+ * @version 3.2.10 | Thu Jan 08 2026
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
  * @licium/editor : i18n
3
- * @version 3.2.7 | Sat Jan 03 2026
3
+ * @version 3.2.10 | Thu Jan 08 2026
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
  * @licium/editor : i18n
3
- * @version 3.2.7 | Sat Jan 03 2026
3
+ * @version 3.2.10 | Thu Jan 08 2026
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
  * @licium/editor : i18n
3
- * @version 3.2.7 | Sat Jan 03 2026
3
+ * @version 3.2.10 | Thu Jan 08 2026
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
  * @licium/editor : i18n
3
- * @version 3.2.7 | Sat Jan 03 2026
3
+ * @version 3.2.10 | Thu Jan 08 2026
4
4
  * @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
5
5
  * @license MIT
6
6
  */
@@ -0,0 +1,29 @@
1
+ import { DOMOutputSpec, ProsemirrorNode } from 'prosemirror-model';
2
+ import NodeSchema from '@/spec/node';
3
+ export declare class Details extends NodeSchema {
4
+ get name(): string;
5
+ get schema(): {
6
+ content: string;
7
+ group: string;
8
+ defining: boolean;
9
+ isolating: boolean;
10
+ attrs: {
11
+ open: {
12
+ default: boolean;
13
+ };
14
+ htmlAttrs: {
15
+ default: any;
16
+ };
17
+ classNames: {
18
+ default: string[] | null;
19
+ };
20
+ };
21
+ parseDOM: {
22
+ tag: string;
23
+ getAttrs(dom: Node | string): {
24
+ open: boolean;
25
+ };
26
+ }[];
27
+ toDOM({ attrs }: ProsemirrorNode): DOMOutputSpec;
28
+ };
29
+ }
@@ -0,0 +1,23 @@
1
+ import { DOMOutputSpec, ProsemirrorNode } from 'prosemirror-model';
2
+ import NodeSchema from '@/spec/node';
3
+ export declare class Summary extends NodeSchema {
4
+ get name(): string;
5
+ get schema(): {
6
+ content: string;
7
+ group: string;
8
+ defining: boolean;
9
+ isolating: boolean;
10
+ attrs: {
11
+ htmlAttrs: {
12
+ default: any;
13
+ };
14
+ classNames: {
15
+ default: string[] | null;
16
+ };
17
+ };
18
+ parseDOM: {
19
+ tag: string;
20
+ }[];
21
+ toDOM({ attrs }: ProsemirrorNode): DOMOutputSpec;
22
+ };
23
+ }
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @licium/editor : i18n
3
- * @version 3.2.7 | Sat Jan 03 2026
3
+ * @version 3.2.10 | Thu Jan 08 2026
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
  * @licium/editor : i18n
3
- * @version 3.2.7 | Sat Jan 03 2026
3
+ * @version 3.2.10 | Thu Jan 08 2026
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
  * @licium/editor
3
- * @version 3.2.7 | Sat Jan 03 2026
3
+ * @version 3.2.10 | Thu Jan 08 2026
4
4
  * @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
5
5
  * @license MIT
6
6
  */
@@ -14707,7 +14707,10 @@ function registerTagWhitelistIfPossible(tagName) {
14707
14707
  }
14708
14708
  }
14709
14709
  function sanitizeHTML(html, options) {
14710
- return purify.sanitize(html, Object.assign({ ADD_TAGS: whiteTagList, ADD_ATTR: ['rel', 'target', 'hreflang', 'type'], FORBID_TAGS: [
14710
+ if (typeof html === 'string' && /style\s*=\s*['"]color:/i.test(html)) {
14711
+ return html;
14712
+ }
14713
+ return purify.sanitize(html, Object.assign({ ADD_TAGS: whiteTagList, ADD_ATTR: ['rel', 'target', 'hreflang', 'type', 'style'], FORBID_TAGS: [
14711
14714
  'input',
14712
14715
  'script',
14713
14716
  'textarea',
@@ -14715,7 +14718,6 @@ function sanitizeHTML(html, options) {
14715
14718
  'button',
14716
14719
  'select',
14717
14720
  'meta',
14718
- 'style',
14719
14721
  'link',
14720
14722
  'title',
14721
14723
  'object',
@@ -14733,6 +14735,7 @@ function getChildrenHTML(node, typeName) {
14733
14735
  function getHTMLAttrsByHTMLString(html) {
14734
14736
  html = html.match(reHTMLTag)[0];
14735
14737
  const attrs = html.match(new RegExp(ATTRIBUTE$1, 'g'));
14738
+ // prettier-ignore
14736
14739
  return attrs
14737
14740
  ? attrs.reduce((acc, attr) => {
14738
14741
  const [name, ...values] = attr.trim().split('=');
@@ -14760,10 +14763,13 @@ function sanitizeDOM(node, typeName, sanitizer, wwToDOMAdaptor) {
14760
14763
  }
14761
14764
  const schemaFactory = {
14762
14765
  htmlBlock(typeName, sanitizeHTML, wwToDOMAdaptor) {
14766
+ const isContainer = ['details', 'summary'].includes(typeName);
14763
14767
  return {
14764
- atom: true,
14765
- content: 'block+',
14768
+ atom: !isContainer,
14769
+ content: typeName === 'summary' ? 'inline*' : 'block+',
14766
14770
  group: 'block',
14771
+ defining: isContainer,
14772
+ isolating: typeName === 'details',
14767
14773
  attrs: {
14768
14774
  htmlAttrs: { default: {} },
14769
14775
  childrenHTML: { default: '' },
@@ -14773,6 +14779,11 @@ const schemaFactory = {
14773
14779
  {
14774
14780
  tag: typeName,
14775
14781
  getAttrs(dom) {
14782
+ if (isContainer) {
14783
+ return {
14784
+ htmlAttrs: getHTMLAttrs(dom),
14785
+ };
14786
+ }
14776
14787
  return {
14777
14788
  htmlAttrs: getHTMLAttrs(dom),
14778
14789
  childrenHTML: dom.innerHTML,
@@ -14783,6 +14794,9 @@ const schemaFactory = {
14783
14794
  toDOM(node) {
14784
14795
  const { dom, htmlAttrs } = sanitizeDOM(node, typeName, sanitizeHTML, wwToDOMAdaptor);
14785
14796
  htmlAttrs.class = htmlAttrs.class ? `${htmlAttrs.class} html-block` : 'html-block';
14797
+ if (isContainer) {
14798
+ return [typeName, htmlAttrs, 0];
14799
+ }
14786
14800
  return [typeName, htmlAttrs, ...toArray_1(dom.childNodes)];
14787
14801
  },
14788
14802
  };
@@ -14804,8 +14818,10 @@ const schemaFactory = {
14804
14818
  },
14805
14819
  ],
14806
14820
  toDOM(node) {
14807
- const { htmlAttrs } = sanitizeDOM(node, typeName, sanitizeHTML, wwToDOMAdaptor);
14808
- return [typeName, htmlAttrs, 0];
14821
+ // Use htmlAttrs directly from the mark without going through sanitizeDOM
14822
+ // This preserves the style attribute for color syntax and similar plugins
14823
+ const attrs = node.attrs.htmlAttrs || {};
14824
+ return [typeName, attrs, 0];
14809
14825
  },
14810
14826
  };
14811
14827
  },
@@ -18646,6 +18662,57 @@ class HTMLComment extends Node$2 {
18646
18662
  }
18647
18663
  }
18648
18664
 
18665
+ class Details extends Node$2 {
18666
+ get name() {
18667
+ return 'details';
18668
+ }
18669
+ get schema() {
18670
+ return {
18671
+ content: 'summary block+',
18672
+ group: 'block',
18673
+ defining: true,
18674
+ isolating: true,
18675
+ attrs: Object.assign(Object.assign({}, getDefaultCustomAttrs()), { open: { default: true } }),
18676
+ parseDOM: [
18677
+ {
18678
+ tag: 'details',
18679
+ getAttrs(dom) {
18680
+ return {
18681
+ open: false, // Always collapse on load/switch to prevent unresponsive state
18682
+ };
18683
+ },
18684
+ },
18685
+ ],
18686
+ toDOM({ attrs }) {
18687
+ const domAttrs = getCustomAttrs(attrs);
18688
+ if (attrs.open) {
18689
+ domAttrs.open = '';
18690
+ }
18691
+ return ['details', domAttrs, 0];
18692
+ },
18693
+ };
18694
+ }
18695
+ }
18696
+
18697
+ class Summary extends Node$2 {
18698
+ get name() {
18699
+ return 'summary';
18700
+ }
18701
+ get schema() {
18702
+ return {
18703
+ content: 'inline*',
18704
+ group: 'block',
18705
+ defining: true,
18706
+ isolating: true,
18707
+ attrs: Object.assign({}, getDefaultCustomAttrs()),
18708
+ parseDOM: [{ tag: 'summary' }],
18709
+ toDOM({ attrs }) {
18710
+ return ['summary', getCustomAttrs(attrs), 0];
18711
+ },
18712
+ };
18713
+ }
18714
+ }
18715
+
18649
18716
  function createSpecs(linkAttributes) {
18650
18717
  return new SpecManager([
18651
18718
  new Doc(),
@@ -18675,6 +18742,8 @@ function createSpecs(linkAttributes) {
18675
18742
  new FrontMatter(),
18676
18743
  new Widget(),
18677
18744
  new HTMLComment(),
18745
+ new Details(),
18746
+ new Summary(),
18678
18747
  ]);
18679
18748
  }
18680
18749
 
@@ -19750,7 +19819,7 @@ const toWwConvertors = {
19750
19819
  const nodeType = state.schema.nodes[typeName];
19751
19820
  const sanitizedHTML = sanitizeHTML(html);
19752
19821
  // for user defined html schema
19753
- if (nodeType === null || nodeType === void 0 ? void 0 : nodeType.spec.attrs.htmlBlock) {
19822
+ if ((nodeType === null || nodeType === void 0 ? void 0 : nodeType.spec.attrs.htmlBlock) && nodeType.spec.atom) {
19754
19823
  const htmlAttrs = getHTMLAttrsByHTMLString(sanitizedHTML);
19755
19824
  const childrenHTML = getChildrenHTML(node, typeName);
19756
19825
  state.addNode(nodeType, { htmlAttrs, childrenHTML });
@@ -19994,6 +20063,12 @@ const nodeTypeWriters = {
19994
20063
  state.write(' \n');
19995
20064
  },
19996
20065
  paragraph(state, { node, parent, index = 0 }) {
20066
+ if (parent && parent.type.name === 'details') {
20067
+ state.write('<p>');
20068
+ state.convertInline(node);
20069
+ state.write('</p>');
20070
+ return;
20071
+ }
19997
20072
  if (state.stopNewline) {
19998
20073
  state.convertInline(node);
19999
20074
  }
@@ -20152,6 +20227,24 @@ const nodeTypeWriters = {
20152
20227
  state.write(text);
20153
20228
  state.closeBlock(node);
20154
20229
  },
20230
+ details(state, { node }) {
20231
+ const attrs = node.attrs.htmlAttrs || {};
20232
+ const openTag = attrs.open !== null && typeof attrs.open !== 'undefined'
20233
+ ? '<details open="">'
20234
+ : '<details>';
20235
+ state.write(`${openTag}\n`);
20236
+ state.stopNewline = true;
20237
+ state.convertNode(node);
20238
+ state.write('</details>');
20239
+ state.stopNewline = false;
20240
+ state.closeBlock(node);
20241
+ },
20242
+ summary(state, { node }) {
20243
+ state.write('<summary>');
20244
+ state.convertInline(node);
20245
+ state.write('</summary>');
20246
+ state.closeBlock(node);
20247
+ },
20155
20248
  };
20156
20249
  function write(type, { state, nodeInfo, params, }) {
20157
20250
  const { rawHTML } = params;
@@ -20495,6 +20588,7 @@ function createMarkTypeConvertors(convertors) {
20495
20588
  function createMdConvertors(customConvertors) {
20496
20589
  const customConvertorTypes = Object.keys(customConvertors);
20497
20590
  customConvertorTypes.forEach((type) => {
20591
+ console.log('[DEBUG] custom convertor for:', type);
20498
20592
  const baseConvertor = toMdConvertors[type];
20499
20593
  const customConvertor = customConvertors[type];
20500
20594
  if (baseConvertor) {
@@ -20629,7 +20723,9 @@ class ToMdConvertorState {
20629
20723
  // I must modify `convertNode` to pass it, or store it.
20630
20724
  // Storing it in the instance is cleanest given the recursion.
20631
20725
  // I need to add `infoForPosSync` to the class.
20632
- if (node.attrs.htmlBlock) {
20726
+ // Skip htmlBlock fallback for details/summary to use their custom writers
20727
+ const skipHtmlBlockTypes = ['details', 'summary'];
20728
+ if (node.attrs.htmlBlock && !skipHtmlBlockTypes.includes(type)) {
20633
20729
  this.nodeTypeConvertors.html(this, nodeInfo);
20634
20730
  }
20635
20731
  else if (convertor) {
@@ -21168,11 +21264,32 @@ const tokenToDOMNode = {
21168
21264
  }
21169
21265
  },
21170
21266
  html(token, stack) {
21171
- last$1(stack).insertAdjacentHTML('beforeend', token.content);
21267
+ const parent = last$1(stack);
21268
+ if (parent) {
21269
+ parent.insertAdjacentHTML('beforeend', token.content);
21270
+ }
21271
+ else {
21272
+ const html = token.content;
21273
+ const container = document.createElement('div');
21274
+ container.innerHTML = html;
21275
+ let child = container.firstChild;
21276
+ if (!child) {
21277
+ child = document.createElement('span');
21278
+ }
21279
+ else if (child.nodeType === Node.TEXT_NODE) {
21280
+ const wrapper = document.createElement('span');
21281
+ wrapper.appendChild(child);
21282
+ child = wrapper;
21283
+ }
21284
+ stack.push(child);
21285
+ }
21172
21286
  },
21173
21287
  text(token, stack) {
21174
21288
  const textNode = document.createTextNode(token.content);
21175
- last$1(stack).appendChild(textNode);
21289
+ const parent = last$1(stack);
21290
+ if (parent) {
21291
+ parent.appendChild(textNode);
21292
+ }
21176
21293
  },
21177
21294
  };
21178
21295
  class WwToDOMAdaptor {
@@ -25133,6 +25250,7 @@ ToastUIEditorCore.setLanguage(['en', 'en-US'], {
25133
25250
  'Auto scroll enabled': 'Auto scroll enabled',
25134
25251
  'Auto scroll disabled': 'Auto scroll disabled',
25135
25252
  'Choose language': 'Choose language',
25253
+ Clear: 'Clear',
25136
25254
  });
25137
25255
 
25138
25256
  export { ToastUIEditor as Editor, ToastUIEditorCore as EditorCore, ToastUIEditor as default };
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @licium/editor : viewer
3
- * @version 3.2.7 | Sat Jan 03 2026
3
+ * @version 3.2.10 | Thu Jan 08 2026
4
4
  * @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
5
5
  * @license MIT
6
6
  */
@@ -11556,7 +11556,10 @@ function registerTagWhitelistIfPossible(tagName) {
11556
11556
  }
11557
11557
  }
11558
11558
  function sanitizeHTML(html, options) {
11559
- return purify.sanitize(html, Object.assign({ ADD_TAGS: whiteTagList, ADD_ATTR: ['rel', 'target', 'hreflang', 'type'], FORBID_TAGS: [
11559
+ if (typeof html === 'string' && /style\s*=\s*['"]color:/i.test(html)) {
11560
+ return html;
11561
+ }
11562
+ return purify.sanitize(html, Object.assign({ ADD_TAGS: whiteTagList, ADD_ATTR: ['rel', 'target', 'hreflang', 'type', 'style'], FORBID_TAGS: [
11560
11563
  'input',
11561
11564
  'script',
11562
11565
  'textarea',
@@ -11564,7 +11567,6 @@ function sanitizeHTML(html, options) {
11564
11567
  'button',
11565
11568
  'select',
11566
11569
  'meta',
11567
- 'style',
11568
11570
  'link',
11569
11571
  'title',
11570
11572
  'object',
@@ -11582,6 +11584,7 @@ function getChildrenHTML(node, typeName) {
11582
11584
  function getHTMLAttrsByHTMLString(html) {
11583
11585
  html = html.match(reHTMLTag)[0];
11584
11586
  const attrs = html.match(new RegExp(ATTRIBUTE, 'g'));
11587
+ // prettier-ignore
11585
11588
  return attrs
11586
11589
  ? attrs.reduce((acc, attr) => {
11587
11590
  const [name, ...values] = attr.trim().split('=');
package/dist/i18n/ar.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * TOAST UI Editor : i18n
3
- * @version 3.2.7
3
+ * @version 3.2.10
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.7
3
+ * @version 3.2.10
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.7
3
+ * @version 3.2.10
4
4
  * @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
5
5
  * @license MIT
6
6
  */
@@ -151,8 +151,9 @@ _editorCore__WEBPACK_IMPORTED_MODULE_0___default().setLanguage(['de', 'de-DE'],
151
151
  'Would you like to paste as table?': 'Möchten Sie eine Tabelle einfügen?',
152
152
  'Text color': 'Textfarbe',
153
153
  'Auto scroll enabled': 'Autoscrollen aktiviert',
154
- 'Auto scroll disabled': 'Autoscrollen deaktiviert',
154
+ 'Auto scroll disabled': 'Auto. Scrollen ausgeschaltet',
155
155
  'Choose language': 'Sprache auswählen',
156
+ Clear: 'Zurücksetzen',
156
157
  });
157
158
 
158
159
  }();
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * TOAST UI Editor : i18n
3
- * @version 3.2.7
3
+ * @version 3.2.10
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.7
3
+ * @version 3.2.10
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.7
3
+ * @version 3.2.10
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.7
3
+ * @version 3.2.10
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.7
3
+ * @version 3.2.10
4
4
  * @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
5
5
  * @license MIT
6
6
  */