From 273c14aa20fe160f9b77b9458c4cf4c49c500c8a Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Tue, 10 Oct 2023 23:18:50 +0300 Subject: [PATCH] added link support + minor tweaks... Signed-off-by: Alex A. Naanou --- experiments/outline-editor/editor.css | 9 ++++++--- experiments/outline-editor/editor.js | 1 - experiments/outline-editor/index.html | 7 ++++--- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/experiments/outline-editor/editor.css b/experiments/outline-editor/editor.css index 7fac473..38e160e 100755 --- a/experiments/outline-editor/editor.css +++ b/experiments/outline-editor/editor.css @@ -105,6 +105,11 @@ overflow: hidden; resize: none; } +/* clickable things in view */ +.editor .outline [tabindex]>span a, +.editor .outline [tabindex]>span input { + pointer-events: auto; +} /* focus... */ @@ -305,9 +310,6 @@ editor .outline [tabindex]:focus { * element -- can's seem to figure out a way to avoid this */ --checkbox-margin: 0em; } -.editor .outline input { - pointer-events: auto; -} .editor .outline [tabindex].todo>span { width: calc(100% - var(--checkbox-size)); /* align todo checkboxes to indnt (otherwise they are on the indent) */ @@ -355,6 +357,7 @@ editor .outline [tabindex]:focus { .editor.show-click-zones .outline [tabindex]>span:before, .editor.show-click-zones .outline [tabindex]>span:after { background: rgba(0,0,0,0.03); + border: solid 1px silver; } .editor.show-click-zones .outline [tabindex]:hover>span:before, .editor.show-click-zones .outline [tabindex]:hover>span:after { diff --git a/experiments/outline-editor/editor.js b/experiments/outline-editor/editor.js index de9efc2..32ce271 100755 --- a/experiments/outline-editor/editor.js +++ b/experiments/outline-editor/editor.js @@ -633,7 +633,6 @@ var Outline = { // click: left of elem (outside) if(evt.offsetX < 0){ // XXX item menu? - console.log('---', elem) // click: right of elem (outside) } else if(elem.offsetWidth < evt.offsetX){ diff --git a/experiments/outline-editor/index.html b/experiments/outline-editor/index.html index 4534447..77eeedc 100755 --- a/experiments/outline-editor/index.html +++ b/experiments/outline-editor/index.html @@ -67,7 +67,8 @@ var setup = function(){ - edit node - markdown: tables - empty item height is a bit off... - - ~serialize~/deserialize + - handle links gracefully + - ~serialize/deserialize~ - ~add optional text styling to nodes~ - - ## TEST @@ -116,7 +117,7 @@ var setup = function(){
-
+