Skip to content

MarkdownView v1.5.4

Latest

Choose a tag to compare

@Ultriuma Ultriuma released this 21 Sep 12:31
· 3 commits to main since this release

MarkdownView v1.5.4 — 新增导出(Export)API,支持导出 Markdown / 纯文本 / HTML / 截图 PNG / Bitmap

Release Downloads

Download based on your needs:

内容 下载
Dex + README
Dex + License
src + README
src + License
README

均包含 LICENSE(Apache-2.0)。

更新内容 / Changelog

导出 API(Export)

新增安全形态的导出功能:格式经 setExportFormat(int) 设置,回调经 doExportAndCallback(Object) 传入。全部主线程,不新开线程。

导出格式:

常量 值 说明
EXPORT_FORMAT_MARKDOWN 1 返回原始 markdown 源码
EXPORT_FORMAT_TEXT 2 返回去语法纯文本
EXPORT_FORMAT_HTML 3 返回自包含完整 HTML 文档
EXPORT_FORMAT_IMAGE 4 截图 PNG 写入缓存,回调返回文件路径
EXPORT_FORMAT_BITMAP 5 直接返回 Bitmap 对象

ExportCallback:

  • onExport(int code, String content) — 文本/路径分支
  • onExport(int code, String msg) — 文本/错误分支
  • onExport(int format, Bitmap bitmap) — Bitmap 分支
  • LuaJ 按方法名绑定,单个 Lua 函数按 ype(b) 分流

源码开放

src/com/ocssfun/markdown/ 下 5 个 Java 源文件已包含在内。

来源 / Provenance: ULTRIUMA(ULTIMATE TRITIUM ASTRA)编译维护