Skip to content

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

Closed
@wooyang2018

Description

@wooyang2018

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

Activity

TCOTC

TCOTC commented on Feb 14, 2025

@TCOTC
Contributor

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

TCOTC

TCOTC commented on Mar 7, 2025

@TCOTC
Contributor

html-to-image 能解决吗 #14161

88250

88250 commented on Mar 13, 2025

@88250
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @88250@Vanessa219@wooyang2018@TCOTC

      Issue actions

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