UNPKG

@kedao/utils

Version:

Utils for Kedao Editor

50 lines (49 loc) 4.18 kB
import { EditorState } from 'draft-js'; export declare const registerStrictBlockType: (blockType: any) => void; export declare const isEditorState: (editorState: any) => boolean; export declare const createEmptyEditorState: (editorDecorators: any) => EditorState; export declare const createEditorState: (contentState: any, editorDecorators: any) => EditorState; export declare const isSelectionCollapsed: (editorState: any) => any; export declare const selectionContainsBlockType: (editorState: any, blockType: any) => any; export declare const selectionContainsStrictBlock: (editorState: any) => any; export declare const selectBlock: (editorState: any, block: any) => EditorState; export declare const selectNextBlock: (editorState: any, block: any) => any; export declare const removeBlock: (editorState: any, block: any, lastSelection?: any) => EditorState; export declare const getSelectionBlock: (editorState: any) => any; export declare const updateEachCharacterOfSelection: (editorState: any, callback: any) => any; export declare const getSelectedBlocks: (editorState: any) => any[]; export declare const setSelectionBlockData: (editorState: any, blockData: any, override?: boolean) => any; export declare const getSelectionBlockData: (editorState: any, name?: string) => any; export declare const getSelectionBlockType: (editorState: any) => any; export declare const getSelectionText: (editorState: any) => any; export declare const toggleSelectionBlockType: (editorState: any, blockType: any) => any; export declare const getSelectionEntityType: (editorState: any) => any; export declare const getSelectionEntityData: (editorState: any, type: any) => any; export declare const toggleSelectionEntity: (editorState: any, entity: any) => any; export declare const toggleSelectionLink: (editorState: any, href: any, target?: any) => any; export declare const getSelectionInlineStyle: (editorState: any) => any; export declare const selectionHasInlineStyle: (editorState: any, style: any) => any; export declare const toggleSelectionInlineStyle: (editorState: any, style: string, prefix?: string) => EditorState; export declare const removeSelectionInlineStyles: (editorState: any) => any; export declare const toggleSelectionAlignment: (editorState: any, alignment: any) => any; export declare const toggleSelectionIndent: (editorState: any, textIndent: any, maxIndent?: number) => any; export declare const increaseSelectionIndent: (editorState: any, maxIndent?: number) => any; export declare const decreaseSelectionIndent: (editorState: any, maxIndent?: any) => any; export declare const toggleSelectionColor: (editorState: any, color: any) => EditorState; export declare const toggleSelectionBackgroundColor: (editorState: any, color: any) => EditorState; export declare const toggleSelectionFontSize: (editorState: any, fontSize: any) => EditorState; export declare const toggleSelectionLineHeight: (editorState: any, lineHeight: any) => EditorState; export declare const toggleSelectionFontFamily: (editorState: any, fontFamily: any) => EditorState; export declare const toggleSelectionLetterSpacing: (editorState: any, letterSpacing: any) => EditorState; export declare const insertText: (editorState: any, text: any, inlineStyle?: any, entity?: any) => any; export declare const insertHTML: (editorState: any, htmlString: any, source: any) => any; export declare const insertAtomicBlock: (editorState: any, type: any, immutable?: boolean, data?: {}) => any; export declare const insertHorizontalLine: (editorState: any) => any; export declare const insertMedias: (editorState: any, medias?: any[]) => any; export declare const setMediaData: (editorState: any, entityKey: any, data: any) => EditorState; export declare const removeMedia: (editorState: any, mediaBlock: any) => EditorState; export declare const setMediaPosition: (editorState: any, mediaBlock: any, position: any) => any; export declare const clear: (editorState: any) => EditorState; export declare const handleKeyCommand: (editorState: any, command: any) => EditorState; export declare const undo: (editorState: any) => EditorState; export declare const redo: (editorState: any) => EditorState;