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'
|
2021-11-15 11:04:49 -05:00
|
|
|
import type { ImageClickHandler } from './markdown-extension/image/proxy-image-replacer'
|
2021-10-17 12:45:58 -04:00
|
|
|
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
|
2021-11-15 11:04:49 -05:00
|
|
|
baseUrl: string
|
2021-10-04 06:50:39 -04:00
|
|
|
onImageClick?: ImageClickHandler
|
|
|
|
outerContainerRef?: Ref<HTMLDivElement>
|
2021-11-15 11:04:49 -05:00
|
|
|
newlinesAreBreaks?: boolean
|
2021-10-04 06:50:39 -04:00
|
|
|
lineOffset?: number
|
|
|
|
className?: string
|
2021-12-14 04:16:25 -05:00
|
|
|
markdownContentLines: string[]
|
2021-10-04 06:50:39 -04:00
|
|
|
}
|