Skip to content

Commit 1c7980e

Browse files
committed
Reverted most changes to serializeBlock
1 parent b70b9c0 commit 1c7980e

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

packages/core/src/api/exporters/html/util/serializeBlocksInternalHTML.ts

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,6 @@ function serializeBlock<
138138
) {
139139
const BC_NODE = editor.pmSchema.nodes["blockContainer"];
140140

141-
const id = block.id || "";
142-
const type = block.type || "paragraph";
143141
// set default props in case we were passed a partial block
144142
const props = block.props || {};
145143
for (const [name, spec] of Object.entries(
@@ -149,12 +147,6 @@ function serializeBlock<
149147
(props as any)[name] = spec.default;
150148
}
151149
}
152-
const content =
153-
editor.schema.blockSchema[type].content === "table"
154-
? { type: "tableContent", rows: [] }
155-
: editor.schema.blockSchema[type].content === "inline"
156-
? []
157-
: undefined;
158150
const children = block.children || [];
159151

160152
const impl = editor.blockImplementations[block.type as any].implementation;
@@ -163,7 +155,7 @@ function serializeBlock<
163155
renderType: "dom",
164156
props: undefined,
165157
},
166-
{ id, type, props, content, children } as any,
158+
{ ...block, props, children } as any,
167159
editor as any,
168160
);
169161

0 commit comments

Comments
 (0)