Provides Code Blocks for the Editor.js.
Get the package
npm i --save-dev @groupher/editor-code
Include module at your application
const Code = require('@groupher/editor-code');
- Upload folder
dist
from repository - Add
dist/bundle.js
file to your page.
Add a new Tool to the tools
property of the Editor.js initial config.
var editor = EditorJS({
...
tools: {
...
code: Code,
},
...
});
Field | Type | Description |
---|---|---|
text | string |
code's text |
lang | string |
code's language |
{
"type" : "quote",
"data" : {
"text" : ""body { color: tomato; margin-left: 20px;};",
"lang" : "css"
}
}