Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
@editorjs/header
Advanced tools
Provides Headings Blocks for the Editor.js.
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
Add a new Tool to the tools
property of the Editor.js initial config.
var editor = EditorJS({
...
tools: {
...
header: Header,
},
...
});
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',
},
},
...
});
All properties are optional.
Field | Type | Description |
---|---|---|
placeholder | string | header's placeholder string |
levels | number[] | enabled heading levels |
defaultLevel | number | default heading level |
var editor = EditorJS({
...
tools: {
...
header: {
class: Header,
config: {
placeholder: 'Enter a header',
levels: [2, 3, 4],
defaultLevel: 3
}
}
}
...
});
You can select one of six levels for heading.
Field | Type | Description |
---|---|---|
text | string | header's text |
level | number | level of header: 1 for H1, 2 for H2 ... 6 for H6 |
{
"type": "header",
"data": {
"text": "Why Telegram is the best messenger",
"level": 2
}
}
FAQs
Heading Tool for Editor.js
We found that @editorjs/header demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.