Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/editor-js/marker
Marker Tool for Editor.js 2.0
https://github.com/editor-js/marker
Last synced: 26 days ago
JSON representation
Marker Tool for Editor.js 2.0
- Host: GitHub
- URL: https://github.com/editor-js/marker
- Owner: editor-js
- License: mit
- Created: 2018-08-20T18:19:56.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-12-06T15:38:55.000Z (about 1 year ago)
- Last Synced: 2024-05-19T14:30:38.851Z (7 months ago)
- Language: JavaScript
- Homepage:
- Size: 7.33 MB
- Stars: 71
- Watchers: 3
- Forks: 39
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-editorjs - @editorjs/marker - fragments (Tools / Inline Tools)
README
![](https://badgen.net/badge/Editor.js/v2.0/blue)
# Marker Tool
Marker Tool for highlighting text-fragments for the [Editor.js](https://editorjs.io).
![](assets/example.gif)
## Installation
Get the package
```shell
yarn add @editorjs/marker
```Include module at your application
```javascript
import Marker from '@editorjs/marker';
```Optionally, you can load this tool from CDN [JsDelivr CDN](https://cdn.jsdelivr.net/npm/@editorjs/marker@latest)
## Usage
Add a new Tool to the `tools` property of the Editor.js initial config.
```javascript
var editor = EditorJS({
...
tools: {
...
Marker: {
class: Marker,
shortcut: 'CMD+SHIFT+M',
}
},
...
});
```## Config Params
This Tool has no config params
## Output data
Marked text will be wrapped with a `mark` tag with an `cdx-marker` class.
```json
{
"type" : "text",
"data" : {
"text" : "Create a directory for your module, enter it and run npm init command."
}
}
```