UNPKG

@atlaskit/editor-core

Version:

A package contains Atlassian editor core functionality

25 lines (24 loc) 799 B
import { Slice, Schema } from '../../prosemirror'; export interface Match { schema: any; index: number; lastIndex: number; raw: string; text: string; url: string; length?: number; } export declare function getLinkMatch(str: string): Match | null; /** * Instance of class LinkMatcher are used in autoformatting in place of Regex. * Hence it has been made similar to regex with an exec method. * Extending it directly from class Regex was introducing some issues, thus that has been avoided. */ export declare class LinkMatcher { exec(str: any): Match[] | null; } /** * Adds protocol to url if needed. */ export declare function normalizeUrl(url: string): string; export declare function linkifyContent(schema: Schema<any, any>, slice: Slice): Slice | undefined;