mirror of
https://github.com/flynx/pWiki.git
synced 2025-12-25 12:21:58 +00:00
Compare commits
5 Commits
0125964dd6
...
99f1de520f
| Author | SHA1 | Date | |
|---|---|---|---|
| 99f1de520f | |||
| 4d3d5e544e | |||
| e52062b994 | |||
| 37fd871d68 | |||
| d81125293e |
@ -411,13 +411,14 @@ editor .outline .block:focus {
|
||||
|
||||
/*------------------------------------------------ Numbered lists ---*/
|
||||
|
||||
.editor .outline .numbered-list>.children {
|
||||
counter-reset: numbered-list;
|
||||
}
|
||||
.editor .outline .numbered-list>.children>.block>.view:not(:empty):before {
|
||||
counter-increment: numbered-list;
|
||||
content: counter(numbered-list) ".";
|
||||
color: gray;
|
||||
}
|
||||
|
||||
/* numbered lists... */
|
||||
.editor .outline
|
||||
.numbered-list>.children
|
||||
>.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 ---*/
|
||||
|
||||
.editor .outline .NOTE {
|
||||
|
||||
@ -184,7 +184,8 @@ var blocks = {
|
||||
.replace(/^\s*(?<!\\)((\/\/|;)\s+.*)$/m, this.style(editor, elem, 'comment'))
|
||||
.replace(/^\s*(?<!\\)NOTE:?\s*(.*)$/m, this.style(editor, elem, 'NOTE'))
|
||||
.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' ?
|
||||
'before'
|
||||
: place
|
||||
// ... ...
|
||||
// cur cur
|
||||
// new new <- before the next after cur
|
||||
// --- ---
|
||||
// ... ...
|
||||
;(place == 'next'
|
||||
&& (cur.querySelector('.block')
|
||||
|| cur !== this.get(-1))) ?
|
||||
// has children (uncollapsed)...
|
||||
&& (cur.querySelector('.block')?.offsetParent
|
||||
// not last sibling...
|
||||
|| cur !== this.get('siblings').at(-1))) ?
|
||||
this.get(place).before(block)
|
||||
// ...
|
||||
// ---
|
||||
// cur
|
||||
// new <- next after cur
|
||||
// ...
|
||||
: (place == 'next'
|
||||
&& cur === this.get(-1)) ?
|
||||
// last sibling...
|
||||
&& cur === this.get('siblings').at(-1)) ?
|
||||
cur.after(block)
|
||||
: (place == 'before' || place == 'after') ?
|
||||
cur[place](block)
|
||||
|
||||
@ -51,7 +51,10 @@ var setup = function(){
|
||||
- BUG: mobile browsers behave quite chaotically ignoring parts of the styling...
|
||||
-
|
||||
- ## ToDo:
|
||||
- selection / multiple node selection (via shift+motion)
|
||||
- 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
|
||||
- auto-shift done blocks to the end of siblings... (option?)
|
||||
- ...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 (???)
|
||||
- editor as a custom element...
|
||||
- Nerd fonts (option???)
|
||||
- multiple node selection
|
||||
- smooth scrolling
|
||||
- _...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...
|
||||
@ -104,6 +106,7 @@ var setup = function(){
|
||||
- empty item height is a bit off...
|
||||
- search?
|
||||
- _...not sure if search should be internal or external yet..._
|
||||
- DONE make `---` block not show list bullets...
|
||||
- DONE: undo: checkboxes and DONE??
|
||||
collapsed:: true
|
||||
_...this should be triggered by text change -- move current implementation to .__editedcode__()??..._
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user