Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🤔官网示例:导出功能未能复现文档提到的支持html #2828

Closed
shaw1111 opened this issue Jul 22, 2024 · 3 comments · Fixed by #2865
Closed

🤔官网示例:导出功能未能复现文档提到的支持html #2828

shaw1111 opened this issue Jul 22, 2024 · 3 comments · Fixed by #2865
Assignees
Labels

Comments

@shaw1111
Copy link

https://s2.antv.antgroup.com/examples/interaction/basic#copy-export

文档说是支持复制html格式的,但是启用 customTransformer:
const data = await asyncGetAllPlainData({
sheetInstance: s2,
split,
formatOptions: isFormat,
// 自定义转换器: 如复制到语雀等富文本编辑器场景展示空表格
customTransformer,
});
复制按钮还是得到原始文本

@shaw1111 shaw1111 added the ❔question 疑问/使用问题 label Jul 22, 2024
@lijinke666 lijinke666 self-assigned this Jul 24, 2024
@lijinke666
Copy link
Member

文档说是支持复制html格式的,但是启用 customTransformer

customTransformer 是用于自定义转换格式, 通常来说用不到, 并不是说开启了才能导出 html.

默认复制和导出都是支持 text/plaintext/html 的, 只是 asyncGetAll"Plain"Data 正如这个 API 的名字, 只返回了 text/plain 文本数据, 而不包含 text/html.

文档有一点误导性, 后面会修改下文档并增加一个 asyncGetAllHtmlData 的 API 用于导出 html 格式的数据.

@lijinke666
Copy link
Member

🎉 This issue has been resolved in version @antv/s2-v2.0.0-next.27 🎉

The release is available on:

Your semantic-release bot 📦🚀

@lijinke666
Copy link
Member

🎉 This issue has been resolved in version @antv/s2-react-v2.0.0-next.26 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants