Hi Mark

I would like the the wikifiedlist to appear exactly as it was written
in the first place:
and it should replace the original list of nonwikified words.

I've tried to make your script work genericly - and put it in the
toolbar..
 (Now it just makes temporary links working in viewmode - but gone
again when I hit the editbutton)

Now it looks like this:
<script label="Liste2WikiLinks" title="Convert list to WikiLinks">
var here=story.findContainingTiddler(place);
   if (!here) return;
   var title=here.getAttribute("tiddler");
   var tiddler=store.getTiddler(title);
   var t=store.getTiddlerText(tiddler.title);
   // var target = store.getTiddler(tiddler.title) ;
   var taglist = t.split('\n') ;
taglist.sort() ;
 var tagout = new Array ;
   for(var i=0 ; i < taglist.length ; i++) {
     if ( taglist[i] ) tagout.push('[[' + taglist[i] + ']]') ;
   }
   wikify('{{{' + tagout.join("\n") + '}}}',place) ;
   wikify('\n',place) ;
   wikify(tagout.join("\n"),place) ;
//target.tags = tagout ;
   // return 'Mischief Managed' ;
</script>

YS Måns Mårtensson

On 13 Apr., 18:20, "Mark S." <[email protected]> wrote:
> Its a little unclear whether you want the links to appear in place, or
> be placed into some other tiddler, or if you want actual links vs.
> displayed links. This script creates the links in place. The displayed
> links are arrayed horizontally at the top, and the live links are
> listed one after the other. You can comment out the one you don't
> want.
>
> <script>
>    var t=store.getTiddlerText('SomeTiddler','');
>    // var target = store.getTiddler('TargetTiddler') ;
>    var taglist = t.split('\n') ;
> taglist.sort() ;
>  var tagout = new Array ;
>    for(var i=0 ; i < taglist.length ; i++) {
>      if ( taglist[i] ) tagout.push('[[' + taglist[i] + ']]') ;
>    }
>    wikify('{{{' + tagout.join("\n") + '}}}',place) ;
>    wikify('\n',place) ;
>    wikify(tagout.join("\n"),place) ;
> //target.tags = tagout ;
>    // return 'Mischief Managed' ;
> </script>
>
> On Apr 12, 2:42 pm, Måns <[email protected]> wrote:
>
> > Hi
> > I have a script that turns a list into a tagline with bracketed tags..
>
> > I'd like a simpler script that "only" converts the list into
> > wikilinks
> > like this:
> > word nr1
> > word nr 2
>
> > converted into:
>
> > [[word nr1]]
> > [[word nr2]]
>
> > The script I have (from Mark S):
> > <script>
> >    var t=store.getTiddlerText('SomeTiddler','');
> >    var target = store.getTiddler('TargetTiddler') ;
> >    var taglist = t.split('\n') ;
> >    var tagout = new Array ;
> >    for(var i=0 ; i < taglist.length ; i++) {
> >      if ( taglist[i] ) tagout.push('[[' + taglist[i] + ']]') ;
> >    }
> >    target.tags = tagout ;
> >    return 'Mischief Managed' ;
> > </script>
>
> > What am I going to leave out? - what do I have to "get in"??
>
> > YS Måns Mårtensson
--~--~---------~--~----~------------~-------~--~----~
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