Skip to content

Develop

Jiuqing Song edited this page Feb 2, 2019 · 3 revisions

RoosterJs provides a lot of APIs to help develop with the editor and build plugins. The APIs can be grouped into the following categories:

Public API

Format API live in roosterjs-editor-api package. They are mostly used by format buttons such as Bold, Italic, Underline, ...

Editor API live in roosterjs-editor-core package. They are methods of Editor class, and provide the basic opeartions of the editor.

Event Cache API live in roosterjs-editor-core package. They provide the ability to set and get cached values inside a Plugin Event.

Selection API live in roosterjs-editor-dom package. They provide the ability to operate on cursor position and selection range.

Lower Level API

DOM Walker API live in roosterjs-editor-dom package. They provide a wrapped layer of DOM elements and help walk forward/backward of elements, including Block Elements, Inline Elements, Content Traverser, Position Content Searcher.

DOM Utilities live in roosterjs-editor-dom package. They provide some basic DOM operations and are invoked by higher level API.

Table API include 3 high level API (insertTable, formatTable, editTable) which live in roosterjs-editor-api package, and 1 low level class (VTable) which lives in roosterjs-editor-dom package. They provide the ability to create/format/edit a table.

Internal API

Editor Core API live in roosterjs-editor-core package. These API cannot be invoked outside editor, but they can be overridden via Editor Options. You can override one or more of these API to change editor default behavior.

Editor Core Plugins live in roosterjs-editor-core package. These plugins are always added into editor and cannot be replaced. They provide basic editor functionalities such as content edit features, auto complete, ...

Content Edit Features are live in [roosterjs-editor-plugins] package. They provide switchable edit features such as auto bullet, auto link, ...

Clone this wiki locally