Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

roosterjs-editor-api

Package Overview
Dependencies
Maintainers
4
Versions
317
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

roosterjs-editor-api - npm Package Compare versions

Comparing version 8.61.0 to 8.62.0

6

package.json

@@ -6,6 +6,6 @@ {

"tslib": "^2.3.1",
"roosterjs-editor-types": "^8.61.0",
"roosterjs-editor-dom": "^8.61.0"
"roosterjs-editor-types": "^8.62.0",
"roosterjs-editor-dom": "^8.62.0"
},
"version": "8.61.0",
"version": "8.62.0",
"main": "./lib/index.js",

@@ -12,0 +12,0 @@ "typings": "./lib/index.d.ts",

@@ -9,10 +9,14 @@ [![Build Status](https://github.com/microsoft/roosterjs/actions/workflows/build-and-deploy.yml/badge.svg)](https://github.com/microsoft/roosterjs/actions/workflows/build-and-deploy.yml)

To view the sample site, please click the link below:
Rooster is working on top of a middle layer data structure called "Content Model".
All format API and editing operation are using this Content Model layer as content format,
and finally convert to HTML and show it in editor.
[RoosterJs Sample Site](https://microsoft.github.io/roosterjs/index.html).
To view the demo site, please click the link below:
## Upgrade from RoosterJs 7.\*
[RoosterJs Demo Site](https://microsoft.github.io/roosterjs/index.html).
Please see [here](https://github.com/microsoft/roosterjs/wiki/RoosterJs-8).
## Upgrade from RoosterJs 8.\*
Please see [here](https://github.com/microsoft/roosterjs/wiki/RoosterJs-9).
## Features

@@ -29,20 +33,18 @@

2. [roosterjs-editor-core](https://microsoft.github.io/roosterjs/docs/modules/roosterjs_editor_core.html):
Defines the core editor and plugin infrastructure. Use `roosterjs-editor-core`
2. [roosterjs-content-model-core](https://microsoft.github.io/roosterjs/docs/modules/roosterjs_content_model_core.html):
Defines the core editor and plugin infrastructure. Use `roosterjs-content-model-core`
instead of `roosterjs` to build and customize your own editor.
3. [roosterjs-editor-api](https://microsoft.github.io/roosterjs/docs/modules/roosterjs_editor_api.html):
3. [roosterjs-content-model-api](https://microsoft.github.io/roosterjs/docs/modules/roosterjs_content_model_api.html):
Defines APIs for editor operations. Use these APIs to modify content and
formatting in the editor you built using `roosterjs-editor-core`.
formatting in the editor you built using `roosterjs-content-model-core`.
4. [roosterjs-editor-dom](https://microsoft.github.io/roosterjs/docs/modules/roosterjs_editor_dom.html):
Defines APIs for DOM operations. Use `roosterjs-editor-api` instead unless
you want to access DOM API directly.
4. [roosterjs-content-model-dom](https://microsoft.github.io/roosterjs/docs/modules/roosterjs_content_model_dom.html):
Defines APIs for Content Model and DOM operations. This package do conversion between DOM tree and roosterjs Content Model.
5. [roosterjs-editor-plugins](https://microsoft.github.io/roosterjs/docs/modules/roosterjs_editor_plugins.html):
Defines basic plugins for common features. Examples: making hyperlinks,
pasting HTML content, inserting inline images.
5. [roosterjs-content-model-plugins](https://microsoft.github.io/roosterjs/docs/modules/roosterjs_content_model_plugins.html):
Defines basic plugins for common features.
6. [roosterjs-editor-types](https://microsoft.github.io/roosterjs/docs/modules/roosterjs_editor_types.html):
Defines public interfaces and enumerations.
6. [roosterjs-content-model-types](https://microsoft.github.io/roosterjs/docs/modules/roosterjs_content_model_types.html):
Defines public interfaces and enumerations, including Content Model types, API parameters and other types.

@@ -57,26 +59,34 @@ There are also some extension packages to provide additional functionalities.

3. [roosterjs-editor-types-compatible](https://microsoft.github.io/roosterjs/docs/modules/roosterjs_editor_types_compatible.html):
Provide types that are compatible with isolatedModules mode. When using isolatedModules mode,
"const enum" will not work correctly, this package provides enums with prefix "Compatible" in
their names and they have the same value with const enums in roosterjs-editor-types package
To be compatible with old (8.\*) versions, you can use `EditorAdapter` class from the following package which can act as a 8.\* Editor:
1. [roosterjs-editor-adapter](https://microsoft.github.io/roosterjs/docs/modules/roosterjs_editor_adapter.html):
Provide a adapter class `EditorAdapter` to work with Editor (9.\*) and legacy plugins (via [EditorAdapterOptions.legacyPlugins](https://microsoft.github.io/roosterjs/docs/interfaces/roosterjs_editor_adapter.editoradapteroptions.html#legacyplugins))
And the following packages are for old (8.\*) compatibility:
1. [roosterjs-editor-core](https://microsoft.github.io/roosterjs/docs/modules/roosterjs_editor_core.html):
2. [roosterjs-editor-api](https://microsoft.github.io/roosterjs/docs/modules/roosterjs_editor_api.html):
3. [roosterjs-editor-dom](https://microsoft.github.io/roosterjs/docs/modules/roosterjs_editor_dom.html):
4. [roosterjs-editor-plugins](https://microsoft.github.io/roosterjs/docs/modules/roosterjs_editor_plugins.html):
5. [roosterjs-editor-types](https://microsoft.github.io/roosterjs/docs/modules/roosterjs_editor_types.html):
6. [roosterjs-editor-types-compatible](https://microsoft.github.io/roosterjs/docs/modules/roosterjs_editor_types_compatible.html):
### APIs
Rooster provides DOM level APIs (in `roosterjs-editor-dom`), core APIs (in `roosterjs-editor-core`), and formatting APIs
(in `roosterjs-editor-api`) to perform editing operations.
Rooster provides Content Model level APIs (in `roosterjs-content-model-dom`), core APIs (in `roosterjs-content-model-core`), and formatting APIs
(in `roosterjs-content-modelapi`) to perform editing operations.
`roosterjs-editor-dom` provides several levels of DOM operations:
`roosterjs-content-model-dom` provides several levels of Content Model operations:
- Perform basic DOM operations such as `wrap()`, `unwrap()`, ...
- Wrap a given DOM node with `InlineElement` or `BlockElement` and perform
operations with DOM Walker API.
- Perform DOM operations on a given scope using scopers.
- Travel among `InlineElements` and `BlockElements` with scope using
ContentTraverser API.
- Create Content Model elements
- Convert DOM tree to Content Model
- Convert Content Model to DOM tree
- Format handlers
- A few DOM level API
`roosterjs-editor-core` provides APIs for editor core. Editor class will call such
APIs to perform basic editor operations. These APIs are overridable by specifying
`roosterjs-content-model-core` provides APIs for editor core. Editor class will call such
APIs to perform basic editor operations. These APIs can be overridden by specifying
API overrides in Editor options when creating the editor.
`roosterjs-editor-api` provides APIs for scenario-based operations triggered by
`roosterjs-content-model-api` provides APIs for scenario-based operations triggered by
user interaction.

@@ -105,3 +115,3 @@

onPluginEvent(e: PluginEvent) {
if (e.eventType == PluginEventType.KeyPress && e.rawEvent.which == 65) {
if (e.eventType == 'input' && e.rawEvent.which == 65) {
alert('Hello Rooster');

@@ -121,5 +131,5 @@ }

`yarn add roosterjs-editor-core`
`yarn add roosterjs-content-model-core`
`yarn add roosterjs-editor-api`
`yarn add roosterjs-content-model-api`

@@ -169,5 +179,5 @@ `...`

To view the sample site, please click [here](https://microsoft.github.io/roosterjs/index.html).
To view the demo site, please click [here](https://microsoft.github.io/roosterjs/index.html).
To build the sample site code yourself, follow these instructions:
To build the demo site code yourself, follow these instructions:

@@ -174,0 +184,0 @@ 1. Get dependencies using [yarn](https://yarnpkg.com) or [npm](https://www.npmjs.com/):

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc