Hi!
I'm trying to invoke a plugin from another plugin. Specifically, I'm
trying to modify DcTableOfContentsPlugin (1) to invoke
EditSectionPlugin (2), so that the edit section command appears next
to all section titles.
I tried modifying the following section:
if (w.tiddler && w.tiddler.isTOCInTiddler == 1) {
// Create a container for the default CSS values
var c = createTiddlyElement(e, "div");
c.setAttribute("style", "font-size: 0.5em; color: blue;");
// Create the link to jump to the top
createTiddlyButton(c, " [top]", "Go to top of tiddler",
window.scrollToTop, "dcTOCTop", null, null);
}

like this:
if (w.tiddler && w.tiddler.isTOCInTiddler == 1) {
var e = createTiddlyElement(e, "span");
createTiddlyButton(e, " [Edit]", "Edit section",
config.macros.editSection, "editSection", null, null);
// Create a container for the default CSS values
var c = createTiddlyElement(e, "div");
c.setAttribute("style", "font-size: 0.5em; color: blue;");
// Create the link to jump to the top
createTiddlyButton(c, " [top]", "Go to top of tiddler",
window.scrollToTop, "dcTOCTop", null, null);
}

I get the correctly styled button, but it doesn't do anything. I'm
guessing the proble lies in config.macros.editSection, but I don't
know how to invoke the editSection macro correctly.
Any ideas?

w

(1) http://devpad.tiddlyspot.com/#DcTableOfContentsPlugin
(2) http://www.tiddlytools.com/#EditSectionPlugin

-- 
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.

Reply via email to