Thanks Eric!

I've tried this on 2 or 3 images, and it seems to be working well.
Guess I'll be doing a bit of cutting and pasting this weekend.

Thanks!
Mark

On May 23, 10:19 am, Eric Shulman <[email protected]> wrote:
> > If there is a way to access images embedded with the AttachFilePlugin
> > in CSS, then maybe the tree could be completely contained in the TW.
>
> The good news is that AttachFilePluginFormatters -- the 'runtime'
> rendering functions that handle 'attachment tiddlers' -- already
> supports the use of attached images within the StyleSheet.
>
> When a tiddler containing the [[TiddlerName]] syntax is *displayed*,
> it usually just renders a link to another tiddler.  However, if this
> syntax occurs within your StyleSheet then, when the CSS in the
> StyleSheet tiddler is *processed*, any instances of [[...]] will also
> be used to *insert* the contents of the indicated tiddler directly
> into the CSS *before* it is passed to the browser for further
> handling.
>
> This use of [[...]] has been enhanced by AttachFilePluginFormatters to
> recognize tiddlers tagged with 'attachment' as a special case and,
> rather than inserting the entire contents of the attachment tiddler,
> it automatically retrieves a URL -- either data://, file://, or http://
> -- based upon the attachment definition, and then inserts that URL
> into the CSS before further processing.
>
> Thus, using the CSS standard syntax for embedding a background image:
>    .someClass { background-image: url('...'); }
> you can easily insert a URL from an attachment tiddler, like this:
>    .someClass { background-image: url('[[SomeTiddler]]'); }
>
> enjoy,
> -e
> Eric Shulman
> TiddlyTools / ELS Design Studios
--~--~---------~--~----~------------~-------~--~----~
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