mirror of
https://github.com/flynx/pWiki.git
synced 2025-10-28 17:40:07 +00:00
added dataset attr removal...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
7a7ac49432
commit
1e6e888b2d
@ -1570,6 +1570,8 @@ var Outline = {
|
||||
|
||||
// NOTE: this does not internally handle undo as it would be too
|
||||
// granular...
|
||||
// NOTE: to remove an attribute set it's value to null, undefined,
|
||||
// 'null', or 'undefined'
|
||||
update: function(node='focused', data){
|
||||
var node = this.get(node)
|
||||
data ??= this.data(node, false)
|
||||
@ -1615,7 +1617,9 @@ var Outline = {
|
||||
: node.removeAttribute(attr)
|
||||
// dataset...
|
||||
} else {
|
||||
if(value == null){
|
||||
if(value == null
|
||||
|| value == 'null'
|
||||
|| value == 'undefined'){
|
||||
delete node.dataset[attr]
|
||||
} else {
|
||||
node.dataset[attr] = value } } }
|
||||
|
||||
@ -143,15 +143,9 @@ var setup = function(){
|
||||
|text|text|text|
|
||||
-
|
||||
- ## ToDo:
|
||||
- attributes: `.data(..)`: read in element attributes...
|
||||
- would be logical to store system attrs (`.__block_attrs__`) as attrs while the rest as data-attrs - this would bot simplify retrieval and avoid shadowing html attrs...
|
||||
- TEST: this item has attr `moo` with value `"foo"`
|
||||
moo::foo
|
||||
- need a way to remove attributes from editor -- `null` or `undefined` special values??
|
||||
- attributes: need to show/hide the attributes -- option?
|
||||
- TOC: Q: should we have both manual and auto headings???
|
||||
- IMHO: no...
|
||||
- DONE TOC: headings that do not show up in toc -- `# ...` shows up while `@ ...` does not...
|
||||
- TOC: tweaking: add args like depth, ... -- as attributes...
|
||||
- ASAP: expand sub-tree on follow link...
|
||||
- export auto-headings as normal/manual markdown headings...
|
||||
@ -273,6 +267,12 @@ var setup = function(){
|
||||
- `<editable/>` -- field marker
|
||||
- each child node will copy the template and allow editing of only fields
|
||||
- not clear how to handle template changes...
|
||||
- DONE attributes: need a way to remove attributes from editor -- `null` or `undefined` special values??
|
||||
- DONE attributes: `.data(..)`: read in element attributes...
|
||||
collapsed:: true
|
||||
- TEST: this item has attr `moo` with value `"foo"`
|
||||
moo::foo
|
||||
- DONE TOC: headings that do not show up in toc -- `# ...` shows up while `@ ...` does not...
|
||||
- DONE \TOC global/local
|
||||
- DONE FEATURE dynamic headings -- level depends on number of headings above...
|
||||
- DONE Experimental syntax:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user