2.9.2 • Published 9 months ago

@editorjs/code v2.9.2

Weekly downloads
3,885
License
MIT
Repository
github
Last release
9 months ago

npm.io

Code Tool for Editor.js

Code Tool for the Editor.js allows to include code examples in your articles.

npm.io

Installation

Get the package

yarn add @editorjs/code

Include module at your application

import CodeTool from '@editorjs/code';

Optionally, you can load this tool from CDN JsDelivr CDN

Usage

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

var editor = EditorJS({
  ...
  
  tools: {
    ...
    code: CodeTool,
  }
  
  ...
});

Config Params

FieldTypeDescription
placeholderstringCode Tool's placeholder string

Output data

This Tool returns code.

{
    "type" : "code",
    "data" : {
        "code": "body {\n font-size: 14px;\n line-height: 16px;\n}",
    }
}
byevolution@infinitebrahmanuniverse/nolb-_edi@everything-registry/sub-chunk-277wonder-imagestrapi-plugin-editorstrapi-plugin-editorjs-fieldstrapi-plugin-editorjs-nextstrapi-plugin-k-editorjsstrapi-academy-plus-editorjs@creators-view/fluid-ui@cromwell/admin-panel@om-mediaworks/shacl-formstd-pagestrapi-plugin-react-editorjsstrapi-plugin-react-editorjs-extended-embedui-duckumomega-foundation@alfresco/adf-process-services-cloud@bigbossstudio/strapi-plugin-editorjs@carabi/ui@chizhik/ui-lib@centrepointmedia/synoraui@acf-int/strapi-plugin-react-editorjs@acf-int/strapi-plugin-editorjs@brandontle/react-editor.js@dicarbene/nuxt3-editorjs@highoutput/neyar@emilienkopp/ejs-factory@emilienkopp/html-factory@itfin/components@itandu/admin-panel@fakel/rest-admin@keystonejs-contrib/fields-editorjs@kaniyarasu/react-editor.js@offlegacy/react-editorjs@rainyland-dev/strapi-plugin-editorjs@rypock/react-frontend@questflow/canvas@realmocean/editor@pingfe/editor@nwire/amit-design-system@oak-digital/strapi-plugin-react-editorjs@smileeye.edu.vn/editor@softkit/strapi-plugin-react-editorjsmtxtrpcv2murph-projectodoc-viewernuxt3-editorjssarman-vue-editor-jsreact-editor-simple-image.jsreact-editor-simple-imagequickvue-editorjsreusecoreilla-builderhorul-editorhsl-strapi-plugin-react-editorjsmedusa-plugin-bloggermedusa-plugin-blogger-ar@vt7/vue-editor@wulperstudio/wulper-studio-editor@tienlucky/storage@todokek/react-editor.js@virtual-spirit/vspace-labs@zalastax/nolb-_edi@zdzcode/zc-web-vuejs-core@techdemocrat/fluid-uiall-in-one-editorjsbyevolution-componentsblock-article-jsdirectual-web-componentsdoreactadotailadraftseditorjs-reacteditor-js-component
2.9.2

9 months ago

2.9.0

2 years ago

2.8.0

3 years ago

2.7.0

4 years ago

2.6.0

5 years ago

2.5.0

5 years ago

2.4.1

6 years ago

2.4.0

6 years ago