mirror of
https://github.com/flynx/pWiki.git
synced 2025-12-26 04:41:55 +00:00
Compare commits
No commits in common. "7904e8c42e76d5611a0063bc35f43429bfd56da4" and "1e6e888b2d4acf458c8557c323317134b278ee65" have entirely different histories.
7904e8c42e
...
1e6e888b2d
@ -414,18 +414,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*----------------------------------------------------------- TOC ---*/
|
|
||||||
|
|
||||||
:host .outline,
|
|
||||||
.editor .outline {
|
|
||||||
.toc>.view,
|
|
||||||
.TOC>.view {
|
|
||||||
padding-top: 0px;
|
|
||||||
padding-bottom: 0px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*--------------------------------------------------------- Quote ---*/
|
/*--------------------------------------------------------- Quote ---*/
|
||||||
|
|
||||||
:host .outline .quote>.text,
|
:host .outline .quote>.text,
|
||||||
|
|||||||
@ -920,7 +920,6 @@ var JSONOutline = {
|
|||||||
|
|
||||||
// block render...
|
// block render...
|
||||||
// XXX PRE_POST_NEWLINE can we avoid explicitly patching for empty lines after pre???
|
// XXX PRE_POST_NEWLINE can we avoid explicitly patching for empty lines after pre???
|
||||||
__view_attrs__: false,
|
|
||||||
__code2html__: function(code, elem={}){
|
__code2html__: function(code, elem={}){
|
||||||
var that = this
|
var that = this
|
||||||
|
|
||||||
@ -938,7 +937,7 @@ var JSONOutline = {
|
|||||||
}[stage]
|
}[stage]
|
||||||
return that.threadPlugins(meth, text, that, elem) }
|
return that.threadPlugins(meth, text, that, elem) }
|
||||||
|
|
||||||
elem = this.parseBlockAttrs(code, this.__view_attrs__, elem)
|
elem = this.parseBlockAttrs(code, elem)
|
||||||
code = elem.text
|
code = elem.text
|
||||||
|
|
||||||
// stage: pre...
|
// stage: pre...
|
||||||
@ -1013,14 +1012,12 @@ var JSONOutline = {
|
|||||||
// .parseBlockAttrs(<text>, 'all'[, <elem>])
|
// .parseBlockAttrs(<text>, 'all'[, <elem>])
|
||||||
// -> <elem>
|
// -> <elem>
|
||||||
//
|
//
|
||||||
// XXX move to config...
|
parseBlockAttrs: function(text, keep=false, elem={}){
|
||||||
__code_attrs__: false,
|
|
||||||
parseBlockAttrs: function(text, keep=!!this.__code_attrs__, elem={}){
|
|
||||||
if(typeof(keep) == 'object'){
|
if(typeof(keep) == 'object'){
|
||||||
elem = keep
|
elem = keep
|
||||||
keep = typeof(elem) == 'boolean' ?
|
keep = typeof(elem) == 'boolean' ?
|
||||||
elem
|
elem
|
||||||
: this.__code_attrs__ }
|
: false }
|
||||||
var system = this.__block_attrs__
|
var system = this.__block_attrs__
|
||||||
var clean = text
|
var clean = text
|
||||||
// XXX for some reason changing the first group into (?<= .. )
|
// XXX for some reason changing the first group into (?<= .. )
|
||||||
@ -1571,8 +1568,6 @@ var Outline = {
|
|||||||
: this._updateViewSize(view, code) },
|
: this._updateViewSize(view, code) },
|
||||||
//*/
|
//*/
|
||||||
|
|
||||||
// Update node from data...
|
|
||||||
//
|
|
||||||
// NOTE: this does not internally handle undo as it would be too
|
// NOTE: this does not internally handle undo as it would be too
|
||||||
// granular...
|
// granular...
|
||||||
// NOTE: to remove an attribute set it's value to null, undefined,
|
// NOTE: to remove an attribute set it's value to null, undefined,
|
||||||
|
|||||||
@ -144,19 +144,9 @@ var setup = function(){
|
|||||||
-
|
-
|
||||||
- ## ToDo:
|
- ## ToDo:
|
||||||
- attributes: need to show/hide the attributes -- option?
|
- attributes: need to show/hide the attributes -- option?
|
||||||
attr::value
|
- TOC: Q: should we have both manual and auto headings???
|
||||||
- Q: should this be completely handled by a plugin???
|
- IMHO: no...
|
||||||
- `.parseBlockAttrs(..)`: add hook to plugins to handle output...
|
|
||||||
- _plugin will need to get the call context -- can be called when handling for view or code_
|
|
||||||
- `.parseBlockAttrs(..)`: add data attributes to code if missing...
|
|
||||||
- do we need `.__code_attrs__` / `.__view_attrs__`???
|
|
||||||
- handle attr delete correctly -- i.e. if shown attr removed from code -> delete attr...
|
|
||||||
- BUG? can't set `''` as attr value -- parser??
|
|
||||||
- might be a good idea to render plugins in a separate block shown with code...
|
|
||||||
- _when attr added to code -> transfer to attrs block..._
|
|
||||||
- this will help with caret transfer to be more predictable...
|
|
||||||
- TOC: tweaking: add args like depth, ... -- as attributes...
|
- TOC: tweaking: add args like depth, ... -- as attributes...
|
||||||
- TOC: should it be persistently generated as code and be serializable?
|
|
||||||
- ASAP: expand sub-tree on follow link...
|
- ASAP: expand sub-tree on follow link...
|
||||||
- export auto-headings as normal/manual markdown headings...
|
- export auto-headings as normal/manual markdown headings...
|
||||||
- add plugin callback on `.text(..)` / ...
|
- add plugin callback on `.text(..)` / ...
|
||||||
@ -277,9 +267,6 @@ var setup = function(){
|
|||||||
- `<editable/>` -- field marker
|
- `<editable/>` -- field marker
|
||||||
- each child node will copy the template and allow editing of only fields
|
- each child node will copy the template and allow editing of only fields
|
||||||
- not clear how to handle template changes...
|
- not clear how to handle template changes...
|
||||||
- DONE TOC: Q: should we have both manual and auto headings???
|
|
||||||
collapsed:: true
|
|
||||||
- IMHO: no...
|
|
||||||
- DONE attributes: need a way to remove attributes from editor -- `null` or `undefined` special values??
|
- DONE attributes: need a way to remove attributes from editor -- `null` or `undefined` special values??
|
||||||
- DONE attributes: `.data(..)`: read in element attributes...
|
- DONE attributes: `.data(..)`: read in element attributes...
|
||||||
collapsed:: true
|
collapsed:: true
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user