思源笔记
0 篇文章
seehttps://github.com/siyuan-note/siyuan/issues/12684seehttps://github.com/88250/lute/issues/206seehttps://github.com/88250/lute/blob/3fb25e60dad57f08b1637539a0fcdf03c366abdb/protyle.go#L693 关联:行内自定义元素和
seehttps://github.com/siyuan-note/siyuan/issues/5719 这个接口暂时不加入 API 文档中;使用方式如下:POSThttp://127.0.0.1:6806/api/filetree/reindexTree{"path":"/data/20210808180117-czj9bvb/20200812220555-lj3enxa.sy"}
seehttps://ld246.com/article/1741359650489pc 端//第一步调用 listDocsByPath 获取文档树文档信息//fetchSyncPost('/api/filetree/listDocsByPath',{notebook:'20240723175050-336994k',path:'/20240728220858-adaleye'})//第二步调用 genFi
行内自定义元素和属性
seehttps://github.com/siyuan-note/siyuan/issues/13325 关联:块自定义元素和属性只能用 span,且不能嵌套,只能叠加自定义属性 custom-xxx 和 data-type 值修改或生成后,需要调用 input 事件触发比如:letmemoELement=document.querySelector(`span[data-id="${newBlockId}"]`
(async()=>{observeEditorLoaded((editor)=>{console.log(editor,'editorloaded');});//监听编辑器被添加 letloading=false;functionobserveEditorLoaded(callback){//创建一个观察者实例并传入回调函数 constobserver=newMutationObserver((mut
seehttps://github.com/siyuan-note/siyuan/issues/14276
seehttps://ld246.com/article/1743562949886 设置-编辑器-只读模式这个是打开全局只读模式的,所有文档变为只读。需要单独编辑某文档,只需要点击它右上的小锁图标,就能解锁编辑。快捷键 shift+cmd/ctrl+g
sql 通过 parent_id 递归获取祖先元素
seehttps://ld246.com/article/1743473205973 需求:比如如下数据库中,主键 id 是事件列,比如图中的任务项“工时登记”;然后项目列是模板列,在这个模板中获取“工作备忘”这个文档的文档标题和 h2 标题(通过文档中的任务项“工时登记”的块 id 获取,这个 id 也同时是数据库中的主键 id);即通过任务块的 id 获取该文档的标题和任务块的上级 h2 标题,然后实现方式是用数据库的模板
letclicking=false;ul.addEventListener('click',async(event)=>{constli=event.target.closest('li[data-node-id]');if(li.querySelector('.b3-list-item__toggle.fn__hidden'))return;if(clicking)return;clicking=
seehttps://ld246.com/article/1743579723972 原理:动态改变[data-type="search-new"]的值,让回车失效,点击时恢复。//搜索不到时回车不新建文档(鼠标点击可新建)//seehttps://ld246.com/article/1743579723972//seehttps://github.com/siyuan-note/siyuan/blo
记录精彩的程序人生
开始使用
分类
标签