Hi Craig
I made my own way around not being able to style the foldheadings-
thing:
EditSectionPlugin + FoldheadingsPlugin and SectionLinksPlugin (most
notably the toc-feature)
I expanded the SectionToc with EditSection macros like this:
config.macros.sectionTOC = {
targetClass: 'sectionTOC',
handler:
function(place,macroName,params,wikifier,paramString,tiddler) {
var out=[];
var targetClass=params[0]||this.targetClass;
var t=story.findContainingTiddler(place); if (!t) return;
var elems=t.getElementsByTagName('*');
var level=5; // topmost heading level
for (var i=0; i<elems.length; i++) {
var txt=getPlainText(elems[i]).trim();
var link='[['+txt+'|##'+txt+']] <<editSection
[[##'+txt+']]
[[✏]]>>';
switch(elems[i].nodeName) {
case 'H1': out.push('#'+link);
level=1; break;
case 'H2': out.push('##'+link);
level=level<2?level:2; break;
case 'H3': out.push('###'+link);
level=level<3?level:3; break;
case 'H4': out.push('####'+link);
level=level<4?level:4; break;
case 'H5': out.push('#####'+link);
level=level<5?level:5; break;
default: if (hasClass(elems[i],targetClass))
var target=elems[i];
}
}
// trim excess bullet levels
if (level>1) for (var i=0; i<out.length; i++)
out[i]=out[i].substr(level-1);
// show numbered list
if (out.length && target) {
if (target.style.display=='none')
target.style.display='block';
wikify(out.join('\n'),target);
}
}
}
In a tiddler tagged with systemconfig...
Example:
http://puppy.tiddlyspace.gir.dk/#[[clone%20bootable%20USB%20stick]]
You'll have to find a way to invoke a fake editmode to actually see
the editSection buttons in the TOC...
Cheers Måns Mårtensson
On 13 Apr., 01:28l, Craig in Calgary <[email protected]> wrote:
> Put another way: my goal is to be able to expand/collapse headings AND edit
> each heading as a section. I prefer to manage fewer tiddlers so each tends
> to contain a lot of content. I prefer to edit small chunks of content in a
> single tiddler. These preferences are mutually exclusive. I currently use
> NestedSliderPlugin for expand/collapse of large sections of content
> (sometimes inline, sometimes embedded (smaller) tiddlers) but
> EditSectionsPlugin doesn't see any content for a section that is wrapped
> within NestedSliderPlugin. Mystery, conundrum, enigma, etc.
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/tiddlywiki?hl=en.