HTML
Sciter's HTML parser, in general, follows HTML5 language syntax with extras:
Syntax shortcuts
| Sciter | Regular HTML |
|---|---|
<input #id /> | <input id="id" /> |
<input .class /> | <input class="class" /> |
| `<input | text />` |
<input (name) /> | <input name="name" /> |
Multiple shortcuts can be combined together. This declaration
<button|radio(group).first>First option</button>
is an equivalent of
<button type="radio" name="group" class="first">First option</button>
NOTE In Sciter, the space after the element is optional. Regular html and Sciter html can be mixed in the same document.
Elements
Those are Sciter specific elements, most of them have a custom behavior assigned.
| Element | Description |
|---|---|
<popup> | popup element (preferred to be placed in <head>) |
<menu .context> | context-menu styled element |
<menu .popup> | context-menu styled element |
<plaintext> | Multiline text editor |
<htmlarea> | WYSIWYG/htmlarea/html editor |
<frameset> | child elements to be resizable window blocks |
<select\|tree> | Tree-list select element, one of behavior select types |
<include src="some.html"/> | Inserts HTML fragment file inplace. |
Attributes
| Attribute | Description |
|---|---|
spellcheck | true/false enable or disable spellcheck |
selectable | allow content selection (applies behavior:html-selection) |
novalue | synonym of placeholder |
Misc
danger
Attribute events (onclick..) in static HTML are not supported. (unless you implement method for it to work). But you can use them in JSX:
function func() {...}
document.body.append(<button onclick={func}>Hello</button>);
- Sciter allows the use of custom element tags, make sure to give them a default style.
- You can show popup with
Element.popup. - String
&platform-cmd-mod;is replaced withCtrl/CMD... - List of input elements