mirror of
https://github.com/flynx/pWiki.git
synced 2025-10-29 10:00:08 +00:00
fixes and tweaks...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
dcc4ff1aee
commit
9494439f77
@ -376,9 +376,11 @@ editor .outline .block:focus {
|
|||||||
.editor .outline .NOTE>.view:empty {
|
.editor .outline .NOTE>.view:empty {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
.editor .outline .NOTE>.view:empty ~ .block {
|
.editor .outline .NOTE:focus>.view:empty {
|
||||||
/* XXX calculate this... */
|
display: block;
|
||||||
margin-left: 1em;
|
}
|
||||||
|
.editor .outline .NOTE>.view:empty ~ .children {
|
||||||
|
margin-left: -1rem;
|
||||||
}
|
}
|
||||||
.editor .outline .NOTE>.view:before {
|
.editor .outline .NOTE>.view:before {
|
||||||
content: "" !important;
|
content: "" !important;
|
||||||
|
|||||||
@ -327,12 +327,18 @@ var Outline = {
|
|||||||
elem.style.push(...style)
|
elem.style.push(...style)
|
||||||
return code
|
return code
|
||||||
?? text } }
|
?? text } }
|
||||||
|
var quote = function(_, code){
|
||||||
|
code = code
|
||||||
|
.replace(/(?<!\\)&/g, '&')
|
||||||
|
.replace(/(?<!\\)</g, '<')
|
||||||
|
.replace(/(?<!\\)>/g, '>')
|
||||||
|
.replace(/\\(?!`)/g, '\\\\')
|
||||||
|
return `<code>${code}</code>` }
|
||||||
var table = function(_, body){
|
var table = function(_, body){
|
||||||
return `<table><tr><td>${
|
body = body
|
||||||
body
|
.replace(/\s*\|\s*\n\s*\|\s*/gm, '</td></tr>\n<tr><td>')
|
||||||
.replace(/\s*\|\s*\n\s*\|\s*/gm, '</td></tr>\n<tr><td>')
|
.replace(/\s*\|\s*/gm, '</td><td>')
|
||||||
.replace(/\s*\|\s*/gm, '</td><td>')
|
return `<table><tr><td>${body}</td></td></table>` }
|
||||||
}</td></td></table>` }
|
|
||||||
elem.text = code
|
elem.text = code
|
||||||
// hidden attributes...
|
// hidden attributes...
|
||||||
// XXX make this generic...
|
// XXX make this generic...
|
||||||
@ -388,7 +394,7 @@ var Outline = {
|
|||||||
.replace(/(?<!\\)\*(?=[^\s*])(([^*]|\\\*)*[^\s*])(?<!\\)\*/gm, '<b>$1</b>')
|
.replace(/(?<!\\)\*(?=[^\s*])(([^*]|\\\*)*[^\s*])(?<!\\)\*/gm, '<b>$1</b>')
|
||||||
.replace(/(?<!\\)~(?=[^\s~])(([^~]|\\~)*[^\s~])(?<!\\)~/gm, '<s>$1</s>')
|
.replace(/(?<!\\)~(?=[^\s~])(([^~]|\\~)*[^\s~])(?<!\\)~/gm, '<s>$1</s>')
|
||||||
.replace(/(?<!\\)_(?=[^\s_])(([^_]|\\_)*[^\s_])(?<!\\)_/gm, '<i>$1</i>')
|
.replace(/(?<!\\)_(?=[^\s_])(([^_]|\\_)*[^\s_])(?<!\\)_/gm, '<i>$1</i>')
|
||||||
.replace(/(?<!\\)`(?=[^\s])(([^`]|\\`)*[^\s])(?<!\\)`/gm, '<code>$1</code>')
|
.replace(/(?<!\\)`(?=[^\s])(([^`]|\\`)*[^\s])(?<!\\)`/gm, quote)
|
||||||
// XXX support "\==" in mark...
|
// XXX support "\==" in mark...
|
||||||
.replace(/(?<!\\)==(?=[^\s])(.*[^\s])(?<!\\)==/gm, '<mark>$1</mark>')
|
.replace(/(?<!\\)==(?=[^\s])(.*[^\s])(?<!\\)==/gm, '<mark>$1</mark>')
|
||||||
// links...
|
// links...
|
||||||
|
|||||||
@ -35,17 +35,17 @@ var setup = function(){
|
|||||||
- Tomboy
|
- Tomboy
|
||||||
- Bonsai
|
- Bonsai
|
||||||
-
|
-
|
||||||
- ## ToDo:
|
- ## Bugs:
|
||||||
- BUG? pressing down from a longer line will jump over a shorter line
|
- BUG? pressing down from a longer line will jump over a shorter line
|
||||||
- here is the line to jump from, for example from here
|
- here is the line to jump from, for example from here
|
||||||
an we'll not get here...
|
an we'll not get here...
|
||||||
- ASAP: fix quotes
|
- ## ToDo:
|
||||||
- Example: /\n\s*\|\s+/ -> <tr><td>
|
|
||||||
- ASAP: editor: bksapce/del at start/end of a block should join it with prev/next
|
- ASAP: editor: bksapce/del at start/end of a block should join it with prev/next
|
||||||
- ASAP: editor: pressing enter in text edit mode should split text into two blocks
|
- ASAP: editor: pressing enter in text edit mode should split text into two blocks
|
||||||
- ASAP: editor: shifting nodes up/down
|
- ASAP: editor: shifting nodes up/down
|
||||||
- ASAP: editor: `-` at start of line is interpreted as block marker...
|
- ASAP: editor: `-` at start of line is interpreted as block marker...
|
||||||
- ASAP: use \\t for indent...
|
- ASAP: use \\t for indent...
|
||||||
|
- ASAP: scroll into view is bad...
|
||||||
- on item click, place the cursor where it was clicked before the code expanded...
|
- on item click, place the cursor where it was clicked before the code expanded...
|
||||||
- ~editor: semi-live update styles~
|
- ~editor: semi-live update styles~
|
||||||
- need to reach checkboxes via keyboard
|
- need to reach checkboxes via keyboard
|
||||||
@ -80,10 +80,6 @@ var setup = function(){
|
|||||||
- indent/deindent
|
- indent/deindent
|
||||||
- edit node
|
- edit node
|
||||||
- empty item height is a bit off...
|
- empty item height is a bit off...
|
||||||
- ~handle links gracefully -- open/edit
|
|
||||||
_just click in the empty space_~
|
|
||||||
- ~<a href="about:blank">this takes the whole element</a>~
|
|
||||||
- this breaks if link is exactly line width -- should we ensure empty space?
|
|
||||||
- ~serialize/deserialize~
|
- ~serialize/deserialize~
|
||||||
- ~add optional text styling to nodes~
|
- ~add optional text styling to nodes~
|
||||||
-
|
-
|
||||||
@ -125,7 +121,7 @@ var setup = function(){
|
|||||||
- y
|
- y
|
||||||
- z
|
- z
|
||||||
- c
|
- c
|
||||||
- > quoted text
|
- > quote
|
||||||
- Notes
|
- Notes
|
||||||
- NOTE: a note text
|
- NOTE: a note text
|
||||||
- NOTE:
|
- NOTE:
|
||||||
@ -135,6 +131,8 @@ var setup = function(){
|
|||||||
- ; ASM-style comment
|
- ; ASM-style comment
|
||||||
- XXX Highlight
|
- XXX Highlight
|
||||||
- Basic inline *bold*, _italic_ and ~striked~
|
- Basic inline *bold*, _italic_ and ~striked~
|
||||||
|
- Code
|
||||||
|
- Quoting `html <b>code</b>`
|
||||||
- Marking ==text==
|
- Marking ==text==
|
||||||
- Line
|
- Line
|
||||||
- ---
|
- ---
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user