generated from tiddly-gittly/TiddlyWiki-TS-Plugin-Template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support showing cpl.name on result
- Loading branch information
Showing
5 changed files
with
36 additions
and
32 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
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
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
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
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 |
---|---|---|
@@ -1,14 +1,16 @@ | ||
/** | ||
* @returns `title,caption` that can be use with `search:title,caption[]` operator. | ||
*/ | ||
export function getFieldsAsTitle(): string { | ||
export function getFieldsAsTitle() { | ||
const TitleAliasConfig = $tw.wiki.getTiddlerText('$:/plugins/linonetwo/autocomplete/configs/TitleAlias', 'title caption'); | ||
const fieldsAsTitle = TitleAliasConfig.split(' ').filter(Boolean).join(','); | ||
return fieldsAsTitle; | ||
const titleFields = TitleAliasConfig.split(' ').filter(Boolean); | ||
const fieldsAsTitle = titleFields.join(','); | ||
return { fieldsAsTitle, titleFields }; | ||
} | ||
|
||
export function getFieldsAsText(): string { | ||
export function getFieldsAsText() { | ||
const TextAliasConfig = $tw.wiki.getTiddlerText('$:/plugins/linonetwo/autocomplete/configs/TextAlias', 'text'); | ||
const fieldsAsText = TextAliasConfig.split(' ').filter(Boolean).join(','); | ||
return fieldsAsText; | ||
const textFields = TextAliasConfig.split(' ').filter(Boolean); | ||
const fieldsAsText = textFields.join(','); | ||
return { fieldsAsText, textFields }; | ||
} |