思源笔记
0 篇文章
//democonsole.log(siyuan);console.log(plugin);console.log(client);console.log(thisBlock);asyncfunctionmain(){constresponse=awaitclient.pushMsg({msg:"Thisisanotificationmessage",timeout:7000,});console.
seehttps://github.com/siyuan-note/siyuan/issues/10243protyle.reloadthis.protyleSlash=[{filter:["insertemoji\u{1F60A}","\u63D2\u5165\u8868\u60C5\u{1F60A}","crbqwx"],html:`<divclass="b3-list-item__first"
(siyuan?.mobile?.docks?.file||siyuan?.mobile?.files||siyuan.layout.leftDock.data.file).selectItem(notebookId,path)比如(siyuan?.mobile?.docks?.file||siyuan?.mobile?.files||siyuan.layout.leftDock.data.file
seehttps://ld246.com/article/1743689632996//alt+d 导出 markdown 文档(docId 为空导出当前文档)//seehttps://ld246.com/article/1743689632996{//导出文档的 id(docId 为空导出当前文档)constdocId='';//alt+d 事件 document.addEventListener('keydow
实现 obsidian 插件的大纲层级固定展开到多少层
大纲自定义插件发布 https://github.com/zxkmm/siyuan_outline_modification关联:https://ld246.com/article/1743735225396https://ld246.com/article/1743760987308
//根据 paths 展开文件夹 functionexpandFolderByPaths(paths,box){//遍历 paths 并展开对应的文件夹 paths.forEach(asyncpath=>{//将路径按/分割,获取每个层级的 node-idconstparts=path.split('/');constfolderIds=parts.slice(1,-1);//最后一个是文件,不需要展开//逐层查
seehttps://ld246.com/article/1744171314503 数据库功能简介数据库功能有什么使用场景吗?任务管理数据库模版分享思源笔记数据库使用新思路:谈自上而下管理与自下而上积累基于思源笔记的数据库使用分享(附模板)突然发现数据库可以完全替代 Todo!太棒了!将反向链接和数据库结合的尝试大家平时是如何使用数据库的?数据库使用新方法-任务时间追踪
seehttps://ld246.com/article/1744145263614 获取文档 kramdown 全文 awaitfetchSyncPost('/api/block/getBlockKramdown',{id:'文档 id'})更新文档全文(有{:id=""}在 id 不会变)awaitfetchSyncPost('/api/block/updateBlock',{"dataType":"mark
githubhttps://github.com/siyuan-note/siyuan/releases 链滴 https://ld246.com/member/siyuan/articles
seehttps://ld246.com/article/1736616348929 思源笔记默认的块操作 api 不支持撤回,需要额外使用 Transaction 来实现撤回操作只更新一个块 updateTransactionawaitupdateBlock('dom',updatedDom,blockId);protyle.getInstance().updateTransaction(blockId,u
带块 id 的剪切
seehttps://ld246.com/article/1744246860602 功能说明块右键菜单增加剪切块操作,剪切时不会丢掉块的 id(自带剪切会丢掉块 id)。本质还是移动操作,只不过比自带移动操作方便,支持具体移动到哪个位置(自带移动只能指定移动到哪个文档)。支持手机版不会出现重复 ID 使用说明注意:只能在块菜单中操作(你的右键可能不是块菜单)缺点:不支持撤销(官方移动也不支持撤销)代码 htt
asyncfunctiongetFile(path){returnfetch("/api/file/getFile",{method:"POST",headers:{"Content-Type":"application/json",},body:JSON.stringify({path,}),}).then((response)=>{if(response.ok){//返回 Blob 对象而不是文本 r
记录精彩的程序人生
开始使用
分类
标签