tiptap-parser
Advanced tools
Comparing version
{ | ||
"name": "tiptap-parser", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "HTML parser to React component built on the top of html-react-parser with code syntax highlighting", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -5,3 +5,3 @@ # tiptap-parser | ||
<b>tiptap-parser</b>: HTML parser to React component built on the top of <a href="https://www.npmjs.com/package/html-react-parser">html-react-parser</a> with code syntax highlighting. | ||
<b>tiptap-parser</b>: HTML parser for Tiptap <a href="https://www.npmjs.com/package/html-react-parser">html-react-parser</a> with code syntax highlighting. | ||
@@ -68,4 +68,2 @@ </p> | ||
```tsx | ||
import TiptapParser from "tiptap-parser"; | ||
const html = `<><h1>Hello there</h1><code>console.log("Log something here")</code></>`; | ||
@@ -85,20 +83,14 @@ | ||
```tsx | ||
import { HtmlCodeParser } from '../Parse' | ||
const html = `<p><h1>Hello there</h1></p>`; | ||
const App = () => { | ||
return ( | ||
<TiptapParser | ||
classNames={{ | ||
codeClassName: 'p-6', | ||
h1ClassName: 'text-xl', | ||
aClassName: 'underline', | ||
pClassName: 'text-gray-400' | ||
}} | ||
/> | ||
{html} | ||
</TiptapParser> | ||
) | ||
} | ||
<TiptapParser | ||
classNames={{ | ||
codeClassName: 'p-6', | ||
h1ClassName: 'text-xl', | ||
aClassName: 'underline', | ||
pClassName: 'text-gray-400' | ||
}} | ||
/> | ||
{html} | ||
</TiptapParser> | ||
``` | ||
@@ -105,0 +97,0 @@ |
20152
-0.94%124
-6.06%