build: switch from yarn to npm to manage js dependencies and move js contents to root
yarn v1 is being deprecated and starts to have some issues Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
22
src/components/Editor/RichEditorKeyboardSubmit.ts
Normal file
22
src/components/Editor/RichEditorKeyboardSubmit.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import { Extension } from "@tiptap/vue-3";
|
||||
|
||||
export interface RichEditorKeyboardSubmitOptions {
|
||||
submit: () => void;
|
||||
}
|
||||
|
||||
export default Extension.create<RichEditorKeyboardSubmitOptions>({
|
||||
name: "RichEditorKeyboardSubmit",
|
||||
addOptions() {
|
||||
return {
|
||||
submit: () => ({}),
|
||||
};
|
||||
},
|
||||
addKeyboardShortcuts() {
|
||||
return {
|
||||
"Ctrl-Enter": () => {
|
||||
this.options.submit();
|
||||
return true;
|
||||
},
|
||||
};
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user