@flozy/editor 2.1.2 → 2.1.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.
|
@@ -64,7 +64,7 @@ const Workflow = props => {
|
|
|
64
64
|
};
|
|
65
65
|
const saveFormWorkflow = () => {
|
|
66
66
|
let workflowData = [...workflowList];
|
|
67
|
-
let
|
|
67
|
+
let subjectText = document?.getElementById('email_subject')?.value;
|
|
68
68
|
let bodyHtml = document?.getElementsByClassName('editorWorkflow')[0]?.innerHTML;
|
|
69
69
|
let data = {
|
|
70
70
|
schedule_type: schedule,
|
|
@@ -72,7 +72,7 @@ const Workflow = props => {
|
|
|
72
72
|
schedule_on: schedule === "after" ? scheduleOn : 0,
|
|
73
73
|
subject_data: subject,
|
|
74
74
|
body_data: bodyData,
|
|
75
|
-
|
|
75
|
+
subject_text: subjectText,
|
|
76
76
|
body_html: bodyHtml
|
|
77
77
|
};
|
|
78
78
|
if (flowEdited.isEdited) {
|
|
@@ -47,7 +47,8 @@ const withHtml = editor => {
|
|
|
47
47
|
const slateHTML = data?.getData("application/x-slate-fragment");
|
|
48
48
|
const html = data?.getData("text/html");
|
|
49
49
|
const currentEl = getCurrentElement(editor);
|
|
50
|
-
|
|
50
|
+
const eltype = currentEl?.type;
|
|
51
|
+
if (slateHTML && !formatFragment[eltype]) {
|
|
51
52
|
const [tableNode] = Editor.nodes(editor, {
|
|
52
53
|
match: n => !Editor.isEditor(n) && Element.isElement(n) && n.type === "table"
|
|
53
54
|
});
|
|
@@ -62,7 +63,6 @@ const withHtml = editor => {
|
|
|
62
63
|
} else if (html) {
|
|
63
64
|
const parsed = new DOMParser().parseFromString(html, "text/html");
|
|
64
65
|
const fragment = deserialize(parsed.body);
|
|
65
|
-
const eltype = currentEl?.type;
|
|
66
66
|
const formattedFragment = formatFragment[eltype] ? formatFragment[eltype](fragment) : fragment;
|
|
67
67
|
Transforms.insertFragment(editor, formattedFragment);
|
|
68
68
|
return;
|