now code is scrollable horizontally...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2023-11-03 17:27:15 +03:00
parent 73004faf9b
commit 77e9a6ba2f
3 changed files with 47 additions and 0 deletions

View File

@ -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;
}
}

View File

@ -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 <plugin>.__editedview__(..) handler
__keyup__: function(evt, editor, elem){

View File

@ -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
<outline-editor session-storage="outline-text" value="initial text"></outline-editor>
```
- DONE trailing whitespace is ignored in `.view`...
collapsed:: true
- demos:
@ -248,6 +252,21 @@ var setup = function(){
- Docs
-
- ## Docs
- ### Use
- Minimal
```html
<outline-editor></outline-editor>
```
- Session-stored
```html
<outline-editor
session-storage="outline-text"
value="initial text"></outline-editor>
```
- #### Attributes:
- `value`
- `session-storage`
- `local-storage`
- ### Controls
- ASAP: these need updating...
- | Key | Action |