import { Editor } from "https://deno.land/x/netzo@0.5.63/deps/@tiptap/react.ts";
Constructors
new
Editor(options?: Partial<EditorOptions>)Properties
The callback over which to send transactions (state updates) produced by the view.
readonly
$doc: NodePosreadonly
commands: SingleCommandsAn object of all registered commands.
extensionManager: ExtensionManager
options: EditorOptions
schema: Schema
readonly
state: EditorStateReturns the editor state.
view: EditorView
Methods
can(): CanCommands
Check if a command or a command chain can be executed. Without executing it.
captureTransaction(fn: Function): Transaction | null
Create a command chain to call multiple commands at once.
createNodeViews(): void
Creates all node views.
destroy(): void
Destroy the editor.
getAttributes(nameOrType: string | NodeType | MarkType): Record<string, any>
Get attributes of the currently selected node or mark.
deprecated
getCharacterCount(): numberGet the number of characters for the current document.
getHTML(): string
Get the document as HTML.
Get the document as JSON.
getText(options?: { blockSeparator?: string; textSerializers?: Record<string, TextSerializer>; }): string
Get the document as text.
isActive(name: string, attributes?: { }): boolean
Returns if the currently selected node or mark is active.
isActive(attributes: { }): boolean
prependClass(): void
Prepend class name to element.
registerPlugin(plugin: Plugin, handlePlugins?: (newPlugin: Plugin, plugins: Plugin[]) => Plugin[]): void
Register a ProseMirror plugin.
setEditable(editable: boolean, emitUpdate?: boolean): void
Update editable state of the editor.
setOptions(options?: Partial<EditorOptions>): void
Update editor options.
unregisterPlugin(nameOrPluginKey: string | PluginKey): void
Unregister a ProseMirror plugin.