HTML code
Your own HTML with scripts and styles inside the element: a calculator, a service widget, custom layout. The element sits in a screen area next to other elements. If your code should take the whole screen, choose the "HTML code" screen type.


Settings
- "Code" — HTML up to 100,000 characters. Scripts and styles go inside the code. A new element has a sample in the code: the heading "Hello!" and a line of text.
- "Height" — "Fit content": adjusts to the code, including when the code changes its content by itself. "Fixed" — from 40 to 2000 pixels; whatever does not fit scrolls inside the element.
- "Exits" — up to 20. An exit has a "Key" (Latin letters, digits,
_and-) and a "Name on the scheme". The code calls an exit by its key:app.event('next'). - "Variables the code may write" — up to 50 names. The server will not accept others.
Under the settings is the "Available to the code" reference.
How the code works
The code runs in an isolated frame: the session, the app's data and the rest of the screen are not available to it. The frame takes the text colour from the app's theme. In the screen editor, the frame shows the result and restarts after the code is edited; on the scheme, a placeholder is shown instead of the code.
What can be called from the code — app.event, app.variables.set, the localStorage storage, app.openLink — and how to insert a variable right into the code is described on the Code in the app page.
Exits
Each exit from "Exits" is a screen exit with the name you set (without a name — with the key). Together with the transition, the code can write allowed variables: app.event('use', {bonusUsed: '350'}).