diff --git a/experiments/outline-editor/editor.css b/experiments/outline-editor/editor.css index c93fbfd..8726d6e 100755 --- a/experiments/outline-editor/editor.css +++ b/experiments/outline-editor/editor.css @@ -625,10 +625,34 @@ } & pre>code { display: block; + width: fit-content; padding: 0.6em 0.6em; padding-bottom: 0.8em; outline: none; } + + /* scrollbar... */ + & pre { + overflow-x: visible; + overflow-y: auto; + + scrollbar-width: thin; + } + & pre::-webkit-scrollbar { + --size: 0.5rem; + + width: var(--size); + height: var(--size); + + /* XXX due to a bug in chrome this does change the scrollbar curosr... */ + cursor: pointer; + } + & pre::-webkit-scrollbar-track { + background: transparent; + } + & pre::-webkit-scrollbar-thumb { + background: silver; + } } diff --git a/experiments/outline-editor/editor.js b/experiments/outline-editor/editor.js index 79fd842..dd73292 100755 --- a/experiments/outline-editor/editor.js +++ b/experiments/outline-editor/editor.js @@ -225,6 +225,10 @@ var quoted = { && elem.getAttribute('contenteditable') == 'true'){ // XXX can keydown and keyup be triggered from different elements??? this.__state = elem.innerText + // XXX move this to keyboard.js... + if(evt.key == 'Escape'){ + editor.focus(elem) } + // XXX not sure if the is needed with keyboard.js... return false } }, // defined .__editedview__(..) handler __keyup__: function(evt, editor, elem){ diff --git a/experiments/outline-editor/index.html b/experiments/outline-editor/index.html index a8b6078..8e3f1b5 100755 --- a/experiments/outline-editor/index.html +++ b/experiments/outline-editor/index.html @@ -133,6 +133,10 @@ var setup = function(){ - empty item height is a bit off... - search? - _...not sure if search should be internal or external yet..._ + - DONE add horizontal scroll to code blocks... + - ```html + + ``` - DONE trailing whitespace is ignored in `.view`... collapsed:: true - demos: @@ -248,6 +252,21 @@ var setup = function(){ - Docs - - ## Docs + - ### Use + - Minimal + ```html + + ``` + - Session-stored + ```html + + ``` + - #### Attributes: + - `value` + - `session-storage` + - `local-storage` - ### Controls - ASAP: these need updating... - | Key | Action |