ferenk863 downloadsInsert any type of short codes into your document. You can add smileys (:), ;), ...) or emojis (:smile:, :wink:, ...). More code maps will be added later. Even you, as a user can create your own.
Use your favourite icons, special characters and frequently used snippets with ease!
You can insert them to your document using short code mappings:
:smile: 🙂 or :wink: 😉 (1800+ installed by default),:-) 🙂, 8-D 😎 (installed by default)/prog-50 ▋, .success 🏆, !movie 🎥
For further explanation and a short configuration guide see 2. User defined code maps .Demo video showing the features:
Suggested method, the easiest way to install:
:)It's also possible to install it manually:
git clone https://github.com/ferenk/obsidian-tokenz cd obsidian-tokenz; npm install npm run build mkdir <your wallet's path>/.obsidian/plugins/tokenz :)It's easy to define your own code maps. You can choose any format for your short codes (tokens). But you can also mix different formats (see 4.).
my_code_map.json
{
"/prog-20": "▎",
"/prog-50": "▋",
"/prog-80": "▉",
".success": "🏆",
".idea": "💡",
"|tv_episode|": "📺",
"!movie": "🎥"
}
And now you can insert these symbols to your document this way:
| Format | Short code example | Result |
|---|---|---|
| IRC style | /prog-20 20%, /prog-50 /prog-90 90% |
=> ▎ 20%, ▋ 50%, █ 90% |
| CSS class | .idea, .success |
=> 💡, 🏆 |
| Any "crazy" style | |
tv_episode |
Token text highlighting is enabled for all kind of code blocks by default, but you can enable/disable any sets of block names with rulesets.
The format of these rulesets is:
{+|-}<block name pattern>, ...
The rules are separated by commas and the rules are applied in the order of appearance.
You can use the wildcard character * to match any character sequence (even "") and the ? character to match any single character.
Some examples:
+*: Enable highlighting for all block names-?*: Disable highlighting for named blocks but still enable it for unnamed blocks (?* ensures that the length of the name is at least 1)-*, +html: Enable html block highlighting, all others are disabled-*, +*js*: Enable highlighting for all block names containing "js" (e.g 'dataviewjs' blocks), all others are disabledAnd a final example with an explanation of how it is applied:
-*, +*js*, +javascript, -*json*
-?* to keep them enabled).So as the result of this ruleset, the empty block name will be disabled, "js" and "dataviewjs" (for example) will be enabled, "javascript" will be enabled, too. But "json" will be disabled.
Note that the order of the rules matter. Rule 4 has to appear later than rule 2, because *json* is more specific than *js*. So the rule containing "js" would erase the effect of a previously applied rule containing "json".