Skip to content

Commit fe905f7

Browse files
shakaoganicke
andauthored
Document lockedEditor=1 flag for tutorials (microsoft#7439)
* Document lockedEditor=1 flag for tutorials * Use Arcade example, add note about rollout * a few marks Co-authored-by: Galen Nickel <v-gani@microsoft.com>
1 parent 8118626 commit fe905f7

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

docs/writing-docs/tutorials.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,14 @@ basic.showString("Hello!")
388388

389389
Users will have the option of clicking the Python icon to see the snippet in Python just like they can with Blocks and Javascript/Typescript.
390390

391+
## Editor flags
392+
393+
There are some flags you can add to the URL of your tutorial to change the layout of the page. These are not yet enabled for every editor, so make sure you check that the feature is available in your target.
394+
395+
* **lockedEditor=1** - If you load the page directly into a tutorial, adding the `lockedEditor` flag will "lock" users into the tutorial. This hides the "Exit Tutorial", "Home", and "Finish" buttons, as well as disabling the right-click menu outside of the Blocks workspace to prevent users from entering the home screen or sandbox mode. For example:
396+
397+
https://arcade.makecode.com?lockedEditor=1#tutorial:/tutorials/happy-flower
398+
391399
## Adding tutorials to the home screen
392400

393401
To have a tutorial appear on the home screen, you will need to create or use an existing gallery and add a tutorial entry to it. See the
@@ -453,4 +461,4 @@ Tutorials are translated via [Crowdin](/translate) like any other documentation
453461

454462
## Dependencies
455463

456-
If your tutorial requires the use of an extension, you can add them using the [package macro](https://makecode.com/writing-docs/macros#dependencies).
464+
If your tutorial requires the use of an extension, you can add them using the [package macro](https://makecode.com/writing-docs/macros#dependencies).

0 commit comments

Comments
 (0)