2021-10-04 06:50:39 -04:00
|
|
|
/*
|
|
|
|
* SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file)
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
*/
|
|
|
|
|
2021-10-17 12:45:58 -04:00
|
|
|
import type { TocAst } from 'markdown-it-toc-done-right'
|
|
|
|
import type { ImageClickHandler } from './replace-components/image/image-replacer'
|
|
|
|
import type { Ref } from 'react'
|
2021-10-04 06:50:39 -04:00
|
|
|
|
|
|
|
export interface CommonMarkdownRendererProps {
|
|
|
|
onFirstHeadingChange?: (firstHeading: string | undefined) => void
|
|
|
|
onTaskCheckedChange?: (lineInMarkdown: number, checked: boolean) => void
|
|
|
|
onTocChange?: (ast?: TocAst) => void
|
|
|
|
baseUrl?: string
|
|
|
|
onImageClick?: ImageClickHandler
|
|
|
|
outerContainerRef?: Ref<HTMLDivElement>
|
|
|
|
useAlternativeBreaks?: boolean
|
|
|
|
lineOffset?: number
|
|
|
|
className?: string
|
|
|
|
content: string
|
|
|
|
}
|