@zodiac-ui/editor
Version:
A rich text editor for Angular based on `@atlaskit/editor-core`.
18 lines (17 loc) • 1.07 kB
TypeScript
/**
* Determine if a mark of a specific type exists anywhere in the selection.
*/
import { Mark, MarkType } from "prosemirror-model";
import { EditorState, Transaction } from "prosemirror-state";
import { TextFormattingState } from "./interfaces";
import { Command } from "../../lib/interfaces/command";
export declare const deepEqual: (obj1: any, obj2: any) => boolean;
export declare const hasCode: (state: EditorState<any>, pos: number) => boolean;
export declare const isMarkTypeActive: (state: EditorState<any>, markType: MarkType<any>) => boolean;
/**
* Determine if a mark (with specific attribute values) exists anywhere in the selection.
*/
export declare const isMarkActive: (state: EditorState<any>, mark: Mark<any>) => boolean;
export declare const getTextFormattingState: (editorState: EditorState<any>) => TextFormattingState;
export declare function transformToCodeAction(from: number, to: number, tr: Transaction): Transaction;
export declare const createInlineCodeFromTextInput: (from: number, to: number, text: string) => Command;