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

Plugin to use header with alignment for editorjs +700 weekly download on npm

License

NotificationsYou must be signed in to change notification settings

wandersonsousa/header-with-alignment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Version of EditorJS that the plugin is compatible with

Provides Headings Blocks for theEditor.js.

Installation

Install via NPM

Get the package

npm i --save editorjs-header-with-alignment

Include module at your application

constHeader=require("editorjs-header-with-alignment");

Download to your project's source dir

  1. Upload folderdist from repository
  2. Adddist/bundle.js file to your page.

Usage

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

vareditor=EditorJS({  ...tools:{    ...header:Header,},  ...});

Config Params

All properties are optional.

FieldTypeDescription
placeholderstringheader's placeholder string
levelsnumber[]enabled heading levels
defaultLevelnumberdefault heading level
defaultAlignmentstringdefault alignment level
vareditor=EditorJS({  ...tools:{    ...header:{class:Header,config:{placeholder:'Enter a header',levels:[2,3,4],defaultLevel:3,defaultAlignment:'left'}}}  ...});

Output data

FieldTypeDescription
textstringheader's text
levelnumberlevel of header: 1 for H1, 2 for H2 ... 6 for H6
alignstringheder alignment: 'left', 'center', 'justify', 'right
{"type":"header","data": {"text":"Why Telegram is the best messenger","level":2,"align":"left"  }}

About

Plugin to use header with alignment for editorjs +700 weekly download on npm

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp