Giter Club home page Giter Club logo

petal's Issues

Add some `Protyle` methods to the plugin API

----问题1
背景:
想使用plugin.addCommand添加命令,按下快捷键后对光标所在块进行处理,我使用了editorCallback,想知道在其中如何获取当前光标所在块元素

--- 问题2
建议把源码里面 getEditorRange hasClosestBlock hasClosestByAttribute 等函数也开放给插件使用, 避免造轮子

列表api

我想实现把当前块作为相邻列表的子元素
如下图所示

当前:
Clip_2024-03-23_23-28-29

期望实现:
Clip_2024-03-23_23-28-43

我的想法是把当前c块转变为NodeListItem ,然后把它appendChild到相邻的NodeList里
这两个步骤我感觉用目前的插件api不好实现
能不能增加这样的api?

插件注册的快捷键被macOS组合输入干扰

插件注册了Option+*快捷键执行特定动作,但当我在文本编辑器执行快捷键时,插件定义的快捷键动作和系统定义的Option键组合输入被同时执行了,导致会在当前光标下输入特殊字符。
期望是:Siyuan会仅执行快捷键动作,拦截Option组合输入。

系统:macOS
插件SDK版本:siyuan 0.7.4
插件注册快捷键方式:

this.addCommand({
            langKey: "zh-CN",
            hotkey:"⌥X",
            customHotkey: "⌥X",
            callback: () => IRFunction("摘录")
        })

Meeting 2023.4.15

  1. 插件商店迁移到集市,文件方式还是使用目前技术的方案 siyuan-note/siyuan#8042 siyuan-note/siyuan#8043
  2. FileApi兼容性移除 #5
  3. 集市切换后,插件开发者需要支持其仓库更新到集市方案里,老的工程就归档了。需要通知社区和群 #6
  4. 内核接口增加,用于插件系统读取插件文件 siyuan-note/siyuan#8044
  5. 数据同步时插件的加载时机和同步冲突的问题
  6. API初步框架完成机制建立 #7

打开插件管理页面速度太慢

设置>集市>已下载>插件 加载太慢, 尽管我只有5个插件,但加载了4秒左右

由于这个原因,导致查看某个插件的readme时效率很低,
因此建议,在每个插件的菜单中加入新菜单项"打开插件主页", 如下图
Snipaste_环境返回_2023-11-29__10-46-15

Improve Global.Lute type

原来的标注

export interface Global {
    Lute: Lute ;
}

捕获

似乎应该更改为:

export interface Global {
    Lute: typeof Lute ;
}

捕获2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.