mirror of
https://github.com/purocean/yn.git
synced 2026-09-24 15:46:02 +08:00
docs: update api doc link
This commit is contained in:
+1
-1
@@ -536,7 +536,7 @@ Macro code can use variables defined in Front Matter, or use the following built
|
||||
|
||||
variable name | type | description
|
||||
---- | ----- | ---
|
||||
`$ctx` | `object` | Editor `ctx`,refer to [Plug-In Development GUide](PLUGIN.md) and [Api Document](https://yn-api-doc.vercel.app/modules/context.html)
|
||||
`$ctx` | `object` | Editor `ctx`,refer to [Plug-In Development GUide](PLUGIN.md) and [Api Document](https://yn-api-doc.vercel.app/modules/renderer_context.html)
|
||||
`$include` | `(path: string, trim = false) => Result` | Introduce other document fragment methods
|
||||
`$export` | `(key: string, val: any) => Result` | Define a variable that can be used in this document
|
||||
`$noop` | `() => Result` | no operation, Used for holding text space
|
||||
|
||||
@@ -537,7 +537,7 @@ Yank Note 允许你在页面中嵌入宏,用以动态的替换文档。
|
||||
|
||||
变量名 | 类型 | 描述
|
||||
---- | ----- | ---
|
||||
`$ctx` | `object` | 编辑器 `ctx`,可参考[插件开发指南](PLUGIN.md) 和[Api 文档](https://yn-api-doc.vercel.app/modules/context.html)
|
||||
`$ctx` | `object` | 编辑器 `ctx`,可参考[插件开发指南](PLUGIN.md) 和[Api 文档](https://yn-api-doc.vercel.app/modules/renderer_context.html)
|
||||
`$include` | `(path: string, trim = false) => Result` | 引入其他文档片段方法
|
||||
`$export` | `(key: string, val: any) => Result` | 定义一个本文档可以使用的变量
|
||||
`$noop` | `() => Result` | 无操作函数,可用于文本占位使用
|
||||
|
||||
+7
-7
@@ -56,9 +56,9 @@ Yank Note has some concepts that are the basis for supporting the entire plug-in
|
||||
|
||||
When Yank Note performs some operations, it will trigger some hook calls.
|
||||
|
||||
Use [`ctx.registerHook`](https://yn-api-doc.vercel.app/modules/core_plugin.html#registerHook) to register a hook processing method.
|
||||
Use [`ctx.registerHook`](https://yn-api-doc.vercel.app/modules/renderer_core_hook.html#registerHook) to register a hook processing method.
|
||||
|
||||
Use [`ctx.triggerHook`](https://yn-api-doc.vercel.app/modules/core_plugin.html#triggerHook) to trigger a hook.
|
||||
Use [`ctx.triggerHook`](https://yn-api-doc.vercel.app/modules/renderer_core_hook.html#triggerHook) to trigger a hook.
|
||||
|
||||
The option `{ breakable: true }` is appended when calling `triggerHook`, indicating that the hook call is breakable.
|
||||
|
||||
@@ -74,16 +74,16 @@ The following internal hook call is breakable:
|
||||
|
||||
Breakable hook processing methods need to have a return value `Promise<boolean> | boolean`. When the hook processing method returns `true`, the subsequent hooks will no longer run。
|
||||
|
||||
For internal hook types, please refer to [Api Document](https://yn-api-doc.vercel.app/modules/types.html#BuildInHookTypes)
|
||||
For internal hook types, please refer to [Api Document](https://yn-api-doc.vercel.app/modules/renderer_types.html#BuildInHookTypes)
|
||||
|
||||
### Action
|
||||
|
||||
Yank Note has an Action Center [`ctx.action`](https://yn-api-doc.vercel.app/modules/core_action.html), which provides action management and operation。
|
||||
Yank Note has an Action Center [`ctx.action`](https://yn-api-doc.vercel.app/modules/renderer_core_action.html), which provides action management and operation。
|
||||
|
||||
For internal action, please refer to [Api Document](https://yn-api-doc.vercel.app/modules/types.html#BuildInActions)
|
||||
For internal action, please refer to [Api Document](https://yn-api-doc.vercel.app/modules/renderer_types.html#BuildInActions)
|
||||
|
||||
### Command
|
||||
Yank Note has a Command Center [`ctx.command`](https://yn-api-doc.vercel.app/modules/core_command.html), which is mainly responsible for the management and operation of shortcut keys.
|
||||
Yank Note has a Command Center [`ctx.command`](https://yn-api-doc.vercel.app/modules/renderer_core_command.html), which is mainly responsible for the management and operation of shortcut keys.
|
||||
|
||||
## Plug-In Capabilities
|
||||
|
||||
@@ -98,7 +98,7 @@ Run the following code, you can see which modules are available of `ctx`.
|
||||
console.log(Object.keys(ctx).join('\n'))
|
||||
```
|
||||
|
||||
Refer to [Api Document](https://yn-api-doc.vercel.app/modules/context.html) to get more instructions.
|
||||
Refer to [Api Document](https://yn-api-doc.vercel.app/modules/renderer_context.html) to get more instructions.
|
||||
|
||||
## More
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ Yank Note 有一些概念,是支撑整个插件体系的基础:
|
||||
|
||||
Yank Note 在执行一些操作的时候,会触发一些钩子调用。
|
||||
|
||||
使用 [`ctx.registerHook`](https://yn-api-doc.vercel.app/modules/core_plugin.html#registerHook) 可以注册一个钩子处理方法。使用 [`ctx.triggerHook`](https://yn-api-doc.vercel.app/modules/core_plugin.html#triggerHook) 则可以触发一个钩子。
|
||||
使用 [`ctx.registerHook`](https://yn-api-doc.vercel.app/modules/renderer_core_hook.html#registerHook) 可以注册一个钩子处理方法。使用 [`ctx.triggerHook`](https://yn-api-doc.vercel.app/modules/renderer_core_hook.html#triggerHook) 则可以触发一个钩子。
|
||||
|
||||
调用 `triggerHook` 时候附加选项 `{ breakable: true }`,表明这个钩子调用是可中断的。
|
||||
|
||||
@@ -72,17 +72,17 @@ Yank Note 在执行一些操作的时候,会触发一些钩子调用。
|
||||
|
||||
可中断的钩子处理方法需要有返回值 `Promise<boolean> | boolean`。当钩子处理方法返回 `true`,则后续的钩子不再运行。
|
||||
|
||||
内部的钩子类型可以参考 [Api 文档](https://yn-api-doc.vercel.app/modules/types.html#BuildInHookTypes)
|
||||
内部的钩子类型可以参考 [Api 文档](https://yn-api-doc.vercel.app/modules/renderer_types.html#BuildInHookTypes)
|
||||
|
||||
### Action 动作
|
||||
|
||||
Yank Note 有一个 Action 中心 [`ctx.action`](https://yn-api-doc.vercel.app/modules/core_action.html),提供动作的管理和运行。
|
||||
Yank Note 有一个 Action 中心 [`ctx.action`](https://yn-api-doc.vercel.app/modules/renderer_core_action.html),提供动作的管理和运行。
|
||||
|
||||
内部 Action 可以参考 [Api 文档](https://yn-api-doc.vercel.app/modules/types.html#BuildInActions)
|
||||
内部 Action 可以参考 [Api 文档](https://yn-api-doc.vercel.app/modules/renderer_types.html#BuildInActions)
|
||||
|
||||
### Command 命令
|
||||
|
||||
Yank Note 有一个 Command 中心 [`ctx.command`](https://yn-api-doc.vercel.app/modules/core_command.html),主要负责快捷键相关的管理和运行。
|
||||
Yank Note 有一个 Command 中心 [`ctx.command`](https://yn-api-doc.vercel.app/modules/renderer_core_command.html),主要负责快捷键相关的管理和运行。
|
||||
|
||||
## 插件能力
|
||||
|
||||
@@ -97,7 +97,7 @@ Yank Note 有一个 Command 中心 [`ctx.command`](https://yn-api-doc.vercel.app
|
||||
console.log(Object.keys(ctx).join('\n'))
|
||||
```
|
||||
|
||||
参考 [Api 文档](https://yn-api-doc.vercel.app/modules/context.html) 获得更多使用说明。
|
||||
参考 [Api 文档](https://yn-api-doc.vercel.app/modules/renderer_context.html) 获得更多使用说明。
|
||||
|
||||
## 更多
|
||||
|
||||
|
||||
Reference in New Issue
Block a user