- Introduced a new system for defining slash commands using templates, allowing for easier command creation and management. - Added multiple slash command templates, including for functions, queries, and admonitions, with specific context handling. - Enhanced existing Lua command definitions to support new template-based commands and improved context filtering. - Updated the `template.fromPage` function to handle raw template text, enabling more flexible command definitions.
12 lines
236 B
Markdown
12 lines
236 B
Markdown
---
|
|
description: Create a Lua slash command
|
|
tags: meta/template/slash
|
|
onlyContexts:
|
|
- "FencedCode:space-lua"
|
|
---
|
|
slashcommand.define {
|
|
name = "|^|",
|
|
run = function()
|
|
editor.insertAtCursor("Hello |^| world!", false, true)
|
|
end
|
|
} |