Skip to content

Commit

Permalink
fix: Commands' is a reserved export and may only be used to export th…
Browse files Browse the repository at this point in the history
…e result of codegenNativeCommands
  • Loading branch information
amjadbouhouch committed Jan 22, 2024
1 parent c5b7c29 commit 332fa76
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion example/src/EditorScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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());
},
Expand Down
6 changes: 3 additions & 3 deletions src/core/Extensions/commands.ts
Original file line number Diff line number Diff line change
@@ -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,
};
},
});

0 comments on commit 332fa76

Please sign in to comment.