Header Tool
Provides Headings Blocks for the CodeX Editor.
Installation
Install via NPM
Get the package
npm i --save-dev codex.editor.header
Include module at your application
const Header = ;
Download to your project's source dir
- Upload folder
dist
from repository - Add
dist/bundle.js
file to your page.
Load from CDN
You can load specific version of package from jsDelivr CDN.
https://cdn.jsdelivr.net/npm/codex.editor.header@2.0.4
Then require this script on page with CodeX Editor.
Usage
Add a new Tool to the tools
property of the CodeX Editor initial config.
var editor = ;
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 = ;
Config Params
Field | Type | Description |
---|---|---|
placeholder | string |
header's placeholder string |
var editor = ;
Tool's settings
You can select one of three levels for heading.
Output data
Field | Type | Description |
---|---|---|
text | string |
header's text |
level | number |
level of header: 2 for H2, 3 for H3, 4 for H4 |