Skip to content

API "Protyle" parameter render is incompatible #8849

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

Closed
3 tasks done
frostime opened this issue Jul 29, 2023 · 0 comments
Closed
3 tasks done

API "Protyle" parameter render is incompatible #8849

frostime opened this issue Jul 29, 2023 · 0 comments
Assignees
Milestone

Comments

@frostime
Copy link
Contributor

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

protyle 允许传入一个 option,但是测试的时候发现,如果 render 参数当中的 title 设置为 true 或者 breadcrumb 设置为 false 的时候,Protyle 就无法正常加载。

以下为修改 plugin-sample 的代码

new Protyle(this.app, dialog.element.querySelector("#protyle"), {
    blockId: "20200812220555-lj3enxa",
    render: {
        background: false,
        title: true, // 不能为 true
        gutter: true,
        scroll: true,
        breadcrumb: true, //不能为 false
        breadcrumbDocName: true,
    },
});

如果 title 或者 breadcrumb 更改为非默认的选项,Protyle 就无法正常加载

image

终端报错:

image

@Vanessa219

Expected result

修复问题

Screenshot or screen recording presentation

No response

Version environment

- Version: 2.9.7
- Operating System: windows10
- Browser (if used): 非

在最新版 plugin-sample 下测试

Log file

More information

No response

@frostime frostime changed the title 插件 API Protyle 存在 bug 插件 API Protyle 如果更改 render 默认参数可能会产生 bug Jul 29, 2023
@Vanessa219 Vanessa219 added this to the 2.9.8 milestone Jul 30, 2023
Vanessa219 added a commit that referenced this issue Jul 30, 2023

Verified

This commit was signed with the committer’s verified signature.
@Vanessa219 Vanessa219 changed the title 插件 API Protyle 如果更改 render 默认参数可能会产生 bug API "Protyle" parameter render is incompatible Jul 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants