delta_markdown
Dart 中的 Delta Markdown 转换器
- 星标
- 22
- 复刻
- 37
- 最近推送(UTC)
- 2024年6月26日
- 项目状态
- 未归档
原始 README
以下为英文项目原文快照,最新内容请访问 GitHub。
A portable Markdown library written in Dart. It can convert between Markdown and Delta.
The converter is not ready for production
Usage
import 'package:delta_markdown/delta_markdown.dart';
void main() {
const markdown = 'Hello **Markdown**';
print(markdownToDelta(markdown));
const delta = r'[{"insert":"Hello "},{"insert":"Markdown","attributes":{"bold":true}},{"insert":"\n"}]';
print(deltaToMarkdown(delta));
}
Supports
Currently, these elements are supported:
- Bold
- Italic
- Link
- Blockquote
- Header
- List
- Code Block
- Image
- Horizontal Rule
Does not support the following elements, because Markdown does not support them:
- Background Color
- Color
- Font
- Size
- Strikethrough
- Superscript/Subscript
- Underline
- Text Alignment
- Text Direction
- Formula
- Video
Does not support the following elements, because flutter_quill does not support them:
- Inline Code
Known limits
Support for these elements must be implemented:
- Indent
There are only a few tests so far, so the functionality is not yet guaranteed in complex cases.
语言Dart
使用的依赖
依赖清单 8 项
- args
^2.0.0 - charcode
^1.2.0 - collection
^1.15.0 - flutter_quill
^7.0.0 - build_runner开发依赖
^2.0.0 - flutter_test开发依赖
{"sdk":"flutter"} - pedantic开发依赖
^1.11.0 - test开发依赖
^1.16.5
如何选择适合项目的代码仓?
先按使用场景筛选,再比较项目活跃情况,最后到原始仓库核对使用要求。
- 通过仓库名、作者或描述搜索,再按技术分类缩小范围。
- 结合星标、复刻与最近推送比较项目;星标反映社区关注,不代表质量保证。
- 使用前在 GitHub 核对 README、许可证与 Issues。
来源与维护
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗