mirror of
https://github.com/go-vikunja/vikunja.git
synced 2026-03-11 17:48:44 -05:00
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:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user