@seafile/sea-email-editor 0.0.7 → 0.0.8
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.
|
@@ -95,7 +95,7 @@ const element2Html = (value, element, path) => {
|
|
|
95
95
|
return `<div ${className}${style}><div style="width: 100%; height: 1px; background-color: #ccc; margin: 5px 0;"></div></div>`;
|
|
96
96
|
}
|
|
97
97
|
if (Array.isArray(children) && tag) {
|
|
98
|
-
|
|
98
|
+
let childrenDom = children.map((child, index) => element2Html(value, child, [...path, index])).join('');
|
|
99
99
|
if (tag === 'a') return `<${tag}${className}${style} href="${element.url}">${childrenDom}</${tag}>`;
|
|
100
100
|
if (tag === 'table') return `<${tag}${className}${style}><tbody>${childrenDom}</tbody></${tag}>`;
|
|
101
101
|
if (type === _constants.ElementTypes.CHECK_LIST_ITEM) {
|
|
@@ -106,6 +106,9 @@ const element2Html = (value, element, path) => {
|
|
|
106
106
|
return `<div${className}${style}><span style="margin-right: 6px;">${inputDom}</span><span>${childrenDom}</span></div>`;
|
|
107
107
|
}
|
|
108
108
|
if (type === _constants.ElementTypes.CODE_BLOCK) return `<div${className}${style}><pre><code>${childrenDom}</code></pre></div>`;
|
|
109
|
+
if (type === _constants.ElementTypes.PARAGRAPH && !childrenDom) {
|
|
110
|
+
childrenDom = ' ';
|
|
111
|
+
}
|
|
109
112
|
return `<${tag}${className}${style}>${childrenDom}</${tag}>`;
|
|
110
113
|
}
|
|
111
114
|
const {
|