Skip to content

Commit

Permalink
Removed ctrl + c for shortcut - Conflict with copy
Browse files Browse the repository at this point in the history
  • Loading branch information
GuilhermeF03 committed Mar 27, 2024
1 parent 61b97ff commit d6a6525
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion code/client/src/editor/slate.js/hooks/useInputHandlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ const hotkeys: Record<string, string> = {
b: 'bold',
i: 'italic',
u: 'underline',
c: 'code',
};

function useInputHandlers(editor: Editor, fugue: Fugue) {
Expand Down Expand Up @@ -56,7 +55,9 @@ function useInputHandlers(editor: Editor, fugue: Fugue) {
}

function shortcutHandler(event: React.KeyboardEvent<HTMLDivElement>) {
console.log(event.key)
const mark = hotkeys[event.key];
console.log(mark);
CustomEditor.toggleMark(editor, mark, fugue);
}

Expand Down
2 changes: 1 addition & 1 deletion code/client/src/editor/slate.js/model/utils.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { type Descendant, Editor, Range } from 'slate';
import { type CustomText } from '@editor/slate/model/types.ts';
import { type CustomText } from '@editor/slate.js/model/types.ts';
import { type BlockStyle } from '@notespace/shared/crdt/types/styles';

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { type BaseEditor, Editor, Element, Point, Range, Text, type TextUnit, Transforms } from 'slate';
import { type CustomElement } from '@editor/slate/model/types.ts';
import { type CustomElement } from '@editor/slate.js/model/types.ts';
import { shortcuts } from './shortcuts.ts';
import { type ReactEditor } from 'slate-react';
import { type HistoryEditor } from 'slate-history';
Expand Down

0 comments on commit d6a6525

Please sign in to comment.