> Get the data of a tiddler using
> Then modify the text based on user input etc. and then display it.
> The main issue is how do I display a tiddler that is not saved
Using InlineJavascriptPlugin, you can write:
<script>
var txt=store.getTiddlerText(myTitle);
... modify txt based on user input ...
return txt;
</script>
The plugin automatically renders whatever text output you return,
without saving it anywhere.
Note: If you are writing your own plugin macro, the code is slightly
different... instead of returning the text for InlineJavascriptPlugin
to render, you need to render it yourself, by invoking
"wikify(txt,place)", where 'place' is the current DOM element into
which the content will be rendered, and is passed to your plugin's
macro handler when the macro is processed.
config.macros.myMacro = {
handler: function(place,macroName,params,...) {
var txt=store.getTiddlerText(myTitle);
... modify txt based on user input ...
wikify(txt,place);
}
}
enjoy,
-e
Eric Shulman
TiddlyTools / ELS Design Studios
----
TiddlyTools needs YOUR financial support...
Help ME to continue to help YOU...
make a generous donation today:
http://www.TiddlyTools.com/#Donations
Professional TiddlyWiki Consulting Services...
Analysis, Design, and Custom Solutions:
http://www.TiddlyTools.com/#Contact
--
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.