Tutorials
In this section we will add two tutoriel on the page.
Usable attributes
At least one of these attributes is required
data-tuto
data-step
data-step-title
data-step-des
optionaldata-step-html
optional
Exemple
Html content
Live Editor
Result
Loading...
Run code
ExtendsHelpers is used to set how to extend.
// type of extends helpers
type ExtendsHelper = {
title?: string;
tutoName: string;
extendsTuto: string;
keywords?: string[];
};
Read more about ExtendsHelper attributes.
// define how the extending will take place.
// call the function setExtendsHelpers(extendsHelpers: ExtendsHelper[])
// this function take an array of ExtendsHelper
TutoBox.setExtendsHelpers([
{
tutoName: "back-end", // the tutorial back
extendsTuto: "main", // extends the tutorial main
},
{
tutoName: "front-end", // the tutorial front
extendsTuto: "main", // extends the tutorial main
}
])
// make sure to call setExtendsHelpers before startTuto
TutoBox.startTuto("back-end"); // to start tutorial back
TutoBox.startTuto("front-end"); // to start tutorial front
Take care
Always call setExtendsHelpers
before startTuto
. If not extending will not work as exepted.
Note
The tutorial back
and front
both will start from tutorial main
.