import { Mark } from '@tiptap/core'; import './index.less'; import { Instance } from "tippy.js"; export interface LinkProtocolOptions { scheme: string; optionalSlashes?: boolean; } export declare const pasteRegex: RegExp; export interface LinkOptions { /** * If enabled, it adds links as you type. */ autolink: boolean; /** * An array of custom protocols to be registered with linkifyjs. */ protocols: Array; /** * If enabled, links will be opened on click. */ openOnClick: boolean; /** * Adds a link to the current selection if the pasted content only contains an url. */ linkOnPaste: boolean; /** * A list of HTML attributes to be rendered. */ HTMLAttributes: Record; tip: Instance | null; id: string; /** * A validation function that modifies link verification for the auto linker. * @param url - The url to be validated. * @returns - True if the url is valid, false otherwise. */ validate?: (url: string) => boolean; } declare module '@tiptap/core' { interface Commands { link: { /** * Set a link mark */ setLink: (attributes: { href: string; target?: string | null; rel?: string | null; class?: string | null; }) => ReturnType; /** * Toggle a link mark */ toggleLink: (attributes: { href: string; target?: string | null; rel?: string | null; class?: string | null; }) => ReturnType; /** * Unset a link mark */ unsetLink: () => ReturnType; showLinkTip: () => ReturnType; hideLinkTip: () => ReturnType; }; } } export declare const Link: Mark;