2.8.1 • Published 6 months ago

@editorjs/header v2.8.1

Weekly downloads
9,433
License
MIT
Repository
github
Last release
6 months ago

Heading Tool

Version of EditorJS that the plugin is compatible with

Provides Headings Blocks for the Editor.js.

Installation

Get the package

yarn add @editorjs/header

Include module at your application

import Header from '@editorjs/header';

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: {
    ...
    header: Header,
  },

  ...
});

Shortcut

You can insert this Block by a useful shortcut. Set it up with the tools[].shortcut property of the Editor's initial config.

var editor = EditorJS({
  ...

  tools: {
    ...
    header: {
      class: Header,
      shortcut: 'CMD+SHIFT+H',
    },
  },

  ...
});

Config Params

All properties are optional.

FieldTypeDescription
placeholderstringheader's placeholder string
levelsnumber[]enabled heading levels
defaultLevelnumberdefault heading level
var editor = EditorJS({
  ...

  tools: {
    ...
    header: {
      class: Header,
      config: {
        placeholder: 'Enter a header',
        levels: [2, 3, 4],
        defaultLevel: 3
      }
    }
  }

  ...
});

Tool's settings

An image showing the header block tool

You can select one of six levels for heading.

Output data

FieldTypeDescription
textstringheader's text
levelnumberlevel of header: 1 for H1, 2 for H2 ... 6 for H6
{
  "type": "header",
  "data": {
    "text": "Why Telegram is the best messenger",
    "level": 2
  }
}
@polo7/block-editorbyevolutioncytoscape.stickynote@infinitebrahmanuniverse/nolb-_edi@alfresco/adf-process-services-cloud@everything-registry/sub-chunk-277aalda-editorgs-text-editorhorul-editorhsl-strapi-plugin-react-editorjslourd-componentslourd-components-tmagnerlrl-cms-tapirlike-water@bigbossstudio/strapi-plugin-editorjs@casimir.one/vue-editorjs@chizhik/ui-lib@brandontle/react-editor.js@canburaks/fibs-editor@carabi/ui@caliobase/caliobase-ui@creators-view/fluid-ui@datahu/client@datahu/component@datahu/designer@culturehacklabs/genki-reloaded@cromwell/admin-panel@deskhero/dh_ui@dicarbene/nuxt3-editorjs@djitsu/editor@devfamily/admiral@ddoctors.ru/editorjs@ddoctors/editor@dxbz/gs-t-components@emilienkopp/ejs-factory@emilienkopp/html-factory@fakel/rest-admin@highoutput/neyar@hostlink/survey-js@fireenjin/editor@juancamejoalarcon/templator@itfin/components@itandu/admin-panelblockeditor-testdsstudio-editorjsduxwebeditorjs-form-buildereditorjs-inline-coloreditorjs-placeholder-tooleditorjs-preconfigurededitorjs-reacteditorjs-vueeditor-js-componenteditor-js-themefibs-editornode-red-contrib-ui-editornuxt3-editorjsnuxt-editorjsnext-step-projectmurph-projectmtxtrpcv2pn-block-editorquickvue-editorjsreact-editor-simple-imagereact-editor-simple-image.jssarman-vue-editor-jsreusecoreui-duckumomega-foundationstd-pagesrinstallerssofa-ui-componentsstrapi-plugin-editorstrapi-plugin-editorjsstrapi-plugin-editorjs-fieldstrapi-plugin-k-editorjsstrapi-editorjsstrapi-plugin-react-editorjsstrapi-plugin-react-editorjs-extended-embedstrapi-academy-plus-editorjsyt-editoruse-editor-jssmart-editorzg-editor@acf-int/strapi-plugin-editorjs@acf-int/strapi-plugin-react-editorjs@9troisquarts/ant-form@4kda/vuetify-cifrum-demo-app@keystonejs-contrib/fields-editorjs@kaniyarasu/react-editor.js@laodeaksarr/rte@madnesslabs/enjin-editor@rjgf/rj-components@rypock/react-frontend@rainyland-dev/strapi-plugin-editorjs@realmocean/editor@questflow/canvas@nwire/amit-design-system@oak-digital/strapi-plugin-react-editorjs
2.8.1

6 months ago

2.8.0

6 months ago

2.7.0

1 year ago

2.6.2

2 years ago

2.6.1

3 years ago

2.6.0

4 years ago

2.5.0

4 years ago

2.4.2

4 years ago

2.4.1

4 years ago

2.4.0

4 years ago

2.3.2

4 years ago

2.3.1

5 years ago

2.3.0

5 years ago

2.2.4

5 years ago

2.2.3

5 years ago

2.2.2

5 years ago

2.2.1

5 years ago

2.2.0

5 years ago