Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/editor-js/raw

Raw HTML tool for Editor.js
https://github.com/editor-js/raw

editorjs

Last synced: 4 days ago
JSON representation

Raw HTML tool for Editor.js

Awesome Lists containing this project

README

        

![](https://badgen.net/badge/CodeX%20Editor/v2.0/blue)

# Raw HTML Tool for Editor.js

Raw Tool for the [Editor.js](https://codex.so/editor) allows to include raw HTML code in your articles.

![](https://capella.pics/5195d944-966d-40cf-8f86-78c6349d94cb.jpg)

## Installation

Get the package

```shell
yarn add @editorjs/raw
```

Include module at your application

```javascript
import RawTool from '@editorjs/raw';
```

Optionally, you can load this tool from CDN [JsDelivr CDN](https://cdn.jsdelivr.net/npm/@editorjs/raw@latest)

## Usage

Add a new Tool to the `tools` property of the CodeX Editor initial config.

```javascript
var editor = CodexEditor({
...

tools: {
...
raw: RawTool,
}

...
});
```

## Config Params

| Field | Type | Description |
| ----------- | -------- | ------------------------------|
| placeholder | `string` | Raw Tool's placeholder string |

## Output data

This Tool returns raw HTML code.

```json
{
"type" : "raw",
"data" : {
"html": "

Any HTML code
",
}
}
```