easy-email-pro-editor 1.30.0 → 1.31.0
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/lib/index.js +14 -5
- package/lib/typings/typings/index.d.ts +1 -1
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -436,11 +436,20 @@ const wg = () => {
|
|
|
436
436
|
Be.removeNodes(e, { at: w });
|
|
437
437
|
return;
|
|
438
438
|
}
|
|
439
|
-
Y.isColumnElement(B) && B.children.length > 1
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
439
|
+
if (Y.isColumnElement(B) && B.children.length > 1) {
|
|
440
|
+
const ne = B.children.findIndex(
|
|
441
|
+
(ue) => Y.isPlaceholderElement(ue)
|
|
442
|
+
);
|
|
443
|
+
if (ne != -1) {
|
|
444
|
+
e.withoutNormalizing(() => {
|
|
445
|
+
Be.removeNodes(e, {
|
|
446
|
+
at: [...w, ne]
|
|
447
|
+
});
|
|
448
|
+
});
|
|
449
|
+
return;
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
g(C);
|
|
444
453
|
}, e.replaceNode = (C) => {
|
|
445
454
|
Ae.withoutNormalizing(e, () => {
|
|
446
455
|
const B = C.path, w = Rt.get(e, B);
|
|
@@ -17,7 +17,7 @@ export interface BasicEmailTemplate {
|
|
|
17
17
|
export interface BasicEditorProps extends Partial<Pick<EditableProps, "onDOMBeforeInput" | "onKeyDown">> {
|
|
18
18
|
clientId: string;
|
|
19
19
|
onUpload?: (blob: Blob) => Promise<string>;
|
|
20
|
-
onSubmit: (values: EmailTemplate) => void;
|
|
20
|
+
onSubmit: (values: EmailTemplate, editor: CustomSlateEditor) => void;
|
|
21
21
|
onPageChange?: (content: EmailTemplate["content"], editor: CustomSlateEditor) => void;
|
|
22
22
|
fontList?: {
|
|
23
23
|
value: string;
|