From 9cbfda9e4a17d6132e929462ba0a40e84691bb0e Mon Sep 17 00:00:00 2001 From: Gary McDougall Date: Sat, 10 Sep 2022 17:37:09 -0700 Subject: [PATCH] Added details for using links within markup. --- docs/input/appendix/styles.md | 7 ++++++- docs/input/markup.md | 11 ++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/docs/input/appendix/styles.md b/docs/input/appendix/styles.md index c437eb7..5e47022 100644 --- a/docs/input/appendix/styles.md +++ b/docs/input/appendix/styles.md @@ -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 strikethrough Shows text with a horizontal line through the center + + + link + Creates a clickable link within text \ No newline at end of file diff --git a/docs/input/markup.md b/docs/input/markup.md index bd1363b..6c6ee7b 100644 --- a/docs/input/markup.md +++ b/docs/input/markup.md @@ -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