@zodiac-ui/editor
Version:
A rich text editor for Angular based on `@atlaskit/editor-core`.
27 lines (26 loc) • 947 B
TypeScript
import { EventEmitter } from "@angular/core";
import { Editor } from "./interfaces";
import { EditorView } from "prosemirror-view";
import { EditorState } from "prosemirror-state";
import { EditorPlugin } from "./interfaces/editor-plugin";
import { EditorTool } from "./editor-toolbar/interfaces";
import { ReplaySubject } from "rxjs";
export declare const defaultState: {
content: any[];
type: string;
};
export declare class EditorService implements Editor {
state: EditorState;
view: EditorView;
private config;
private readonly eventDispatcher;
private readonly plugins;
private readonly handlers?;
viewChange: EventEmitter<any>;
stateChange: ReplaySubject<any>;
constructor(plugins: EditorPlugin[], handlers?: any[]);
runTool(tool: EditorTool): void;
updateState(state: any): void;
createEditorState(state: any): void;
createEditorView(node: any): void;
}