Just scratching a coding itch.
Modify the code in the button, changing the "Some Tiddler" instances to an existing tiddler in your TiddlyWiki. (I've been playing with TiddlyWiki.com for the giggles.)
Put this code in some tiddler and save the tiddler. Then, press the button, and take a look at the new tiddler named the same as this one, but with the added suffix " Data".
<$button>
<$vars newLine="
" >
<$vars nCount={{{ [[Some Tiddler]get[text]split<newLine>count[]] }}}
thisTiddler=<<currentTiddler>>>
<$list variable="line-num" filter="[range<nCount>]">
<$action-setfield $tiddler={{{ [<thisTiddler>addsuffix[ Data]] }}} $index={{{ [<line-num>addprefix[line]] }}}, $value={{{ [[Some Tiddler]get[text]split<newLine>nth<line-num>] }}}/>
</$list>
</$vars>
</$vars>
Click me!
</$button>
Why code that? I'm just got this festering thought: how would I go about creating an alternative tiddler editor with "code folding", using only TiddlyWiki?
Well, I think it starts with first finding a way to split a tiddler into its individual lines.
Just an exercise for the $hit$ and the giggle$, possibly coming to a fiery end when I hit the wall ...