
Research
/Security News
Malicious npm Packages Target WhatsApp Developers with Remote Kill Switch
Two npm packages masquerading as WhatsApp developer libraries include a kill switch that deletes all files if the phone number isn’t whitelisted.
tiptap-parser
Advanced tools
HTML parser to React component built on the top of html-react-parser with code syntax highlighting
tiptap-parser: HTML parser to React component built on the top of html-react-parser with code syntax highlighting.
Try it yourself in this CodeSandbox live demo
npm install html-code-editor
or
yarn add html-code-editor
## Get started
#### Simple usage
```tsx
import parseHtml from 'html-code-editor';
const html = `<p><h1>Hello there</h1><code>console.log("Using it as a component")</code></p>`;
function App() {
return (
<div>
{parseHtml(html)}
</div>
);
}
import { HtmlCodeParser } from '../Parse'
const html = `<p><h1>Hello there</h1><code>console.log("Using it as a component")</code></p>`;
const App = () => {
return (
<HtmlCodeParser language="typescript" codeContainerClassName="custom-class">
{html}
</HtmlCodeParser>
)
}
By default it's use Javascript
parseHtml(html, { language: 'php' })
<HtmlCodeParser language="php">
{html}
</HtmlCodeParser>
parseHtml(html, { codeContainerClassName: 'bg-gray-300' })
<HtmlCodeParser codeContainerClassName="bg-gray-300">
{html}
</HtmlCodeParser>
props | type | Default value | Description |
---|---|---|---|
children | string[] | empty | html string |
codeContainerClassName | string | empty | styles of the code container |
language | string | empty | language of the code ((see the list)[https://github.com/wooorm/lowlight?tab=readme-ov-file#data]) |
Get started here.
FAQs
HTML parser to React component built on the top of html-react-parser with code syntax highlighting
The npm package tiptap-parser receives a total of 107 weekly downloads. As such, tiptap-parser popularity was classified as not popular.
We found that tiptap-parser demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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.
Research
/Security News
Two npm packages masquerading as WhatsApp developer libraries include a kill switch that deletes all files if the phone number isn’t whitelisted.
Research
/Security News
Socket uncovered 11 malicious Go packages using obfuscated loaders to fetch and execute second-stage payloads via C2 domains.
Security News
TC39 advances 11 JavaScript proposals, with two moving to Stage 4, bringing better math, binary APIs, and more features one step closer to the ECMAScript spec.