mirror of
https://github.com/flynx/pWiki.git
synced 2025-12-25 12:21:58 +00:00
Compare commits
No commits in common. "1a0e7b9d69b0a17b868b3d506dd8e45a96fdc167" and "ada5c336654868c5dea6a663611e758cd1d79814" have entirely different histories.
1a0e7b9d69
...
ada5c33665
@ -221,8 +221,6 @@
|
|||||||
/* clickable things in view */
|
/* clickable things in view */
|
||||||
& a,
|
& a,
|
||||||
& pre,
|
& pre,
|
||||||
& button,
|
|
||||||
& select,
|
|
||||||
& input {
|
& input {
|
||||||
pointer-events: auto;
|
pointer-events: auto;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -309,46 +309,6 @@ var attributes = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
||||||
|
|
||||||
// XXX make this collapsed...
|
|
||||||
// XXX handle cursor marker...
|
|
||||||
var templates = {
|
|
||||||
__proto__: plugin,
|
|
||||||
|
|
||||||
nodeFromTemplate: function(){
|
|
||||||
},
|
|
||||||
|
|
||||||
__pre_parse__: function(text, editor, elem){
|
|
||||||
if(!text.startsWith('TEMPLATE')){
|
|
||||||
return text }
|
|
||||||
|
|
||||||
text = text
|
|
||||||
.replace(/^TEMPLATE/, '')
|
|
||||||
var [header, ...lines] = text.split(/\n/g)
|
|
||||||
header =
|
|
||||||
`<button>${
|
|
||||||
header.trim() == '' ?
|
|
||||||
'new'
|
|
||||||
: header.trim()
|
|
||||||
}</button>`
|
|
||||||
|
|
||||||
// body...
|
|
||||||
// XXX only do this if we have nested elements...
|
|
||||||
elem.collapsed = true
|
|
||||||
// XXX
|
|
||||||
|
|
||||||
// button...
|
|
||||||
return header },
|
|
||||||
// XXX focus button...
|
|
||||||
__focusin__: function(evt, editor, elem){
|
|
||||||
},
|
|
||||||
// XXX handle button???
|
|
||||||
__click__: function(evt, editor, elem){
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
||||||
// XXX revise headings...
|
// XXX revise headings...
|
||||||
@ -1007,7 +967,6 @@ var JSONOutline = {
|
|||||||
// XXX split out DOM-specific plugins into Outline.plugins...
|
// XXX split out DOM-specific plugins into Outline.plugins...
|
||||||
pre_plugins: [
|
pre_plugins: [
|
||||||
attributes,
|
attributes,
|
||||||
templates,
|
|
||||||
blocks,
|
blocks,
|
||||||
quoted,
|
quoted,
|
||||||
],
|
],
|
||||||
|
|||||||
@ -155,46 +155,6 @@ var setup = function(){
|
|||||||
|text|text|text|
|
|text|text|text|
|
||||||
-
|
-
|
||||||
- ## ToDo:
|
- ## ToDo:
|
||||||
- Item templates:
|
|
||||||
- inline
|
|
||||||
- TEMPLATE
|
|
||||||
text [cursor]
|
|
||||||
- TEMPLATE title
|
|
||||||
text [cursor]
|
|
||||||
- sub-tree
|
|
||||||
- TEMPLATE title
|
|
||||||
- text [cursor]
|
|
||||||
- multi-template
|
|
||||||
- TEMPLATE title A
|
|
||||||
text [cursor]
|
|
||||||
- TEMPLATE title B
|
|
||||||
- text [cursor]
|
|
||||||
- renders as:
|
|
||||||
- <button>title</button>
|
|
||||||
- <select>
|
|
||||||
<option>title A</option>
|
|
||||||
<option>title B</option>
|
|
||||||
</select><button>new</button>
|
|
||||||
- action:
|
|
||||||
- duplicate template text / subtree (w.o. markers)
|
|
||||||
- select / place cursor at cursor marker
|
|
||||||
- TODO:
|
|
||||||
- nested templates??
|
|
||||||
- global templates -- or should this be an external macro???
|
|
||||||
- revise syntax
|
|
||||||
- templated lists -- a list that uses a template for it's items
|
|
||||||
- something like:
|
|
||||||
- or here there is an explicit item template
|
|
||||||
- TEMPLATE new
|
|
||||||
- [ ] [cursor]
|
|
||||||
- [ ] A
|
|
||||||
- [ ] B
|
|
||||||
- [ ] C
|
|
||||||
- and a shorthand for todo:
|
|
||||||
- TODO in lists like this new items will be created with a todo template
|
|
||||||
- [ ] A
|
|
||||||
- [ ] B
|
|
||||||
- [ ] C
|
|
||||||
- Time to think about a standalone client -- at least to edit own notes as a test...
|
- Time to think about a standalone client -- at least to edit own notes as a test...
|
||||||
- _also this would be a nice opportunity to start the move to a newer electron version_
|
- _also this would be a nice opportunity to start the move to a newer electron version_
|
||||||
- Deployment:
|
- Deployment:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user