@flozy/editor 2.0.9 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
@@ -17,6 +17,7 @@ const withEmbeds = editor => {
|
|
17
17
|
editor.insertBreak = (...args) => {
|
18
18
|
const parentPath = Path.parent(editor.selection.focus.path);
|
19
19
|
const parentNode = Node.get(editor, parentPath);
|
20
|
+
console.log(parentNode);
|
20
21
|
if (editor.isVoid(parentNode)) {
|
21
22
|
const nextPath = Path.next(parentPath);
|
22
23
|
Transforms.insertNodes(editor, {
|
@@ -40,18 +41,9 @@ const withEmbeds = editor => {
|
|
40
41
|
select: true // Focus on this node once inserted
|
41
42
|
});
|
42
43
|
} else {
|
43
|
-
|
44
|
-
Transforms.insertNodes(editor, {
|
45
|
-
type: "paragraph",
|
46
|
-
children: [{
|
47
|
-
text: ""
|
48
|
-
}]
|
49
|
-
}, {
|
50
|
-
select: true // Focus on this node once inserted
|
51
|
-
});
|
44
|
+
insertBreak(...args);
|
52
45
|
}
|
53
46
|
};
|
54
|
-
|
55
47
|
return editor;
|
56
48
|
};
|
57
49
|
export default withEmbeds;
|