Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Code Tool for Editor.js 2.0

License

NotificationsYou must be signed in to change notification settings

editor-js/code

Repository files navigation

Code Tool for Editor.js

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

Installation

Get the package

yarn add @editorjs/code

Include module at your application

importCodeToolfrom'@editorjs/code';

Optionally, you can load this tool from CDNJsDelivr CDN

Usage

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

vareditor=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}",    }}

About

Code Tool for Editor.js 2.0

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors11


[8]ページ先頭

©2009-2025 Movatter.jp