Files
plainleaf/Library/Std/Slash Templates/lua-slash-command.md
T
Zef Hemel 44d8fe4467 Implement slash command templates and enhance Lua command functionality
- 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.
2025-04-06 10:08:06 +02:00

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
}