-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
16 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
created: 20250106041604700 | ||
creator: 星蓝 | ||
modified: 20250106041842392 | ||
modifier: 星蓝 | ||
tags: 插件开发 | ||
title: JS调用wikitext功能 | ||
|
||
可以用js的api调用筛选器、微件、宏、角括号等可以调用的wiki功能,它们将渲染后返回html文本结果。 | ||
|
||
```js | ||
$tw.wiki.renderText("text/html", "text/vnd.tiddlywiki", "{{{ [tag[HelloThere]count[]] }}}") | ||
|
||
$tw.wiki.renderText("text/html", "text/vnd.tiddlywiki", "<$text text='string'/>") | ||
|
||
$tw.wiki.renderText("text/html", "text/vnd.tiddlywiki", "<<now>>") | ||
``` |