-
在文档使用自定义图标,不应该使用插入文档图标的逻辑,引用时不能显示
2025-02-06 22:07块引用锚文本一直都只能显示文档标题部分,不会显示文档图标。
如果在标题手动输入 emoji ,那么这个 emoji 就属于标题文本,而不是图标。
但是你这个知乎图标旁边的彩虹又是怎么一回事?这两个图标是文档图标还是啥?
-
[js] 隐藏使用嵌入块时引用的标题
2025-02-06 21:14试试这个 JS 片段:
// 嵌入标题块时保留内容隐藏标题 JS片段 (function() { (async () => { const observer = new MutationObserver((mutationsList) => { for (const mutation of mutationsList) { if (mutation.type !== 'childList') return; // 遍历新增的节点 for (const node of mutation.addedNodes) { // 检查是否是 .protyle-wysiwyg__embed 元素 if (!node.classList || !node.classList.contains('protyle-wysiwyg__embed')) return; // 获取 .protyle-wysiwyg__embed 元素的 data-id 属性 const embedId = node.getAttribute('data-id'); if (!embedId) return; // 在新增的 .protyle-wysiwyg__embed 元素中查找首个符合条件的 [data-type="NodeHeading"] 元素 const heading = node.querySelector(`[data-type="NodeHeading"][data-node-id="${embedId}"]`); if (!heading) return; // 隐藏找到的 [data-type="NodeHeading"] 元素 heading.style.display = 'none'; } } }); observer.observe(document.body, { childList: true, subtree: true }); })(); })(); -
文档有 700 多个子文档,打开文档树卡到爆,有办法优化吗?
2025-02-06 19:20下个版本 v3.1.21 会优化一点 Issue #13844 · siyuan-note/siyuan
-
[js] 隐藏使用嵌入块时引用的标题
2025-02-06 15:27如果嵌入块内的第一个块是标题块,就隐藏这个标题块:
.protyle-wysiwyg__embed > [data-type="NodeHeading"]:nth-child(1), .protyle-wysiwyg__embed > [data-type="NodeHeading"]:nth-child(2) { display: none; }




