From 332fa768b3e4bad2de064e3bb2497fafa81bed22 Mon Sep 17 00:00:00 2001 From: Amjed Bouhouch Date: Mon, 22 Jan 2024 21:15:04 +0100 Subject: [PATCH] fix: Commands' is a reserved export and may only be used to export the result of codegenNativeCommands --- example/src/EditorScreen.tsx | 2 +- src/core/Extensions/commands.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/example/src/EditorScreen.tsx b/example/src/EditorScreen.tsx index a4a4cd6..ca5c110 100644 --- a/example/src/EditorScreen.tsx +++ b/example/src/EditorScreen.tsx @@ -41,7 +41,7 @@ const EditorScreen = ({}: EditorScreenProps) => { ], }, ], - extensions: [extensions.Commands, extensions.Bold, extensions.Italic], + extensions: [extensions.EditorCommands, extensions.Bold, extensions.Italic], onUpdate(props) { console.log(props.editor.getNativeText()); }, diff --git a/src/core/Extensions/commands.ts b/src/core/Extensions/commands.ts index bfc4717..f0753d3 100644 --- a/src/core/Extensions/commands.ts +++ b/src/core/Extensions/commands.ts @@ -1,14 +1,14 @@ -import * as commands from '../commands'; +import * as editorCommands from '../commands'; import { Extension } from '../Extension'; // export * from '../commands'; -export const Commands = Extension.create({ +export const EditorCommands = Extension.create({ name: 'commands', addCommands() { return { - ...commands, + ...editorCommands, }; }, });