Added details for using links within markup.

This commit is contained in:
Gary McDougall 2022-09-10 17:37:09 -07:00 committed by Phil Scott
parent bb013dcc52
commit 9cbfda9e4a
2 changed files with 16 additions and 2 deletions

View File

@ -4,7 +4,8 @@ Description: "*Spectre.Console* makes it easy to write text with different style
Highlights:
- Bold, Italic, Underline, strikethrough
- Dim, Invert
- Conceal, slowblink, rapidblink
- Conceal, slowblink, rapidblink
- Links
---
Note that what styles that can be used is defined by the system or your terminal software, and may not appear as they should.
@ -45,5 +46,9 @@ Note that what styles that can be used is defined by the system or your terminal
<tr>
<td><code>strikethrough</code></td>
<td>Shows text with a horizontal line through the center</td>
</tr>
<tr>
<td><code>link</link></td>
<td>Creates a clickable link within text</td>
</tr>
</table>

View File

@ -104,7 +104,16 @@ AnsiConsole.Markup("[#ff0000]Bar[/] ");
AnsiConsole.Markup("[rgb(255,0,0)]Baz[/] ");
```
For a list of colors, see the [Colors](xref:colors) appendix section.
For a list of colors, see the [Colors](xref:colors) appendix section.
## Links
To output a clickable link, you can use the `[link]` style.
```csharp
AnsiConsole.Markup("[link]https://spectreconsole.net[/]");
AnsiConsole.Markup("[link=https://spectreconsole.net]Spectre Console Documentation[/]");
```
## Styles