Skip to content

支持的内容格式

本文用于演示当前 feishu-docx 导出后能完美支持的格式,在下面列出的均可以有较好的支持。

由于 Feishu OpenAPI 数据给出有限,feishu-docx 导出并不能 100% 还原在飞书文档里面的格式,实际可以达到 99% 的效果。

参考:新版文档 OpenAPI 操作 Block 能力边界

已知不支持格式:

  • 多维表格 - 飞书多维表格(电子表格)是独立的数据,且数据格式庞大复杂,暂时不支持,请编写文档的时候使用普通表格

  • 流程图 / UML 图 / 画板 / 思维导图 - 以上几种为飞书文档的子应用功能,目前对接的飞书文档未给出此类数据或图片,所以无法实现。

  • 图片尺寸、裁剪 - 图片将以原图的方式输出,由于飞书 OpenAPI 未给出图片的裁剪和缩放尺寸信息,所以导出内容不含宽度、高度,这项可以依据最终页面的设定图片 100% 宽度来实现。

  • 公式 - 暂未支持,这个后面可能会支持。

  • 其他飞书三方组件 - 这个无法支持,API 未提供数据。

  • 文字颜色 - 文字的前景色、背景色,考虑到 Markdown 输出,暂时未做支持。

基于以上,建议在飞书侧编写文档的时候,尽量采用支持的格式,目前已经支持的格式能满足文档撰写(如帮助文档、博客)等场景的文档格式需要。


下面是完整格式演示

This is heading 2

This is heading 3

This is heading 4

This is heading 5
This is heading 6

This is a block quote. With a new line.

Paragraph

导出飞书知识库,并按相同目录结构生成 Static Page Generator 支持 Markdown 文件组织方式,用于发布为静态网站

Generate Feishu Wiki into a Markdown for work with Static Page Generators.

Callout

❤️

Red Callout

And a Link and Bold in the Callout.

💡

Orange Callout

🤖

Yellow Callout

Green Callout

🐳

Blue Callout

🐳

Purple Callout

🐼

Gray Callout

Grid

Here is a 3 column grid example:

BlockQuote in Grid Line 1
This is line 2

  • List Item in Grid

    • This is level 1.1
  • Level 2

    1. Level 2.1 as Ordered
    2. Level 2.2

Bullet List

  • Projects

    • GitHub
    • Twitter
      • x.com
    • Facebook
  • OpenSource

    • feishu-pages
    • feishu-docx

Ordered List

  1. This is 1 item

    1. This is a item
      1. This is i
    2. This is b
    3. This c
  2. This is 2 item

    1. This is 2.1
    2. This is 2.2

CodeBlock

A JSON example:

json
{
  "name": "feishu-pages",
}

A TypeScript example:

ts
const name = "feishu-pages";

TODO

  • [x] This item is completed

  • [ ] This is imcomplete

Divider

There is a divider


To split contents.

Image

An example of an image with caption.

File

test-file.zip

Table

Currently, feishu-docx only supports pure Table.

Name

Type

Website

This is merge row.

GitHub

Programming

https://github.com

Twitter

Social Network

https://x.com

https://twitter.com

Dribbble

Design

https://dribbble.com

Equation

E=mc2

Iframe