feat: add undo/redo/reset editor tools with keyboard shortcuts
- Add history extension to CodeMirror for undo/redo support - Ctrl+Z for undo, Ctrl+Shift+Z for redo now work - Add toolbar buttons: ↶ Undo, ↷ Redo, ⟲ Reset - Reset button restores editor to initial lesson code - Add .btn-icon and .editor-tools CSS styles 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
21
src/main.css
21
src/main.css
@@ -712,6 +712,27 @@ code, kbd {
|
||||
font-size: 0.8rem;
|
||||
}
|
||||
|
||||
.btn-icon {
|
||||
padding: 4px 8px;
|
||||
font-size: 1rem;
|
||||
min-width: 32px;
|
||||
background: transparent;
|
||||
color: var(--light-text);
|
||||
border: 1px solid var(--border-color);
|
||||
}
|
||||
|
||||
.btn-icon:hover {
|
||||
background: var(--bg-color);
|
||||
color: var(--text-color);
|
||||
border-color: var(--primary-color);
|
||||
}
|
||||
|
||||
.editor-tools {
|
||||
display: flex;
|
||||
gap: 4px;
|
||||
margin-right: var(--spacing-sm);
|
||||
}
|
||||
|
||||
.btn-ghost {
|
||||
background: transparent;
|
||||
color: var(--light-text);
|
||||
|
||||
Reference in New Issue
Block a user