diff --git a/modules/quick-starts-accessing-and-executing-code-snippets.adoc b/modules/quick-starts-accessing-and-executing-code-snippets.adoc new file mode 100644 index 0000000000..a30861e974 --- /dev/null +++ b/modules/quick-starts-accessing-and-executing-code-snippets.adoc @@ -0,0 +1,34 @@ +// Module included in the following assemblies: +// +// * web_console/creating-quick-start-tutorials.adoc + +[id="quick-starts-accessing-and-executing-code-snippets_{context}"] += Code snippet markdown reference + +You can execute a CLI code snippet when it is included in a quick start from the web console. To use this feature, you must first install the Web Terminal Operator. The web terminal and code snippet actions that execute in the web terminal are not present if you do not install the Web Terminal Operator. Alternatively, you can copy a code snippet to the clipboard regardless of whether you have the Web Terminal Operator installed or not. + +[id="quick-starts-syntax-for-inline-code-snippets_{context}"] +== Syntax for inline code snippets + +---- +`code block`{{copy}} +`code block`{{execute}} +---- + +[NOTE] +==== +If the `execute` syntax is used, the *Copy to clipboard* action is present whether you have the Web Terminal Operator installed or not. +==== + +[id="quick-starts-syntax-for-multi-line-code-snippets_{context}"] +== Syntax for multi-line code snippets + +---- +``` +multi line code block +```{{copy}} + +``` +multi line code block +```{{execute}} +---- diff --git a/web_console/creating-quick-start-tutorials.adoc b/web_console/creating-quick-start-tutorials.adoc index 61f98952dd..922b3fe881 100644 --- a/web_console/creating-quick-start-tutorials.adoc +++ b/web_console/creating-quick-start-tutorials.adoc @@ -27,6 +27,8 @@ include::modules/quick-starts-supported-tags.adoc[leveloffset=+2] include::modules/quick-starts-highlighting-reference.adoc[leveloffset=+2] +include::modules/quick-starts-accessing-and-executing-code-snippets.adoc[leveloffset=+2] + include::modules/quick-start-content-guidelines.adoc[leveloffset=+1] [id="quick-start-tutorials-additional-resources"]