@flozy/editor 2.0.9 → 2.1.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.
@@ -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
- // to disable default leafs
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flozy/editor",
3
- "version": "2.0.9",
3
+ "version": "2.1.0",
4
4
  "description": "An Editor for flozy app brain",
5
5
  "files": [
6
6
  "dist"