mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2025-04-24 22:57:12 -04:00
25 lines
667 B
Dart
25 lines
667 B
Dart
import 'package:appflowy/plugins/document/presentation/editor_plugins/plugins.dart';
|
|
import 'package:appflowy_editor/appflowy_editor.dart';
|
|
|
|
Document customMarkdownToDocument(String markdown) {
|
|
return markdownToDocument(
|
|
markdown,
|
|
markdownParsers: [
|
|
const MarkdownCodeBlockParser(),
|
|
const MarkdownSimpleTableParser(),
|
|
],
|
|
);
|
|
}
|
|
|
|
String customDocumentToMarkdown(Document document) {
|
|
return documentToMarkdown(
|
|
document,
|
|
customParsers: [
|
|
const MathEquationNodeParser(),
|
|
const CalloutNodeParser(),
|
|
const ToggleListNodeParser(),
|
|
const CustomImageNodeParser(),
|
|
const SimpleTableNodeParser(),
|
|
],
|
|
);
|
|
}
|