• 简体中文
  • 插件矩阵

    组件分化

    组件入口默认能力
    Fluxdown@fluxdown/react-native 或 @fluxdown/react-native/full在基础能力上加入代码高亮、Mermaid 图表、SVG 公式、CJK 与 Emoji。
    FluxdownLite@fluxdown/react-native/lite基础 Markdown、表格、图片与流式效果;代码与公式显示源码。
    FluxdownRaw@fluxdown/react-native/raw自行传入完整的 plugins。

    Full 的代码高亮使用 react-native-code-highlighter,图表使用 @osuki-dev/skia-diagrams 的解析与布局能力,公式使用 MathJax 3 的 SVG 输出。图表与公式最终由 react-native-svg 绘制。

    build.tex 默认为 false,需要公式时显式开启。Mermaid 使用标记为 mermaid 的围栏代码块;未支持的图表类型保留源码。

    Full 和 Lite 都需要 react-native-svg 15.16 或更新版本,用于流式效果。Raw 按传入的插件组合能力;添加这些效果、公式或图表插件时也需要安装。

    全部插件

    「组成」包含继承的插件类型;勾选表示预设直接包含。Full 中的高亮与公式插件分别继承基础的 Code 与 Tex 能力。

    插件组成所在包LiteFull
    BlockquotePluginRender Slotreact-native-plugins
    BreakLinePluginRender Slotreact-native-plugins
    CjkPluginRemarkreact-base-plugins
    CodePluginRender Slotreact-native-plugins
    CodeHighlightPluginRender Slotreact-native-plugins
    CodeMermaidPluginSlotreact-native-plugins
    EffectChunkPluginRender Slotreact-native-plugins
    EffectScalePluginRender Slotreact-native-plugins
    EffectShadPluginRender Slotreact-native-plugins
    EffectSuffixPluginRender Slotreact-native-plugins
    EmojiPluginRemarkreact-base-plugins
    EmphasisPluginRender Slotreact-native-plugins
    FallbackPluginRender Slotreact-native-plugins
    HeadingPluginRender Slotreact-native-plugins
    ImagePluginRender Slotreact-native-plugins
    LinkPluginRender Slotreact-native-plugins
    ListPluginRender Slotreact-native-plugins
    ParagraphPluginRender Slotreact-native-plugins
    PatchPluginRenderreact-base-plugins
    StrongPluginRender Slotreact-native-plugins
    TablePluginRender Slotreact-native-plugins
    TexPluginRender Slotreact-native-plugins
    TexSvgPluginRender Slotreact-native-plugins

    所在包与导入

    • react-native-plugins :@fluxdown/react-native-plugins,包含原生插槽与对应综合插件。
    • react-base-plugins :@fluxdown/react-base-plugins,包含不依赖具体界面的基础插件。

    使用 <包全名>/plugins/<插件目录> 导入。目录名取导出名称,去掉 Plugin 后转成小写中划线形式,例如 CodeHighlightPlugin 对应 code-highlight。

    import { CodeHighlightPlugin } from '@fluxdown/react-native-plugins/plugins/code-highlight';
    import { CjkPlugin } from '@fluxdown/react-base-plugins/plugins/cjk';

    组件的 plugins 参数可以继续扩展任意预设。配置与组合方式见综合插件。