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 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 && B.children.forEach((ne, ue) => {
440
- Y.isPlaceholderElement(ne) && Be.removeNodes(e, {
441
- at: [...w, ue]
442
- });
443
- }), g(C);
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "easy-email-pro-editor",
3
- "version": "1.30.0",
3
+ "version": "1.31.0",
4
4
  "description": "",
5
5
  "files": [
6
6
  "lib"