Installations
npm install editorjs-header-with-anchor
Developer Guide
Typescript
No
Module System
CommonJS
Node Version
12.13.1
NPM Version
6.12.1
Score
65.3
Supply Chain
95.4
Quality
75.2
Maintenance
100
Vulnerability
100
License
Releases
Unable to fetch releases
Contributors
Unable to fetch Contributors
Languages
JavaScript (92.32%)
CSS (7.68%)
Love this project? Help keep it running — sponsor us today! 🚀
Developer
Aleksst95
Download Statistics
Total Downloads
66,755
Last Day
144
Last Week
1,009
Last Month
4,435
Last Year
35,216
GitHub Statistics
MIT License
9 Stars
104 Commits
4 Forks
8 Branches
1 Contributors
Updated on Jan 07, 2023
Package Meta Information
Latest Version
2.6.0
Package Id
editorjs-header-with-anchor@2.6.0
Unpacked Size
30.17 kB
Size
11.59 kB
File Count
6
NPM Version
6.12.1
Node Version
12.13.1
Total Downloads
Cumulative downloads
Total Downloads
66,755
Last Day
-44.2%
144
Compared to previous day
Last Week
-14.4%
1,009
Compared to previous week
Last Month
63.3%
4,435
Compared to previous month
Last Year
142.5%
35,216
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Heading Tool with anchor
Provides Headings Blocks with the ability to set an anchor text for the Editor.js. Forked by Header Tool
Screenshot
Installation
Install via NPM
Get the package
1npm i --save editorjs-header-with-anchor
Include module at your application
1const Header = require('editorjs-header-with-anchor');
Download to your project's source dir
- Upload folder
dist
from repository - Add
dist/bundle.js
file to your page.
Usage
Add a new Tool to the tools
property of the Editor.js initial config.
1var editor = EditorJS({ 2 ... 3 4 tools: { 5 ... 6 header: Header, 7 }, 8 9 ... 10});
Available characters: all Latin letters, digitals, dash, and underscore.
In the cyrToLat
branch, you can find additional functionality: Cyrillic characters are replaced by Latin letters,
for example, ш
to sch
.
In the maxLength
branch, you can find additional functionality: If you want to set the maximum length of the header text, you need to set the checkHeaderLength
parameter to TRUE
in the config.
In the cyrToLat_with_maxLength
branch, you can find additional features from branches cyrToLat
and maxLength
at the same time.
P.S. The anchor value is displayed next to the header block only when there is text in the header block.
Shortcut
You can insert this Block by a useful shortcut. Set it up with the tools[].shortcut
property of the Editor's initial config.
1var editor = EditorJS({ 2 ... 3 4 tools: { 5 ... 6 header: { 7 class: Header, 8 shortcut: 'CMD+SHIFT+H', 9 }, 10 }, 11 12 ... 13});
Config Params
All properties are optional.
Field | Type | Description |
---|---|---|
placeholder | string | header's placeholder string |
levels | number[] | enabled heading levels |
defaultLevel | number | default heading level |
allowAnchor | boolean | Anchor enabling (default: true ) |
anchorLength | number | Anchor length (default: 50 ) |
1var editor = EditorJS({ 2 ... 3 4 tools: { 5 ... 6 header: { 7 class: Header, 8 config: { 9 placeholder: 'Enter a header', 10 levels: [2, 3, 4], 11 defaultLevel: 3, 12 allowAnchor: true, 13 anchorLength: 100, 14 } 15 } 16 } 17 18 ... 19});
Output data
Field | Type | Description |
---|---|---|
text | string | header's text |
level | number | level of header: 1 for H1, 2 for H2 ... 6 for H6 |
anchor | string | anchor's text |
1{ 2 "type": "header", 3 "data": { 4 "text": "Why Telegram is the best messenger", 5 "level": 2, 6 "anchor": "Anchor" 7 } 8}

No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
Found 1/26 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/npm-publish.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/Aleksst95/header-with-anchor/npm-publish.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/npm-publish.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/Aleksst95/header-with-anchor/npm-publish.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/npm-publish.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/Aleksst95/header-with-anchor/npm-publish.yml/master?enable=pin
- Info: 0 out of 3 GitHub-owned GitHubAction dependencies pinned
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Warn: no topLevel permission defined: .github/workflows/npm-publish.yml:1
- Info: no jobLevel write permissions found
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 6 are checked with a SAST tool
Reason
37 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92
- Warn: Project is vulnerable to: GHSA-v88g-cgmw-v5xw
- Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw
- Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg
- Warn: Project is vulnerable to: GHSA-x9w5-v3q2-3rhw
- Warn: Project is vulnerable to: GHSA-w8qv-6jwh-64r5
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c
- Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq
- Warn: Project is vulnerable to: GHSA-vh7m-p724-62c2
- Warn: Project is vulnerable to: GHSA-r9p9-mrjm-926w
- Warn: Project is vulnerable to: GHSA-434g-2637-qmqr
- Warn: Project is vulnerable to: GHSA-49q7-c7j4-3p7m
- Warn: Project is vulnerable to: GHSA-977x-g7h5-7qgw
- Warn: Project is vulnerable to: GHSA-f7q4-pwc6-w24p
- Warn: Project is vulnerable to: GHSA-fc9h-whq2-v747
- Warn: Project is vulnerable to: GHSA-vjh7-7g9h-fjfh
- Warn: Project is vulnerable to: GHSA-ww39-953v-wcq6
- Warn: Project is vulnerable to: GHSA-qqgx-2p2h-9c37
- Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h
- Warn: Project is vulnerable to: GHSA-76p3-8jx3-jpfq
- Warn: Project is vulnerable to: GHSA-3rfm-jhwj-7488
- Warn: Project is vulnerable to: GHSA-hhq3-ff78-jv3g
- Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw
- Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9
- Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm
- Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv
- Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3
- Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h
- Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9
- Warn: Project is vulnerable to: GHSA-566m-qj78-rww5
- Warn: Project is vulnerable to: GHSA-7fh5-64p2-3v2j
- Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw
- Warn: Project is vulnerable to: GHSA-76p7-773f-r4q5
- Warn: Project is vulnerable to: GHSA-vx3p-948g-6vhq
- Warn: Project is vulnerable to: GHSA-4wf5-vphf-c2xc
- Warn: Project is vulnerable to: GHSA-c4w7-xm78-47vh
Score
2.8
/10
Last Scanned on 2025-02-17
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More