mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-22 03:05:19 -04:00
Replace react-html-parser with html-to-react (#1327)
* Replace react-html-parser with html-to-react Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
b13c1ce8a0
commit
82472227f9
31 changed files with 329 additions and 167 deletions
|
@ -90,11 +90,15 @@ export const BasicMarkdownRenderer: React.FC<BasicMarkdownRendererProps & Additi
|
|||
}, [onAfterRendering])
|
||||
|
||||
const baseReplacers = useComponentReplacers(onTaskCheckedChange, onImageClick, baseUrl)
|
||||
const replacers = useCallback(
|
||||
() => baseReplacers().concat(additionalReplacers ? additionalReplacers() : []),
|
||||
[additionalReplacers, baseReplacers]
|
||||
)
|
||||
|
||||
const markdownReactDom = useConvertMarkdownToReactDom(
|
||||
trimmedContent,
|
||||
markdownIt,
|
||||
baseReplacers,
|
||||
additionalReplacers,
|
||||
replacers,
|
||||
clearFrontmatter,
|
||||
checkYamlErrorState
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue