Introduction - Templater 分清核心插件Templates和本插件的插入功能
技巧
外部脚本引用tp对象
const tp = app.plugins.plugins["templater-obsidian"]?.templater?.current_functions_object;注意:需要在setting中设置一个启动模板(trigger templater when a new file created和startup template),用于初始化(在Obsidian启动时触发),否则外部脚本无法找到tp对象。
常见问题
Q: property中的{{}}数据无法正常渲染 A: 需要在源码模式下输入,否则无法正常渲染。在view模式下会尝试转换字符串到指定格式,导致代码变化