Here is the API declaration of SiYuan Plugin System, usages please refer to SiYuan plugin sample.
siyuan-note / petal Goto Github PK
View Code? Open in Web Editor NEWSiYuan Plugin API
SiYuan Plugin API
Here is the API declaration of SiYuan Plugin System, usages please refer to SiYuan plugin sample.
目前protyleSlash获取的protyle内有IProtyle实例,但是d.ts未添加,导致ts检查报错。
----问题1
背景:
想使用plugin.addCommand添加命令,按下快捷键后对光标所在块进行处理,我使用了editorCallback,想知道在其中如何获取当前光标所在块元素
--- 问题2
建议把源码里面 getEditorRange hasClosestBlock hasClosestByAttribute 等函数也开放给插件使用, 避免造轮子
fetch('https://gitee.com/zuoez02/siyuan-plugin-system/raw/main/main.js', { cache: 'no-cache' })
插件注册了Option+*
快捷键执行特定动作,但当我在文本编辑器执行快捷键时,插件定义的快捷键动作和系统定义的Option键组合输入被同时执行了,导致会在当前光标下输入特殊字符。
期望是:Siyuan会仅执行快捷键动作,拦截Option组合输入。
系统:macOS
插件SDK版本:siyuan 0.7.4
插件注册快捷键方式:
this.addCommand({
langKey: "zh-CN",
hotkey:"⌥X",
customHotkey: "⌥X",
callback: () => IRFunction("摘录")
})
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.