Compare commits

..

No commits in common. "99f1de520fb7494f1bbe2ff0bb2eeacd8bb5d69b" and "0125964dd61859710720d17e1b8534186288ba47" have entirely different histories.

3 changed files with 7 additions and 35 deletions

View File

@ -411,14 +411,13 @@ 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 {
@ -445,16 +444,6 @@ 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,8 +184,7 @@ 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>')) } ,
} }
@ -1518,25 +1517,12 @@ 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'
// has children (uncollapsed)... && (cur.querySelector('.block')
&& (cur.querySelector('.block')?.offsetParent || cur !== this.get(-1))) ?
// 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'
// last sibling... && cur === this.get(-1)) ?
&& 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,10 +51,7 @@ 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??
@ -77,6 +74,7 @@ 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...
@ -106,7 +104,6 @@ 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__()??..._