mirror of
https://github.com/flynx/pWiki.git
synced 2025-10-29 10:00:08 +00:00
clenup and notes....
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
ea00679b9f
commit
ec04205bfa
@ -408,6 +408,14 @@ editor .outline .block:focus {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*---------------------------------------------------------- Done ---*/
|
||||||
|
|
||||||
|
.editor .outline .block.DONE>.view {
|
||||||
|
text-decoration: line-through;
|
||||||
|
opacity: 0.5;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*--------------------------------------------------- Highlightes ---*/
|
/*--------------------------------------------------- Highlightes ---*/
|
||||||
|
|
||||||
.editor .outline .highlight {
|
.editor .outline .highlight {
|
||||||
|
|||||||
@ -26,8 +26,17 @@ var atLine = function(elem, index){
|
|||||||
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------
|
//---------------------------------------------------------------------
|
||||||
|
// Plugins...
|
||||||
|
|
||||||
|
// general helpers and utils...
|
||||||
var plugin = {
|
var plugin = {
|
||||||
|
encode: function(text){
|
||||||
|
return text
|
||||||
|
.replace(/(?<!\\)&/g, '&')
|
||||||
|
.replace(/(?<!\\)</g, '<')
|
||||||
|
.replace(/(?<!\\)>/g, '>')
|
||||||
|
.replace(/\\(?!`)/g, '\\\\') },
|
||||||
|
|
||||||
// XXX make this more generic...
|
// XXX make this more generic...
|
||||||
style: function(editor, elem, style, code=undefined){
|
style: function(editor, elem, style, code=undefined){
|
||||||
style = [style].flat()
|
style = [style].flat()
|
||||||
@ -43,7 +52,6 @@ var plugin = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
||||||
var attributes = {
|
var attributes = {
|
||||||
@ -89,6 +97,8 @@ var blocks = {
|
|||||||
.replace(/^\s*(?<!\\)>\s+(.*)$/m, this.style(editor, elem, 'quote'))
|
.replace(/^\s*(?<!\\)>\s+(.*)$/m, this.style(editor, elem, 'quote'))
|
||||||
.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*(?<!\\)DONE\s+(.*)$/m, this.style(editor, elem, 'DONE'))
|
||||||
|
.replace(/^(.*)\s*(?<!\\)DONE\s*$/m, this.style(editor, elem, 'DONE'))
|
||||||
.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')) } ,
|
||||||
}
|
}
|
||||||
@ -100,13 +110,6 @@ var blocks = {
|
|||||||
var quoted = {
|
var quoted = {
|
||||||
__proto__: plugin,
|
__proto__: plugin,
|
||||||
|
|
||||||
encode: function(text){
|
|
||||||
return text
|
|
||||||
.replace(/(?<!\\)&/g, '&')
|
|
||||||
.replace(/(?<!\\)</g, '<')
|
|
||||||
.replace(/(?<!\\)>/g, '>')
|
|
||||||
.replace(/\\(?!`)/g, '\\\\') },
|
|
||||||
|
|
||||||
// can be used in:
|
// can be used in:
|
||||||
// <string>.replace(quoted.pattern, quoted.handler)
|
// <string>.replace(quoted.pattern, quoted.handler)
|
||||||
quote_pattern: /(?<!\\)`(?=[^\s])(([^`]|\\`)*[^\s])(?<!\\)`/gm,
|
quote_pattern: /(?<!\\)`(?=[^\s])(([^`]|\\`)*[^\s])(?<!\\)`/gm,
|
||||||
|
|||||||
@ -41,6 +41,8 @@ var setup = function(){
|
|||||||
- Tomboy
|
- Tomboy
|
||||||
- Bonsai
|
- Bonsai
|
||||||
-
|
-
|
||||||
|
- // Seems that I unintentionally implemented quite a chunk of the markdown spec ;)
|
||||||
|
-
|
||||||
- ## Bugs:
|
- ## Bugs:
|
||||||
- BUG: ASAP: editor: `-` at start of line is interpreted as block marker...
|
- BUG: ASAP: editor: `-` at start of line is interpreted as block marker...
|
||||||
- need to either:
|
- need to either:
|
||||||
@ -102,21 +104,21 @@ var setup = function(){
|
|||||||
block text
|
block text
|
||||||
- NOTE: this is only a problem if making list-items manually -- disable???
|
- NOTE: this is only a problem if making list-items manually -- disable???
|
||||||
- empty item height is a bit off...
|
- empty item height is a bit off...
|
||||||
- ~Q: can we edit code in a code block directly? (a-la Logseq)~
|
- DONE Q: can we edit code in a code block directly? (a-la Logseq)
|
||||||
- ~"percentage complete" in parent blocks with todo's nested~
|
- DONE "percentage complete" in parent blocks with todo's nested
|
||||||
- ~`.editor .outline:empty` view and behavior...~
|
- DONE `.editor .outline:empty` view and behavior...
|
||||||
- ~editor: semi-live update styles~
|
- DONE editor: semi-live update styles
|
||||||
- ~do a better expand/collapse icons~
|
- DONE do a better expand/collapse icons
|
||||||
- ~loading from DOM -- fill textarea~
|
- DONE loading from DOM -- fill textarea
|
||||||
- ~focus management~
|
- DONE focus management
|
||||||
- ~mouse/touch controls~
|
- DONE mouse/touch controls
|
||||||
- ~navigation~
|
- DONE navigation
|
||||||
- ~expand/collapse subtree~
|
- DONE expand/collapse subtree
|
||||||
- ~shift subtree up/down~
|
- DONE shift subtree up/down
|
||||||
- ~create node~
|
- DONE create node
|
||||||
- ~edit node~
|
- DONE edit node
|
||||||
- ~serialize/deserialize~
|
- DONE serialize/deserialize
|
||||||
- ~add optional text styling to nodes~
|
- DONE add optional text styling to nodes
|
||||||
-
|
-
|
||||||
- ## Refactoring:
|
- ## Refactoring:
|
||||||
- Plugin architecture
|
- Plugin architecture
|
||||||
@ -185,9 +187,10 @@ var setup = function(){
|
|||||||
- // C-style comment
|
- // C-style comment
|
||||||
- ; ASM-style comment
|
- ; ASM-style comment
|
||||||
- XXX Highlight
|
- XXX Highlight
|
||||||
|
- DONE Done
|
||||||
- Basic inline *bold*, _italic_ and ~striked~
|
- Basic inline *bold*, _italic_ and ~striked~
|
||||||
- Marking ==text==
|
- Marking ==text==
|
||||||
- Code
|
- Code:
|
||||||
- Inline quoting `html <b>code</b>`
|
- Inline quoting `html <b>code</b>`
|
||||||
- code blocks
|
- code blocks
|
||||||
```javascript
|
```javascript
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user