This plugin rocks!!! Thanks to Eric!
Eric Shulman於 2008年1月21日星期一UTC+8上午12時34分11秒寫道:
>
> > > I have been using this markup to post photos
> > > [img[NewYearEveTable.jpg]]
> > > But I'd like to apply (at least) width and height markup like standard
> > > html
> > > <img src="NewYearEveTable.jpg" width="300" height="200" />
> > I'm working on a new plugin ("ImageSizePlugin") that will extend the
> > [img[...]] syntax to let you specify width/height, using something
> > like:
> > "[img(x,y)[...]]"
> > where x and y are any valid CSS width/height attribute values (e.g.,
> > "300px", "30em", "80%", etc.)
>
> http://www.TiddlyTools.com/#ImageSizePlugin
>
> is now available. The new, extended image syntax is: [img(x,y)[...]]
>
> where x and y are the desired width and height of the image, specified
> using CSS units of measurement (e.g., px, em, cm, in, or %).
>
> Using % will make the image 'auto-stretch/shrink' in response to
> changes in the window size. Using 'em' will adjust the image based on
> the font size of the containing element. All other measurement units
> produced fixed-sized images.
>
> Use auto (or omit the value) for either width OR height to scale image
> proportionally, e.g., [img(200px,auto)[file.jpg]]
>
> Of course, if you omit the (x,y) portion of the syntax or use
> "(auto,auto)", the 'native' size of the image (as stored in the gif/
> jpg/png file) will be displayed.
>
> Plus... you can also **calculate a CSS value on-the-fly** by using
> {{...}} to insert javascript code in place of either (or both) of the
> CSS value(s), e.g.:
> [img({{...}},{{...}})[file.jpg]].
>
> This allows you to change the size of the image based on values set by
> other plugins, scripts or even the <<option>> macro, e.g.:
> <<option txtLogoWidth>> <<option txtLogoHeight>>
> and
> [img({{config.options.txtLogoWidth}},
> {{config.options.txtLogoHeight}})[images/logo.jpg]]
>
> enjoy
> -e
> Eric Shulman
> TiddlyTools / ELS Design Studios
>
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/tiddlywiki?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.