File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,10 +11,13 @@ A front-end code playground tool right in your browser. It's intended for use wh
1111
1212## Features
1313
14- - Easy to use
1514- Minimal and fast
1615- Live updates and preview
17- - Builtin IDE with syntax highlighting, suggestions, and more
16+ - Fullscreen mode
17+ - Theme: Light/Dark/System
18+ - Export as single HTML page or ZIP file
19+ - Multiple Layouts - editor only, preview only or split (vertical/horizontal)
20+ - Builtin IDE with syntax highlighting, suggestions/autocomplete, and more
1821- Local storage for backup (CTRL + S to save and automatic restore)
1922
2023## Demo
Original file line number Diff line number Diff line change @@ -32,7 +32,8 @@ const store = useAppStore();
3232
3333const switchTheme = (v ) => (store .theme = v);
3434const switchView = (v ) => (store .layout = v);
35- const newTab = () => window .open (window .location .href );
35+ const newTab = () =>
36+ window .open (window .location .href + ` ?session=${ Date .now ().toString (32 )} ` );
3637const closeTab = () => window .close ();
3738const reloadTab = () => window .location .reload ();
3839const downloadAsPage = () => exportAsPage (store .code );
Original file line number Diff line number Diff line change @@ -25,7 +25,12 @@ export const template = {
2525 'let count = 0;\n\nconst btn = document.querySelector("button");\n\nbtn.onclick = () => {\n btn.textContent = `Count: ${++count}`;\n};\n\nbtn.click();\n'
2626} ;
2727
28- const STORAGE_KEY = "livecode-backup" ;
28+ // storage key for a new session in a different window or tab
29+ const sessionKey = new URLSearchParams ( window . location . search ) . get ( "session" ) ;
30+
31+ const STORAGE_KEY = sessionKey
32+ ? `livecode-window-${ sessionKey } `
33+ : "livecode-backup" ;
2934
3035export function restore ( ) {
3136 const data = getData ( STORAGE_KEY ) ;
You can’t perform that action at this time.
0 commit comments