Skip to content

Commit 6aec6e2

Browse files
Fixed error on copying custom blocks (#1159)
1 parent 31f0cd2 commit 6aec6e2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/core/src/schema/blocks/createSpec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,10 +161,10 @@ export function createBlockSpec<
161161
// just render a placeholder div inside as the `blockContent` element
162162
// already has all the information needed for proper parsing.
163163
const div = document.createElement("div");
164-
div.setAttribute("data-tmp-placeholder", "true");
165164
return wrapInBlockStructure(
166165
{
167166
dom: div,
167+
contentDOM: blockConfig.content === "inline" ? div : undefined,
168168
},
169169
blockConfig.type,
170170
{},

packages/react/src/schema/ReactBlockSpec.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,10 +138,10 @@ export function createReactBlockSpec<
138138
// just render a placeholder div inside as the `blockContent` element
139139
// already has all the information needed for proper parsing.
140140
const div = document.createElement("div");
141-
div.setAttribute("data-tmp-placeholder", "true");
142141
return wrapInBlockStructure(
143142
{
144143
dom: div,
144+
contentDOM: blockConfig.content === "inline" ? div : undefined,
145145
},
146146
blockConfig.type,
147147
{},

0 commit comments

Comments
 (0)