Difference between revisions of "Inline Expressions"
Line 25: | Line 25: | ||
|- | |- | ||
| <code>{chr:{CHARACTER}}</code> || <code>{chr:copy}</code> || data-sort-value='''145'''|'''0.1.145''' || | | <code>{chr:{CHARACTER}}</code> || <code>{chr:copy}</code> || data-sort-value='''145'''|'''0.1.145''' || | ||
− | Character entity. The <code>{CHARACTER}</code> part must be replaced with an HTML character entity without an ampersand (<code>&</code>) at the beginning and a semicolon (<code>;</code>) at the end (e.g.<code>"{chr:copy}"</code> → <code>"&copy;"</code> → "©"). | + | Character entity. The <code>{CHARACTER}</code> part must be replaced with an HTML character entity name or number without an ampersand (<code>&</code>) at the beginning and a semicolon (<code>;</code>) at the end (e.g.<code>"{chr:copy}"</code> → <code>"&copy;"</code> → "©" or <code>"{chr:#169}"</code> → <code>"&#169;"</code> → "©"). |
|- | |- | ||
| <code>{chr:{COLOR}:{CHARACTER}}</code> || <code>{chr:msx-red:copy}</code> || data-sort-value='''145'''|'''0.1.145''' || | | <code>{chr:{COLOR}:{CHARACTER}}</code> || <code>{chr:msx-red:copy}</code> || data-sort-value='''145'''|'''0.1.145''' || | ||
− | Colored character entity. The <code>{COLOR}</code> part must be replaced with the color value and the <code>{CHARACTER}</code> part must be replaced with an HTML character entity without an ampersand (<code>&</code>) at the beginning and a semicolon (<code>;</code>) at the end (e.g.<code>"{chr:msx-red:copy}"</code> → <code>"<span style="color:#c9302c">&copy;</span>"</code> → "<span style="color:#c9302c">©</span>"). Please see [[Colors]] for possible color values. | + | Colored character entity. The <code>{COLOR}</code> part must be replaced with the color value and the <code>{CHARACTER}</code> part must be replaced with an HTML character entity name or number without an ampersand (<code>&</code>) at the beginning and a semicolon (<code>;</code>) at the end (e.g. <code>"{chr:msx-red:copy}"</code> → <code>"<span style="color:#c9302c">&copy;</span>"</code> → "<span style="color:#c9302c">©</span>" or <code>"{chr:msx-red:#169}"</code> → <code>"<span style="color:#c9302c">&#169;</span>"</code> → "<span style="color:#c9302c">©</span>"). Please see [[Colors]] for possible color values. |
|- | |- | ||
| <code>{context:{PROPERTY}}</code> || <code>{context:label}</code> || data-sort-value=0|0.1.0 || | | <code>{context:{PROPERTY}}</code> || <code>{context:label}</code> || data-sort-value=0|0.1.0 || |
Revision as of 09:50, 28 March 2022
Most of the text properties support inline expressions for adding icons or coloring text parts. Each expression starts with character {
and ends with character }
. Nested expressions are not supported.
Expression | Example | Since Version | Description |
---|---|---|---|
{sp} |
{sp} |
0.1.0 |
Non-breakable space. |
{tb} |
{tb} |
0.1.0 |
Non-breakable tab. |
{br} |
{br} |
0.1.0 |
Line break. |
{ico:{ICON}} |
{ico:home} |
0.1.0 |
Icon. The |
{ico:{COLOR}:{ICON}} |
{ico:msx-red:home} |
0.1.0 |
Colored icon. The |
{txt:{COLOR}:{TEXT}} |
{txt:msx-red:Hello there!} |
0.1.0 |
Colored text. The |
{chr:{CHARACTER}} |
{chr:copy} |
0.1.145 |
Character entity. The |
{chr:{COLOR}:{CHARACTER}} |
{chr:msx-red:copy} |
0.1.145 |
Colored character entity. The |
{context:{PROPERTY}} |
{context:label} |
0.1.0 |
This is a very special inline expression and can only be used inside the Note: Since version 0.1.110, also the |
{unknown} |
{unknown} |
0.1.0 |
Any unknown expression is returned as it is without the braces (e.g. |