Thanks Tobias, Looks like you made a similar tweak. You have done much more customized than I have; I will go back and explore your changes.
The hyperlink in the source of the annotation works with my tweak. See http://hoster.peermore.com/recipes/TeamWork/tiddlers.wiki (Annotations2) for examples. You might change your code from: var an=this.lookaheadRegExp.exec(w.source); if(an&&an.index==w.matchStart){ var el=createTiddlyElement(w.output,"span",null,"annosub"); if (an[1]) el=createTiddlyElement(el,"span",null,null); wikify('xxx'+an[2],el); el.innerHTML=el.innerHTML.replace(/xxx/,'',1); el.anno=an[4]; if(an[3])el.subject=an[2]; el.onmouseover=this.onmouseover; el.onmouseout=this.onmouseout; el.ondblclick=this.onmouseout; w.nextMatch=an.index+an[0].length; } To: var _2=this.lookaheadRegExp.exec(w.source); //if this condition applies, then the annotation is correctly formatted. if(_2&&_2.index==w.matchStart){ //attach <span class=annosub> subject </span> to w.output // and create a var, _3, which remains attached to w.output var _3=createTiddlyElement(w.output,"span",null,"annosub"); _3.innerHTML=wikifyStatic(_2[1]); //attach the annotation as a property of _3 _3.anno=_2[3]; // add the subject to the annotation as a subject property if the ^ option is present if(_2[2]){_3.subject=_2[1];} // setup mousing functions _3.onmouseover=this.onmouseover; _3.onmouseout=this.onmouseout; _3.ondblclick=this.onmouseout; //continue formatting after the annotation; _2.index= start of annotation; _2[0] is then full pattern string found. w.nextMatch=_2.index+_2[0].length; } Best, Bill On Jul 1, 1:14 am, Tobias Beer <[email protected]> wrote: > Hi Bill, > > Can't remember what I changed, but I've done something similar here. > It is heavily in use on the "desk" of tbGTD providing hints and also > for additional information popping up from the toolbar, e.g. a "new" > notifier if a tiddler/plugin/etc. has recently been added... > > http://tbgtd.tiddlyspot.com/#jQueryPopup > > Have a look at the code, maybe you can spot the changes I made. > > What I did not get to work is to have the annotated word to be or > contain clickable WikiLinks, see here: > > http://tbgtd.tiddlyspot.com/#testAnno > > Note: If you mouse-over "mod of AnnotationsPlugin" (in red) in the > source you get a popup with hints on the things I tried to achieve. > > Tobias. -- You received this message because you are subscribed to the Google Groups "TiddlyWikiDev" 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/tiddlywikidev?hl=en.
