fix(components): add type annotations in setLinkInEditor.ts
- Import Editor type from @tiptap/core - Add DOMRect type for pos parameter - Add Editor | null | undefined type for editor parameter
This commit is contained in:
parent
d46afda42b
commit
ddf018e791
|
|
@ -1,6 +1,7 @@
|
|||
import type {Editor} from '@tiptap/core'
|
||||
import inputPrompt from '@/helpers/inputPrompt'
|
||||
|
||||
export async function setLinkInEditor(pos, editor) {
|
||||
export async function setLinkInEditor(pos: DOMRect, editor: Editor | null | undefined) {
|
||||
const previousUrl = editor?.getAttributes('link').href || ''
|
||||
const url = await inputPrompt(pos, previousUrl)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue