Const
Optional DI token for a custom MarkdownParser.
When provided, the MarkdownEditingStrategy will use it instead of the built-in lightweight converter. This lets consumers plug in full-featured parsers like marked or markdown-it without adding a dependency to the library itself.
MarkdownEditingStrategy
marked
markdown-it
import { MARKDOWN_PARSER, createMarkedParser } from '@theredhead/lucid-kit';import { marked } from 'marked';@Component({ providers: [ { provide: MARKDOWN_PARSER, useValue: createMarkedParser(md => marked.parse(md) as string), }, ],})export class MyEditorHost {} Copy
import { MARKDOWN_PARSER, createMarkedParser } from '@theredhead/lucid-kit';import { marked } from 'marked';@Component({ providers: [ { provide: MARKDOWN_PARSER, useValue: createMarkedParser(md => marked.parse(md) as string), }, ],})export class MyEditorHost {}
Optional DI token for a custom MarkdownParser.
When provided, the
MarkdownEditingStrategywill use it instead of the built-in lightweight converter. This lets consumers plug in full-featured parsers likemarkedormarkdown-itwithout adding a dependency to the library itself.