mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2025-04-24 22:57:12 -04:00
* fix: include link preview block and file block in exported markdown * test: include link preview block and file block in exported markdown * chore: remove unused logs * chore: update editor version * fix: "+" menu should be close after pressing space * test: cancel inline page reference menu by space * chore: update editor version * chore: remove unused logs
27 lines
739 B
Dart
27 lines
739 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(),
|
|
const LinkPreviewNodeParser(),
|
|
const FileBlockNodeParser(),
|
|
],
|
|
);
|
|
}
|