> Is there an option for <<tiddler>>, or some other macro, to just show > the tiddler text, without wrapping it in a <span> tag? > (Use case: I'm making a plugin that reads URLs from slice values. > Normally, it would be a standard HTTP URL, but if it's a long data: > URI, the user might prefer to dump the full data: URI in a separate > tiddler. But if there's no standard way to do it, I'll probably > provide a helper macro for the job, which would be trivial to > implement, but non-standard.)
Normally, you could simply write: <<tiddler TiddlerName::slicename>> to fetch and render the slice value. However, as you've noted, the <<tiddler>> macro creates a "transclusion wrapper" -- a span in which to render the transcluded content. This is in done in order to apply special attributes (refresh="content", tiddler="TiddlerName") that allows the core to locate the transclusion wrappers and automatically *refresh them* whenever their underlying tiddlers have changed, so that the rendered content can stay in sync with the stored data. Although it's unclear to me why you find this use of a containing span is undesirable, here's a way to bypass the normal action of the <<tiddler>> macro using an 'eval param' to directly wikify() and append output to the current 'place': <<tiddler {{wikify(store.getTiddlerText ('AttachFileSample##data'),place);'';}}>> Note that in the above example, the tiddler 'returns' a blank text string as the result of the eval param. Inasmuch as a blank string can never be a valid TiddlerName, this prevents the macro from retrieving and rendering specified tiddler content into the transclusion wrapper. However... the macro still *does* create an *empty* wrapper element as usual, immediately following the wikified content that was directly rendered by the eval param. If this empty wrapper span is not an issue, then I think that the above technique should meet your needs. However, if the empty span *is* a problem for you, then you could use http://www.TiddlyTools.com/#InlineJavascriptPlugin like this: <script> return store.getTiddlerText('TiddlerTitle::slicename'); </script> By design, any text returned from an inline script is wikified and rendered directly onto the end of the current 'place', without creating a transclusion wrapper element like the <<tiddler>> macro does. enjoy, -e --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TiddlyWikiDev" group. To post to this group, send email to tiddlywikidev@googlegroups.com To unsubscribe from this group, send email to tiddlywikidev+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/tiddlywikidev?hl=en -~----------~----~----~----~------~----~------~--~---