Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
prosemirror-to-html-js
Advanced tools
(This package is based on prosemirror-to-html, which was originally written for PHP.)
Takes ProseMirror JSON and outputs HTML.
npm install prosemirror-to-html-js --save
const Renderer = require("prosemirror-to-html").Renderer;
const renderer = new Renderer();
console.log(renderer.render({
"type": "doc",
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Example Paragraph"
}
]
}
]
})); // `<p>Example Text</p>`
Define your node as a class -
const Node = require("prosemirror-to-html").Node;
class CustomNode extends Node {
matching () {
return this.node.type === "custom_node";
}
tag () {
return "cnode";
}
}
Feed it to renderer
instance -
renderer.addNode(CustomNode);
FAQs
Takes ProseMirror JSON and outputs HTML
The npm package prosemirror-to-html-js receives a total of 240 weekly downloads. As such, prosemirror-to-html-js popularity was classified as not popular.
We found that prosemirror-to-html-js demonstrated a not healthy version release cadence and project activity because the last version was released 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.