IMG resize advice wanted
James Hale
james at thehales.id.au
Wed Mar 30 20:52:09 EDT 2016
Tom asked
> Nice script!
The script was present when I previewed the post. Had it between <raw></raw> tags.
>
> 1) What method are you using to embed those images in your field?
The text being displayed was xhtml stripped of everything that wasn't needed as it was being displayed in a field using the htmltext property.
So the images were <a img=...> tags which LC interprets as a CHARACTER replacement. Hence my putting a <p></p> around the <a img...> to ensure the image was on a line by itself to ensure I had the full field width for display.
As it is a character replacement, as far as a field is concerned, the 'fixed line height' needs to be false or the height of any image will be whatever line height setting the field has.
> 2) For smaller images, are you able to inset them within the text and have
> text wrap around, such as a small picture inset at the start of a paragraph?
> (I've been able to place the image at the start, but not able to get the
> paragraph of text to wrap it.)
Text wrap around is not possible using this method as the image is being treated as a character by the field. Indeed I am not aware of any way to have this just happen. Text fields in LC do an awful lot of things but not that. For the case you mention, a bit like a pictorial drop cap, it could be fudged with three fields but it would require you to know the size of the image and then split the text into a first line (with image) then the lines to take you to the end of the image, displayed in a second field placed appropriately and finally the rest of the text in a third field from the bottom of the other two.
Messy. Also would not be able to select text across these lines at the top across the fields.
>
James
More information about the use-livecode
mailing list