mirror of
https://github.com/alrayyes/wiki.git
synced 2025-04-30 06:14:13 +00:00
fix: catch html to jsx errors (closes #547)
This commit is contained in:
parent
dc834015d0
commit
60b3bc34cb
7 changed files with 29 additions and 21 deletions
docs/advanced
|
@ -247,7 +247,7 @@ If you are creating an emitter plugin that needs to render components, there are
|
|||
|
||||
- Your component should use `getQuartzComponents` to declare a list of `QuartzComponents` that it uses to construct the page. See the page on [[creating components]] for more information.
|
||||
- You can use the `renderPage` function defined in `quartz/components/renderPage.tsx` to render Quartz components into HTML.
|
||||
- If you need to render an HTML AST to JSX, you can use the `toJsxRuntime` function from `hast-util-to-jsx-runtime` library. An example of this can be found in `quartz/components/pages/Content.tsx`.
|
||||
- If you need to render an HTML AST to JSX, you can use the `htmlToJsx` function from `quartz/util/jsx.ts`. An example of this can be found in `quartz/components/pages/Content.tsx`.
|
||||
|
||||
For example, the following is a simplified version of the content page plugin that renders every single page.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue