diff --git a/packages/core/src/helpers/index.ts b/packages/core/src/helpers/index.ts index 144ad8b..fb9a18c 100644 --- a/packages/core/src/helpers/index.ts +++ b/packages/core/src/helpers/index.ts @@ -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'; @@ -23,4 +23,5 @@ export const helpers = { textHelpers, pathHelpers, childHelpers, + ...nodeHelpers, }; diff --git a/packages/core/src/toolmenu/index.tsx b/packages/core/src/toolmenu/index.tsx index 4d6e781..4a24cf9 100644 --- a/packages/core/src/toolmenu/index.tsx +++ b/packages/core/src/toolmenu/index.tsx @@ -49,7 +49,7 @@ export const Toolmenu: React.FC = ({ path, onDone }) => { offset: lastOffset, }, }; - await helpers.Node.copyNode(editor); + await helpers.copyNode(editor); editor.selection = { anchor: { path: [...path, 0], @@ -61,7 +61,7 @@ export const Toolmenu: React.FC = ({ path, onDone }) => { }, }; } else { - helpers.Node.copyNode(editor); + helpers.copyNode(editor); } onDone(); }, [editor, path, onDone]);