2.8.8 • Published 1 year ago

@editorjs/header v2.8.8

Weekly downloads
9,433
License
MIT
Repository
github
Last release
1 year 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@everything-registry/sub-chunk-277aalda-editorwonder-imagewebsters-adminstrapi-plugin-editorstrapi-plugin-editorjsstrapi-plugin-editorjs-fieldstrapi-plugin-editorjs-nextstrapi-plugin-k-editorjsstrapi-academy-plus-editorjsstrapi-editorjsvue-editorjs-adapter@caliobase/caliobase-ui@canburaks/fibs-editor@rulab/adminjs-componentsilla-buildergs-text-editorhorul-editorhsl-strapi-plugin-react-editorjslike-waterlrl-cms-tapirlourd-componentslourd-components-tmagnermemories-uimedusa-plugin-editorjsmedusa-plugin-bloggermedusa-plugin-blogger-ar@wisdech/react-editor@vt7/vue-editor@workwithdittodev/ditto-project-timeline-view@wulperstudio/wulper-studio-editor@tienlucky/storage@todokek/react-editor.js@virtual-spirit/vspace-labs@zalastax/nolb-_edi@zdzcode/zc-web-vuejs-coreall-in-one-editorjsaalda--editoraranghat-react-editor@aulazero/task@aulazero/task-2@itandu/admin-panel@4kda/vuetify-cifrum-demo-app@acf-int/strapi-plugin-editorjs@itfin/components@cromwell/admin-panel@creators-view/fluid-ui@alfresco/adf-process-services-cloudblockeditor-test@om-mediaworks/shacl-formstd-pagestrapi-plugin-react-editorjsstrapi-plugin-react-editorjs-extended-embedsrinstallersui-duckumomega-foundation@bigbossstudio/strapi-plugin-editorjs@carabi/ui@casimir.one/vue-editorjs@chizhik/ui-lib@acf-int/strapi-plugin-react-editorjs@juancamejoalarcon/templator@brandontle/react-editor.jsyt-editorzg-editoruse-editor-js@laodeaksarr/rte@lotsof/carpenter@lotsof/json-schema-form@mockswitch/cli@mohamed-karawia/library@rypock/react-frontend@realmocean/editor@rjgf/rj-componentsmtxtrpcv2murph-projectodoc-viewernuxt-editorjsnuxt3-editorjssarman-vue-editor-jsreact-editor-simple-image.jsreact-editor-simple-imagenode-red-contrib-ui-editornext-step-projectpn-block-editorquickvue-editorjsreusecoresmart-editorsofa-ui-componentschatnext-uichatnext-ui-assistant-app-tesetchatnext-assistantcms-tapircreate-cycoserve-appcytoscape-stickynote
2.8.3

1 year ago

2.8.2

1 year ago

2.8.5

1 year ago

2.8.4

1 year ago

2.8.7

1 year ago

2.8.6

1 year ago

2.8.8

1 year ago

2.8.1

2 years ago

2.8.0

2 years ago

2.7.0

3 years ago

2.6.2

4 years ago

2.6.1

5 years ago

2.6.0

5 years ago

2.5.0

5 years ago

2.4.2

5 years ago

2.4.1

6 years ago

2.4.0

6 years ago

2.3.2

6 years ago

2.3.1

6 years ago

2.3.0

6 years ago

2.2.4

6 years ago

2.2.3

7 years ago

2.2.2

7 years ago

2.2.1

7 years ago

2.2.0

7 years ago