From 3375ba26d730a3769970d50e3a53e171e7b29c37 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Sat, 4 Nov 2023 00:38:13 +0300 Subject: [PATCH] minor tweaks + notes... Signed-off-by: Alex A. Naanou --- experiments/outline-editor/editor.css | 13 ++++++++++--- experiments/outline-editor/editor.js | 2 +- experiments/outline-editor/index.html | 10 ++++++---- 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/experiments/outline-editor/editor.css b/experiments/outline-editor/editor.css index 8726d6e..3a6e3b5 100755 --- a/experiments/outline-editor/editor.css +++ b/experiments/outline-editor/editor.css @@ -617,22 +617,29 @@ & pre, &>code, & :not(pre)>code { - padding: 0.1em 0.3em; font-family: monospace; background: rgba(0,0,0,0.07); border-radius: 0.2em; outline: none; } + & :not(pre)>code { + padding: 0.1em 0.3em; + } & pre>code { + --padding: 0.6em; + display: block; + min-width: calc(100% - var(--padding) * 2); width: fit-content; - padding: 0.6em 0.6em; - padding-bottom: 0.8em; + padding: var(--padding) var(--padding); + padding-bottom: calc(var(--padding) + 0.2em); outline: none; } /* scrollbar... */ & pre { + margin: 0.8em 0em; + overflow-x: visible; overflow-y: auto; diff --git a/experiments/outline-editor/editor.js b/experiments/outline-editor/editor.js index dd73292..e6add2a 100755 --- a/experiments/outline-editor/editor.js +++ b/experiments/outline-editor/editor.js @@ -185,7 +185,7 @@ var quoted = { quote: function(_, code){ return `${ this.encode(code) }` }, - pre_pattern: /(?` the problem is that we can't extend `HTMLTextAreaElement` as it can not have shadow dom (reject?) @@ -71,9 +68,13 @@ var setup = function(){ - DONE `.value` / `.code` should be both updated internally and also load new content when updated externally -- not yet sure how... - events - test nesting... + - Q: can we get rid of the editor block??: + - CSS breaks if we do... + - need to figure out a way to handle autofocus for host/editor uniformly - - selection - - multiple node selection (via shift+motion) + - DONE multiple node selection (via shift+motion) + - fixed state -- while `shift` pressed select or deselect only depending on first action (a-la FAR) - touch/mouse (???) - Q: should we select text (mouse/touch) without first focusing?? - _...logseq does not do this either_ @@ -134,6 +135,7 @@ var setup = function(){ - search? - _...not sure if search should be internal or external yet..._ - DONE add horizontal scroll to code blocks... + collapsed:: true - ```html ```