UNPKG

@atlaskit/editor-core

Version:

A package contains Atlassian editor core functionality

14 lines (13 loc) 620 B
import { EditorView } from '../prosemirror'; import { Refs, BuilderContent } from './schema-builder'; /** * Replace the given range, or the selection if no range is given, with a text node containing the given string */ export declare function insertText(view: EditorView, text: string, from: number, to?: number): void; /** * Replace the current selection with the given content, which may be a fragment, node, or array of nodes. * * @returns refs from the inserted nodes, made relative to the document * insertion position */ export declare function insert(view: EditorView, content: BuilderContent[]): Refs;