importing tiddlers

5 views
Skip to first unread message

n j

unread,
Apr 20, 2009, 12:49:38 PM4/20/09
to TiddlyWiki
I'd like to create and import tiddlers from arbitrary xml, using xslt,
javascript or what have you, as discussed here:
http://tiddlywiki.org/wiki/Talk:How_To/Plugins_and_Importing_Tiddlers

Anyone got any ideas?

Eric Shulman

unread,
Apr 20, 2009, 2:04:32 PM4/20/09
to TiddlyWiki
> I'd like to create and import tiddlers from arbitrary xml, using xslt,
> javascript or what have you, as discussed here:http://tiddlywiki.org/wiki/Talk:How_To/Plugins_and_Importing_Tiddlers
>
> Anyone got any ideas?

You need to do two things:

1) enclose your generated output within
<div id="storeArea">
...
</div>
This allows TiddlyWiki to find the tiddler definitions within the
file.

2) "HTML-encode" the tiddler content:
< becomes &lt;
> becomes &gt;
" becomes &quot;
& becomes &amp;
This prevents tiddler content from interfering with the HTML syntax
used to define the store area itself.

Something like this will work:
-------------------------------------------
<div id="storeArea">
<div title="example" tags="one two three"><pre>
&lt;html&gt;
&lt;a href=&quot;pic.jpg&quot;&gt;&lt;img height=&quot;150&quot;
src=&quot;pic.jpg&quot; border=&quot;0&quot;&gt;&lt;/a&gt;
&lt;/html&gt;
</pre></div>
</div>
-------------------------------------------

enjoy,
-e
Eric Shulman
TiddlyTools / ELS Design Studios

n j

unread,
Apr 22, 2009, 12:40:13 AM4/22/09
to TiddlyWiki
Works out of the box - thanks very much.
Reply all
Reply to author
Forward
0 new messages