mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-15 15:44:45 -04:00
feat: import html-to-react from https://github.com/hedgedoc/html-to-react
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
5dc6526278
commit
84527f065c
37 changed files with 1388 additions and 0 deletions
html-to-react/src
15
html-to-react/src/NodeToReactElementTransformer.ts
Normal file
15
html-to-react/src/NodeToReactElementTransformer.ts
Normal file
|
@ -0,0 +1,15 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2020 The HedgeDoc developers (see AUTHORS file)
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
import { Node } from 'domhandler'
|
||||
import { ReactElement } from 'react'
|
||||
|
||||
export interface NodeToReactElementTransformer {
|
||||
(
|
||||
node: Node,
|
||||
index: number | string,
|
||||
transform?: NodeToReactElementTransformer
|
||||
): ReactElement | void | null | string
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue