slint/tools/online_editor
Simon Hausmann ace4f92aad online editor: fix hello world re-appearing unexpectedly
After checking if the instance field is null, we await the promise that
would guarantee DOM attachment.  While we await, the browser processes
other microtasks, and we might end up in render() again. This time the
instance field is also null, but the ensure_attached_to_dom promise is
already resolved, so we would create the first slint component and the
associated window. Later we would return from the first await. At this
point the instance field is already set, so we should re-use the
existing window, but since we're not checking anymore, we'll go ahead
and create a second window on the same canvas element.

Fixes #1926
2022-11-29 17:18:16 +01:00
..
cypress chore: Configure prettier and reformat the online_editor 2022-11-03 10:51:07 +01:00
src online editor: fix hello world re-appearing unexpectedly 2022-11-29 17:18:16 +01:00
static Redo online_editor (#1593) 2022-09-07 17:08:55 +02:00
styles chore: Configure prettier and reformat the online_editor 2022-11-03 10:51:07 +01:00
.eslintrc.yml chore: Configure prettier and reformat the online_editor 2022-11-03 10:51:07 +01:00
.gitignore Ignore the generated pkg/ directory 2020-10-12 11:26:15 +02:00
cypress.config.ts chore: Configure prettier and reformat the online_editor 2022-11-03 10:51:07 +01:00
index.html chore: Configure prettier and reformat the online_editor 2022-11-03 10:51:07 +01:00
package.json Bump version number to 0.3.3 2022-11-28 13:11:11 +00:00
preview.html chore: Configure prettier and reformat the online_editor 2022-11-03 10:51:07 +01:00
README.md chore: Configure prettier and reformat the online_editor 2022-11-03 10:51:07 +01:00
tsconfig.default.json chore: Configure prettier and reformat the online_editor 2022-11-03 10:51:07 +01:00
tsconfig.json chore: Configure prettier and reformat the online_editor 2022-11-03 10:51:07 +01:00
vite.config.js chore: Configure prettier and reformat the online_editor 2022-11-03 10:51:07 +01:00

Slint Online Editor

This directory contains the frontend code for the online code editor which is hosted in https://slint-ui.com/editor (last stable) and https://slint-ui.com/snapshots/master/editor (nightly)

To try it out locally type this in this directory:

npm install
npm start

Documentation

The index.html page contains a code editor and every key press reload the preview. The preview.html page contains only the preview and the code must be given via query parameter.