mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-27 03:48:48 +01:00
Update index.ts (#15138)
This commit is contained in:
parent
b9fa81eed8
commit
8b1a2d49d7
1 changed files with 16 additions and 0 deletions
|
|
@ -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: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue