@limetech/lime-elements 37.70.2 → 37.70.3
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/CHANGELOG.md +8 -0
- package/dist/cjs/limel-prosemirror-adapter.cjs.entry.js +5 -10
- package/dist/cjs/limel-prosemirror-adapter.cjs.entry.js.map +1 -1
- package/dist/collection/components/text-editor/prosemirror-adapter/prosemirror-adapter.js +1 -1
- package/dist/collection/components/text-editor/prosemirror-adapter/prosemirror-adapter.js.map +1 -1
- package/dist/collection/components/text-editor/utils/html-converter.js +4 -4
- package/dist/collection/components/text-editor/utils/html-converter.js.map +1 -1
- package/dist/collection/components/text-editor/utils/markdown-converter.js +1 -5
- package/dist/collection/components/text-editor/utils/markdown-converter.js.map +1 -1
- package/dist/esm/limel-prosemirror-adapter.entry.js +5 -10
- package/dist/esm/limel-prosemirror-adapter.entry.js.map +1 -1
- package/dist/lime-elements/lime-elements.esm.js +1 -1
- package/dist/lime-elements/{p-0e48c25c.entry.js → p-7098482d.entry.js} +2 -2
- package/dist/lime-elements/p-7098482d.entry.js.map +1 -0
- package/dist/types/components/text-editor/utils/html-converter.d.ts +3 -0
- package/package.json +1 -1
- package/dist/lime-elements/p-0e48c25c.entry.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
## [37.70.3](https://github.com/Lundalogik/lime-elements/compare/v37.70.2...v37.70.3) (2024-11-25)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
* **text-editor:** close XSS vulnerability ([f9606ab](https://github.com/Lundalogik/lime-elements/commit/f9606abedd7fcfb969ec191f2973bf3c5ed15929)), closes [Lundalogik/crm-feature#4490](https://github.com/Lundalogik/crm-feature/issues/4490)
|
|
8
|
+
|
|
1
9
|
## [37.70.2](https://github.com/Lundalogik/lime-elements/compare/v37.70.1...v37.70.2) (2024-11-22)
|
|
2
10
|
|
|
3
11
|
|
|
@@ -25699,11 +25699,7 @@ const buildMarkdownSerializer = (plugins) => {
|
|
|
25699
25699
|
class MarkdownConverter {
|
|
25700
25700
|
constructor(plugins) {
|
|
25701
25701
|
this.parseAsHTML = (text) => {
|
|
25702
|
-
|
|
25703
|
-
tagName: nodeConfig.tagName,
|
|
25704
|
-
attributes: nodeConfig.attributes,
|
|
25705
|
-
}));
|
|
25706
|
-
return markdownParser.markdownToHTML(text, { whitelist: whitelist });
|
|
25702
|
+
return markdownParser.markdownToHTML(text, { whitelist: this.customNodes });
|
|
25707
25703
|
};
|
|
25708
25704
|
this.serialize = (view) => {
|
|
25709
25705
|
if (view.dom.textContent === '') {
|
|
@@ -25722,11 +25718,9 @@ class MarkdownConverter {
|
|
|
25722
25718
|
* @private
|
|
25723
25719
|
*/
|
|
25724
25720
|
class HTMLConverter {
|
|
25725
|
-
constructor() {
|
|
25721
|
+
constructor(plugins) {
|
|
25726
25722
|
this.parseAsHTML = (text) => {
|
|
25727
|
-
return
|
|
25728
|
-
resolve(text);
|
|
25729
|
-
});
|
|
25723
|
+
return markdownParser.markdownToHTML(text, { whitelist: this.customNodes });
|
|
25730
25724
|
};
|
|
25731
25725
|
this.serialize = (view) => {
|
|
25732
25726
|
if (view.dom.textContent === '') {
|
|
@@ -25736,6 +25730,7 @@ class HTMLConverter {
|
|
|
25736
25730
|
return view.dom.innerHTML;
|
|
25737
25731
|
}
|
|
25738
25732
|
};
|
|
25733
|
+
this.customNodes = plugins;
|
|
25739
25734
|
}
|
|
25740
25735
|
}
|
|
25741
25736
|
|
|
@@ -27953,7 +27948,7 @@ const ProsemirrorAdapter = class {
|
|
|
27953
27948
|
this.contentConverter = new MarkdownConverter(this.customElements);
|
|
27954
27949
|
}
|
|
27955
27950
|
else if (this.contentType === 'html') {
|
|
27956
|
-
this.contentConverter = new HTMLConverter();
|
|
27951
|
+
this.contentConverter = new HTMLConverter(this.customElements);
|
|
27957
27952
|
}
|
|
27958
27953
|
else {
|
|
27959
27954
|
throw new Error(`Unsupported content type: ${this.contentType}. Only 'markdown' and 'html' are supported.`);
|