Skip to content

Commit

Permalink
feat: Expanded and exported nodeHelpers
Browse files Browse the repository at this point in the history
  • Loading branch information
MasanobuRyuman committed Jun 19, 2023
1 parent dccbd8e commit 71246de
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion packages/core/src/helpers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { style } from '@vanilla-extract/css';
import Element, * as elements from './element';
import * as logger from './logger';
import * as error from './error';
import * as Node from './node';
import Node, * as nodeHelpers from './node';
import Path, * as pathHelpers from './path';
import ReactEditor from './reactEditor';
import * as transforms from './transform';
Expand All @@ -23,4 +23,5 @@ export const helpers = {
textHelpers,
pathHelpers,
childHelpers,
...nodeHelpers,
};
4 changes: 2 additions & 2 deletions packages/core/src/toolmenu/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export const Toolmenu: React.FC<ToolmenuProps> = ({ path, onDone }) => {
offset: lastOffset,
},
};
await helpers.Node.copyNode(editor);
await helpers.copyNode(editor);
editor.selection = {
anchor: {
path: [...path, 0],
Expand All @@ -61,7 +61,7 @@ export const Toolmenu: React.FC<ToolmenuProps> = ({ path, onDone }) => {
},
};
} else {
helpers.Node.copyNode(editor);
helpers.copyNode(editor);
}
onDone();
}, [editor, path, onDone]);
Expand Down

0 comments on commit 71246de

Please sign in to comment.