1.0.0 • Published 3 years ago
@7polo/editorjs-dragdrop v1.0.0
Code
Code Tool for Editor.js 2.0 with language selector、theme selector compatible with PrismJs Language Codes
Feature
- Line Number ✌️
- theme selector
- language selector
Usage
Add a new Tool to the tools
property of the Editor.js initial config.
npm i @7polo/editorjs-code
var editor = EditorJS({
...
tools: {
...
code: Code,
}
...
});
Config Params
no configuration yet!
Output data
This Tool returns code.
{
"type" : "code",
"data" : {
"code": "body {\n font-size: 14px;\n line-height: 16px;\n}",
"language": "css",
"theme": "tomorrow"
}
}
1.0.0
3 years ago