Difference between revisions of "Widget: Katacoda"
From Genesys Documentation
(2 intermediate revisions by one other user not shown) | |||
Line 18: | Line 18: | ||
Available Parameters: | Available Parameters: | ||
* scenario (mandatory): Katacoda scenario ID (including username and scenario name) | * scenario (mandatory): Katacoda scenario ID (including username and scenario name) | ||
− | * divid (optional): Unique ID of div containing your Katacoda scenario; defaults to value of the scenario parameter | + | * divid (optional): Unique ID of div containing your Katacoda scenario; defaults to the value of the scenario parameter |
* height (optional): Height of div containing your Katacoda scenario; defaults to 600px | * height (optional): Height of div containing your Katacoda scenario; defaults to 600px | ||
<!-- | <!-- | ||
Line 26: | Line 26: | ||
--> | --> | ||
− | <B>Note:</B> To use this widget on your site, install [https://www.mediawiki.org/wiki/Extension:Widgets MediaWiki Widgets extension] and the | + | <B>Note:</B> To use this widget on your site, install [https://www.mediawiki.org/wiki/Extension:Widgets MediaWiki Widgets extension] and copy the [{{fullurl:{{FULLPAGENAME}}|action=edit}} full source code] of this page to your wiki, as an article called '''{{FULLPAGENAME}}'''. |
</noinclude> | </noinclude> | ||
− | <includeonly><p class="katacoda-caption" | + | <includeonly><p class="katacoda-caption"><script src="//katacoda.com/embed.js"></script></p><div id="<!--{$divid|escape:'html'|default:$scenario}-->" data-katacoda-id="<!--{$scenario|escape:'html'}-->" data-katacoda-color="<!--{$color|escape:'html'|default:'004d7f'}-->" style="height: <!--{$height|escape:'html'|default:'600px'}-->; padding-top: <!--{$padding|escape:'html'|default:'0px'}-->;"></div></includeonly> |
Latest revision as of 17:25, June 18, 2021
This widget allows you to add an embedded Katacoda course into your Wiki page. Katacoda is an opensource learning platform, which provides scripts to embed the terminal in our own pages.
Using this widget[edit source]
To use this widget, include the course name into the #widget parser syntax as the data-katacoda-id parameter.
Here is a sample #widget syntax:
{{#widget:Katacoda|divid=myScenario|scenario=docker/deploying-first-container}}
Result:
<p class="katacoda-caption><script src="//katacoda.com/embed.js"></script></p> <div id="myScenario" data-katacoda-id="docker/deploying-first-container" data-katacoda-color="004d7f" style="height: 600px; padding-top: 0px;"></div>
Available Parameters:
- scenario (mandatory): Katacoda scenario ID (including username and scenario name)
- divid (optional): Unique ID of div containing your Katacoda scenario; defaults to the value of the scenario parameter
- height (optional): Height of div containing your Katacoda scenario; defaults to 600px
Note: To use this widget on your site, install MediaWiki Widgets extension and copy the full source code of this page to your wiki, as an article called Widget:Katacoda.