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

options.icon 增加判断如果没有该属性则不引入js #685

Closed
ihewro opened this issue Aug 5, 2020 · 3 comments
Closed

options.icon 增加判断如果没有该属性则不引入js #685

ihewro opened this issue Aug 5, 2020 · 3 comments
Assignees
Milestone

Comments

@ihewro
Copy link

ihewro commented Aug 5, 2020

你在什么场景下需要该功能?

因为我自己前端使用vdtior 进行解析markdown,而不需要图标和外部样式,所以希望可以不引入这个图标库,默认的是ant.js

描述可能的解决方案

addScript(`${mergedOptions.cdn}/dist/js/icons/${mergedOptions.icon}.js`, "vditorIconScript");

增加判断属性是否存在

@Vanessa219 Vanessa219 self-assigned this Aug 5, 2020
@Vanessa219 Vanessa219 added this to the 3.4 milestone Aug 5, 2020
@ihewro
Copy link
Author

ihewro commented Aug 12, 2020

3.4.5 似乎又取消掉了

@ihewro
Copy link
Author

ihewro commented Aug 12, 2020

addScript(`${mergedOptions.cdn}/dist/js/icons/${mergedOptions.icon}.js`, "vditorIconScript");

@Vanessa219
Copy link
Owner

抱歉,只在编辑器里面加了。预览的时候没有进行处理

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