-
Notifications
You must be signed in to change notification settings - Fork 322
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
希望新增代码块复制按钮 #233
Comments
我已经实现。原理可以参考 |
这个可以有,我抽空加上。 |
辛苦. 还发现一个小问题,就是行内的代码块也出了复制按钮, 我增加了判断:
|
你好 html或者vue代码好像复制不出来 |
const closure = (item)=>{
item.children.forEach(child => {
if (child.text) {
copyed_code = copyed_code + child.text
} if (child.children) closure(child);
})
}
closure(item); |
感谢, 已修改为递归处理 |
请问一下这个判断加在哪里 |
好的 谢谢大佬 |
你可以看我文章里的内容, 判断的是父元素的class是不是带有h2w__pre. 不过你提醒了我。 这一行可能存在bug. parse/index.js里。 严格来写, 应该是要模糊匹配的。 |
大佬,我的events 事件都不生效呢,有什么需要注意的吗 |
|
希望可以新增一个代码块代码复制按钮,提升用户交互体验
The text was updated successfully, but these errors were encountered: