mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-14 07:04:45 -04:00

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de> Co-authored-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de> Co-authored-by: Erik Michelson <github@erik.michelson.eu>
47 lines
2.5 KiB
TypeScript
47 lines
2.5 KiB
TypeScript
import { useMemo } from 'react'
|
|
import { AbcReplacer } from '../replace-components/abc/abc-replacer'
|
|
import { AsciinemaReplacer } from '../replace-components/asciinema/asciinema-replacer'
|
|
import { ComponentReplacer } from '../replace-components/ComponentReplacer'
|
|
import { CsvReplacer } from '../replace-components/csv/csv-replacer'
|
|
import { FlowchartReplacer } from '../replace-components/flow/flowchart-replacer'
|
|
import { GistReplacer } from '../replace-components/gist/gist-replacer'
|
|
import { GraphvizReplacer } from '../replace-components/graphviz/graphviz-replacer'
|
|
import { HighlightedCodeReplacer } from '../replace-components/highlighted-fence/highlighted-fence-replacer'
|
|
import { ImageReplacer } from '../replace-components/image/image-replacer'
|
|
import { KatexReplacer } from '../replace-components/katex/katex-replacer'
|
|
import { LinemarkerReplacer } from '../replace-components/linemarker/linemarker-replacer'
|
|
import { MarkmapReplacer } from '../replace-components/markmap/markmap-replacer'
|
|
import { MermaidReplacer } from '../replace-components/mermaid/mermaid-replacer'
|
|
import { PdfReplacer } from '../replace-components/pdf/pdf-replacer'
|
|
import { PossibleWiderReplacer } from '../replace-components/possible-wider/possible-wider-replacer'
|
|
import { QuoteOptionsReplacer } from '../replace-components/quote-options/quote-options-replacer'
|
|
import { SequenceDiagramReplacer } from '../replace-components/sequence-diagram/sequence-diagram-replacer'
|
|
import { TaskListReplacer } from '../replace-components/task-list/task-list-replacer'
|
|
import { VegaReplacer } from '../replace-components/vega-lite/vega-replacer'
|
|
import { VimeoReplacer } from '../replace-components/vimeo/vimeo-replacer'
|
|
import { YoutubeReplacer } from '../replace-components/youtube/youtube-replacer'
|
|
|
|
export const useReplacerInstanceListCreator = (onTaskCheckedChange: (lineInMarkdown: number, checked: boolean) => void): ()=>ComponentReplacer[] => {
|
|
return useMemo(() => () => [
|
|
new LinemarkerReplacer(),
|
|
new PossibleWiderReplacer(),
|
|
new GistReplacer(),
|
|
new YoutubeReplacer(),
|
|
new VimeoReplacer(),
|
|
new AsciinemaReplacer(),
|
|
new AbcReplacer(),
|
|
new PdfReplacer(),
|
|
new ImageReplacer(),
|
|
new SequenceDiagramReplacer(),
|
|
new CsvReplacer(),
|
|
new FlowchartReplacer(),
|
|
new MermaidReplacer(),
|
|
new GraphvizReplacer(),
|
|
new MarkmapReplacer(),
|
|
new VegaReplacer(),
|
|
new HighlightedCodeReplacer(),
|
|
new QuoteOptionsReplacer(),
|
|
new KatexReplacer(),
|
|
new TaskListReplacer(onTaskCheckedChange)
|
|
], [onTaskCheckedChange])
|
|
}
|