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

使用主题时导出公式为图片失败,原因是html2canvas.min.js不支持oklch表示的颜色 #13756

Closed
3 tasks done
wooyang2018 opened this issue Jan 8, 2025 · 3 comments
Assignees

Comments

@wooyang2018
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Can the issue be reproduced with the default theme (daylight/midnight)?

  • I was able to reproduce the issue with the default theme

Could the issue be due to extensions?

  • I've ruled out the possibility that the extension is causing the problem.

Describe the problem

表现:使用主题时导出公式为图片失败,点击导出图片控制台报错,导出图片不完整
image

原因:html2canvas.min.js不支持oklch表示的颜色

修改建议:将app/stage/protyle/js/html2canvas.min.js修改为html2canvas-pro.min.js,项目主页是https://www.npmjs.com/package/html2canvas-pro?activeTab=readme,html2canvas-pro.min.js的下载链接是https://github.com/yorickshan/html2canvas-pro/releases/tag/v1.5.8

Expected result

期望使用Asri主题时导出公式为图片正常

Screenshot or screen recording presentation

No response

Version environment

- Version: v3.1.19
- Operating System: 
- Browser (if used):

Log file

None

More information

No response

@TCOTC
Copy link
Contributor

TCOTC commented Feb 14, 2025

试了一下直接换文件是不行的,虽然能导出了,但元素会错位。应该还要修改其他地方

@TCOTC
Copy link
Contributor

TCOTC commented Mar 7, 2025

html-to-image 能解决吗 #14161

@88250
Copy link
Member

88250 commented Mar 13, 2025

库已经换了,暂时先关闭这个 issue,如果 v3.1.25 后还有问题麻烦反馈,谢谢。

@88250 88250 closed this as completed Mar 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants