2.8.8 • Published 10 months ago

@editorjs/header v2.8.8

Weekly downloads
9,433
License
MIT
Repository
github
Last release
10 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@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@djitsu/editor@creators-view/fluid-ui@cromwell/admin-panel@culturehacklabs/genki-reloaded@devfamily/admiral@caliobase/caliobase-ui@canburaks/fibs-editor@rulab/adminjs-componentsblockeditor-test@om-mediaworks/shacl-formstd-pagestrapi-plugin-react-editorjsstrapi-plugin-react-editorjs-extended-embedsrinstallersui-duckumomega-foundation@aulazero/task@alfresco/adf-process-services-cloud@bigbossstudio/strapi-plugin-editorjs@carabi/ui@casimir.one/vue-editorjs@chizhik/ui-lib@4kda/vuetify-cifrum-demo-app@acf-int/strapi-plugin-react-editorjs@acf-int/strapi-plugin-editorjs@9troisquarts/ant-form@juancamejoalarcon/templator@brandontle/react-editor.js@ddoctors.ru/editorjs@ddoctors/editor@deskhero/dh_ui@dicarbene/nuxt3-editorjs@datahu/client@datahu/component@datahu/designeryt-editorzg-editoruse-editor-js@hostlink/survey-js@highoutput/neyar@hillium/ant-form@fireenjin/editor@emilienkopp/ejs-factory@emilienkopp/html-factory@evershop/evershop@laodeaksarr/rte@lotsof/carpenter@lotsof/json-schema-form@itfin/components@itandu/admin-panel@madnesslabs/enjin-editor@fakel/rest-admin@mockswitch/cli@mohamed-karawia/library@matthewkilpatrick/strapi-plugin-editor-js@keystonejs-contrib/fields-editorjs@dxbz/gs-t-components@kaniyarasu/react-editor.js@olton/enei-editor@offlegacy/react-editorjs@rainyland-dev/strapi-plugin-editorjs@rypock/react-frontend@questflow/canvas@realmocean/editor@rjgf/rj-components@nwire/amit-design-system@oak-digital/strapi-plugin-react-editorjs@ossph/temple-uimtxtrpcv2murph-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-componentsilla-builder
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

10 months 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

5 years ago

2.4.0

5 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

6 years ago

2.2.2

6 years ago

2.2.1

6 years ago

2.2.0

6 years ago