
Product
Announcing Socket Fix 2.0
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
@kaliber/html-to-portable-text
Advanced tools
A plugin for converting html to portableText
htmlToPortableText(html, overrides = {})
const htmlToPortableText = require('@kaliber/html-to-portable-text')
const portableText = processHTML('<p><h1>This</strong><em>is HTML</em></p>')
function processHTML(html) {
return removeUndefinedValues(htmlToPortableText(html, { h1: 'heading', h2: 'subheading' }))
}
function removeUndefinedValues(o) {
return JSON.parse(JSON.stringify(o))
}
> yarn
> yarn link
> yarn watch
yarn link @kaliber/html-to-portable-text
yarn publish
git push
git push --tags
This library is intended for internal use, we provide no support, use at your own risk. It does not import React, but expects it to be provided, which @kaliber/build can handle for you.
This library is not transpiled.
FAQs
A plugin for converting html to portableText
The npm package @kaliber/html-to-portable-text receives a total of 4 weekly downloads. As such, @kaliber/html-to-portable-text popularity was classified as not popular.
We found that @kaliber/html-to-portable-text demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 10 open source maintainers 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.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.