refactor: fix typo
parent
f7dff673ad
commit
aac689a2f5
|
@ -24,7 +24,7 @@ const { editor } = useTiptap({
|
||||||
content: toRef(draft.params, 'status'),
|
content: toRef(draft.params, 'status'),
|
||||||
placeholder,
|
placeholder,
|
||||||
autofocus: isExpanded,
|
autofocus: isExpanded,
|
||||||
onSubimit: publish,
|
onSubmit: publish,
|
||||||
onFocus() { isExpanded = true },
|
onFocus() { isExpanded = true },
|
||||||
onPaste: handlePaste,
|
onPaste: handlePaste,
|
||||||
})
|
})
|
||||||
|
|
|
@ -14,7 +14,7 @@ import { HashSuggestion, MentionSuggestion } from './tiptap/suggestion'
|
||||||
export interface UseTiptapOptions {
|
export interface UseTiptapOptions {
|
||||||
content: Ref<string | undefined>
|
content: Ref<string | undefined>
|
||||||
placeholder: string
|
placeholder: string
|
||||||
onSubimit: () => void
|
onSubmit: () => void
|
||||||
onFocus: () => void
|
onFocus: () => void
|
||||||
onPaste: (event: ClipboardEvent) => void
|
onPaste: (event: ClipboardEvent) => void
|
||||||
autofocus: boolean
|
autofocus: boolean
|
||||||
|
@ -51,7 +51,7 @@ export function useTiptap(options: UseTiptapOptions) {
|
||||||
addKeyboardShortcuts() {
|
addKeyboardShortcuts() {
|
||||||
return {
|
return {
|
||||||
'Mod-Enter': () => {
|
'Mod-Enter': () => {
|
||||||
options.onSubimit()
|
options.onSubmit()
|
||||||
return true
|
return true
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue