Update index.ts (#15138)

This commit is contained in:
Tron 2025-07-01 21:36:35 +08:00 committed by GitHub
parent b9fa81eed8
commit 8b1a2d49d7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -234,6 +234,22 @@ export class Preview {
}
});
});
// 处理任务列表微信公众号不能显示input[type="checkbox"]
copyElement.querySelectorAll('li.protyle-task').forEach(taskItem => {
// Set checkbox input opacity to 0
const checkbox = taskItem.querySelector('input[type="checkbox"]');
if (checkbox) {
checkbox.style.opacity = '0';
}
const isDone = taskItem.classList.contains('protyle-task--done');
if (isDone) {
taskItem.style.setProperty('list-style-type', "'✅'", 'important');
}
else {
taskItem.style.setProperty('list-style-type', "'▢'", 'important');
}
});
if(typeof window.MathJax === "undefined") {
window.MathJax = {
svg: {