feat: improve playground UX and fix undo/redo across lessons
- Add dice SVG icon for random template button - Reset button now restores last loaded template in playground - Clear editor history when switching lessons (prevents cross-lesson undo) - Add playground link to goodbye lesson - Center icon buttons with flexbox 🤖 Generated with [Claude Code](https://claude.com/claude-code)
This commit is contained in:
@@ -183,7 +183,7 @@ export class CodeEditor {
|
||||
}
|
||||
|
||||
/**
|
||||
* Set editor value
|
||||
* Set editor value (preserves history)
|
||||
*/
|
||||
setValue(value) {
|
||||
if (!this.view) return;
|
||||
@@ -197,6 +197,13 @@ export class CodeEditor {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Set editor value and clear history (for lesson switching)
|
||||
*/
|
||||
setValueAndClearHistory(value) {
|
||||
this.init(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set editor mode (html or css)
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user