Compare commits

..

5 Commits

Author SHA1 Message Date
99f1de520f bugfix...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
2023-10-26 23:37:59 +03:00
4d3d5e544e notes...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
2023-10-26 23:06:38 +03:00
e52062b994 bugfix...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
2023-10-26 23:05:16 +03:00
37fd871d68 cleanup...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
2023-10-26 21:49:10 +03:00
d81125293e found bug + tweaks...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
2023-10-26 21:46:14 +03:00
3 changed files with 35 additions and 7 deletions

View File

@ -411,13 +411,14 @@ editor .outline .block:focus {
/*------------------------------------------------ Numbered lists ---*/ /*------------------------------------------------ Numbered lists ---*/
.editor .outline .numbered-list>.children {
counter-reset: numbered-list;
}
.editor .outline .numbered-list>.children>.block>.view:not(:empty):before { .editor .outline .numbered-list>.children>.block>.view:not(:empty):before {
counter-increment: numbered-list; counter-increment: numbered-list;
content: counter(numbered-list) "."; content: counter(numbered-list) ".";
color: gray; color: gray;
} }
/* numbered lists... */
.editor .outline .editor .outline
.numbered-list>.children .numbered-list>.children
>.numbered-list>.children>.block>.view:not(:empty):before { >.numbered-list>.children>.block>.view:not(:empty):before {
@ -444,6 +445,16 @@ editor .outline .block:focus {
} }
/*------------------------------------------------------ hr block ---*/
.editor .outline .list>.children>.block.hr>.view:before {
content: "";
}
.editor .outline .numbered-list>.children>.block.hr>.view:before {
content: "";
}
/*--------------------------------------------------------- Notes ---*/ /*--------------------------------------------------------- Notes ---*/
.editor .outline .NOTE { .editor .outline .NOTE {

View File

@ -184,7 +184,8 @@ var blocks = {
.replace(/^\s*(?<!\\)((\/\/|;)\s+.*)$/m, this.style(editor, elem, 'comment')) .replace(/^\s*(?<!\\)((\/\/|;)\s+.*)$/m, this.style(editor, elem, 'comment'))
.replace(/^\s*(?<!\\)NOTE:?\s*(.*)$/m, this.style(editor, elem, 'NOTE')) .replace(/^\s*(?<!\\)NOTE:?\s*(.*)$/m, this.style(editor, elem, 'NOTE'))
.replace(/^\s*(?<!\\)XXX\s+(.*)$/m, this.style(editor, elem, 'XXX')) .replace(/^\s*(?<!\\)XXX\s+(.*)$/m, this.style(editor, elem, 'XXX'))
.replace(/^(.*)\s*(?<!\\)XXX$/m, this.style(editor, elem, 'XXX')) } , .replace(/^(.*)\s*(?<!\\)XXX$/m, this.style(editor, elem, 'XXX'))
.replace(/^\s*---\s*$/m, this.style(editor, elem, 'hr', '<hr>')) } ,
} }
@ -1517,12 +1518,25 @@ var Outline = {
place = place == 'prev' ? place = place == 'prev' ?
'before' 'before'
: place : place
// ... ...
// cur cur
// new new <- before the next after cur
// --- ---
// ... ...
;(place == 'next' ;(place == 'next'
&& (cur.querySelector('.block') // has children (uncollapsed)...
|| cur !== this.get(-1))) ? && (cur.querySelector('.block')?.offsetParent
// not last sibling...
|| cur !== this.get('siblings').at(-1))) ?
this.get(place).before(block) this.get(place).before(block)
// ...
// ---
// cur
// new <- next after cur
// ...
: (place == 'next' : (place == 'next'
&& cur === this.get(-1)) ? // last sibling...
&& cur === this.get('siblings').at(-1)) ?
cur.after(block) cur.after(block)
: (place == 'before' || place == 'after') ? : (place == 'before' || place == 'after') ?
cur[place](block) cur[place](block)

View File

@ -51,7 +51,10 @@ var setup = function(){
- BUG: mobile browsers behave quite chaotically ignoring parts of the styling... - BUG: mobile browsers behave quite chaotically ignoring parts of the styling...
- -
- ## ToDo: - ## ToDo:
- selection / multiple node selection (via shift+motion)
- copy/paste nodes/trees - copy/paste nodes/trees
- numbered lists: add counters to a depth of 6-7...
- _or find a way to make them repeat..._
- FEATURE: read-only mode - FEATURE: read-only mode
- auto-shift done blocks to the end of siblings... (option?) - auto-shift done blocks to the end of siblings... (option?)
- ...or should this be `sort:: done` -- i.e. sort children by done status?? - ...or should this be `sort:: done` -- i.e. sort children by done status??
@ -74,7 +77,6 @@ var setup = function(){
- a way to make a block monospace (???) - a way to make a block monospace (???)
- editor as a custom element... - editor as a custom element...
- Nerd fonts (option???) - Nerd fonts (option???)
- multiple node selection
- smooth scrolling - smooth scrolling
- _...this is more complicated than adding `behavior: "smooth"` to `.scrollIntoView(..)` as scrolling animation will get interrupted by next user input..._ - _...this is more complicated than adding `behavior: "smooth"` to `.scrollIntoView(..)` as scrolling animation will get interrupted by next user input..._
- need to cancel animation if things are moving too fast... - need to cancel animation if things are moving too fast...
@ -104,6 +106,7 @@ var setup = function(){
- empty item height is a bit off... - empty item height is a bit off...
- search? - search?
- _...not sure if search should be internal or external yet..._ - _...not sure if search should be internal or external yet..._
- DONE make `---` block not show list bullets...
- DONE: undo: checkboxes and DONE?? - DONE: undo: checkboxes and DONE??
collapsed:: true collapsed:: true
_...this should be triggered by text change -- move current implementation to .__editedcode__()??..._ _...this should be triggered by text change -- move current implementation to .__editedcode__()??..._