If you use this TOC (http://giffmex.org/noteslam/noteslam.online.mine.html) and hit the plus button, it creates an outline entry. The caption field is what shows in the TOC, not the title field, and the caption field can be used to add CSS classes like highlighting and color, etc. The entries will still be links even though they are not blue.
--
You received this message because you are subscribed to a topic in the Google Groups "TiddlyWiki" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tiddlywiki/d2EyRIxCHB0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddlywiki+unsubscribe@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/e8e88072-d9de-4ba2-8eff-cea404b7bb5d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Yes barrowgloom, that was my goal, that by using the caption field for the ToC, I could apply classes and they would show that way in the ToC. The ToC shows only caption fields, not titles. That is the way I set it up, so the ToC's could have styles in the entries. I am not sure what you are asking.
Perhaps you were hoping for a style applied to indicate within the ToC which tiddler is currently being viewed.
And in the case of my personal version of NoteSlam, that would be a moot point, since I don't put the ToC in the sidebar, so you have to look at the ToC and the tiddlers at separate times.
I am not sure what you mean by an "indicator of position in long ToCs." I will assume you meant 'a visual indicator in long ToCs to show what tiddler is being viewed'. Again, I don't know how to do that or if it can be done. Blessings.
function findTitleDomNode(widget,targetClass) { targetClass = targetClass || "tc-title";var domNode = widget.findFirstDomNode();
if(domNode.querySelector('.tc-title') != null ){
var ttitle=domNode.querySelector('.tc-title').textContent.replace(/^\s+|\s+$/mg,'');document.title=ttitle;
var elements = document.querySelectorAll('ol a,ol ol a,ol button,ol ol button') ;
for (var i = 0; i < elements.length; i++) {elements[i].id = '';elements[i].style.color = 'inherit'; parentTag(elements[i]).style.backgroundColor = '';parentTag(parentTag(elements[i])).id = '';
if(~domNode.getAttribute('class').indexOf(encodeURI(elements[i].textContent.replace(/^\s+|\s+$/mg,'')))) {elements[i].id = 'orange_text';if( parentTag(elements[i]).tagName=="LI"){parentTag(elements[i]).style.backgroundColor = 'rgba(255, 255, 255, 0.4)';}; };
if( elements[i].textContent.replace(/^\s+|\s+$/mg,'')==ttitle){elements[i].style.color = '#fff'; if( parentTag(elements[i]).tagName=="LI"){parentTag(elements[i]).style.backgroundColor = 'rgba(0, 0, 0, 0.2)';} ; if( parentTag(parentTag(elements[i])).tagName=="LI"){parentTag(parentTag(elements[i])).id = 'orange';} ; } ; }