Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/netzo/deps/@tiptap/react.ts>Editor

Full-stack Deno framework for building business web apps like internal tools, dashboards, admin panels and automated workflows.
Go to Latest
class Editor
Re-export
import { Editor } from "https://deno.land/x/netzo@0.5.106/deps/@tiptap/react.ts";

Constructors

new
Editor(options?: Partial<EditorOptions>)

Properties

private
capturedTransaction
private
commandManager
private
createCommandManager

Creates an command manager.

private
createExtensionManager

Creates an extension manager.

private
createSchema

Creates a ProseMirror schema.

private
createView

Creates a ProseMirror view.

private
css
private
dispatchTransaction

The callback over which to send transactions (state updates) produced by the view.

private
injectCSS

Inject CSS styles.

readonly
$doc: NodePos
readonly
commands: SingleCommands

An object of all registered commands.

extensionManager: ExtensionManager
extensionStorage: Record<string, any>
isCapturingTransaction: boolean
readonly
isDestroyed: boolean

Check if the editor is already destroyed.

readonly
isEditable: boolean

Returns whether the editor is editable.

readonly
isEmpty: boolean

Check if there is no content.

isFocused: boolean
options: EditorOptions
schema: Schema
readonly
state: EditorState

Returns the editor state.

readonly
storage: Record<string, any>

Returns the editor storage.

Methods

$node(selector: string, attributes?: { [key: string]: any; }): NodePos | null
$nodes(selector: string, attributes?: { [key: string]: any; }): NodePos[] | null
$pos(pos: number): NodePos

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.

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(): number

Get 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.

Properties

contentComponent: ContentComponent | null