Basking: live preview editing
Pages open in Live mode, where every line is rendered except the one being edited, with Edit (plain markdown) and View (fully rendered) beside it. Arrow keys, Backspace and Delete move between lines, code blocks are edited as a whole, and edits are spliced back into the one text the rest of the editor already saves. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
98f7730913
commit
cec2702260
4 files changed
+179
-23
No files matched your search
@@ -325,3 +325,14 @@
|
||||
.note-title a:hover { text-decoration:underline; }
|
||||
.keys { list-style:none; margin:0; padding:0; display:grid; gap:var(--s2); }
|
||||
@media (max-width:640px) { .page-actions { justify-content:flex-start; } .shade-top { padding-top:var(--s4); } }
|
||||
|
||||
/* live preview: lines render, the line being edited shows its markdown */
|
||||
.live { position:relative; line-height:1.7; font-size:var(--text-base); }
|
||||
.live-line { min-height:1.7em; cursor:text; overflow-wrap:anywhere; }
|
||||
.live .md p, .live .md ul, .live .md ol, .live .md pre, .live .md blockquote { margin:0; }
|
||||
.live .md hr { margin:var(--s2) 0; }
|
||||
.live .md .md-h { margin:var(--s2) 0 0; }
|
||||
.live .md h3.md-h { font-size:var(--text-xl); } .live .md h4.md-h { font-size:var(--text-lg); }
|
||||
textarea.live-edit { display:block; width:100%; min-height:1.7em; margin:0 0 0 calc(-1 * (var(--s2) + 2px)); padding:0 0 0 var(--s2); border:0; border-left:2px solid var(--accent); border-radius:0; background:var(--accent-soft); font-family:var(--font); font-size:var(--text-base); line-height:1.7; resize:none; overflow:hidden; }
|
||||
textarea.live-edit:focus { outline:none; border-color:var(--accent); }
|
||||
.live-tail { min-height:30vh; cursor:text; }
|
||||
Reference in new issue
Block a user