Re: text appears, but styling is gone
Re: text appears, but styling is gone
- Subject: Re: text appears, but styling is gone
- From: has <email@hidden>
- Date: Tue, 14 Jan 2003 10:18:15 +0000
Philippe GRUCHET wrote:
>>> BTW, is it just me, or do Safari, TextEdit, etc. lose style
>>> information when you get the text of a document?
>>> [...]
> But not unstyled text: what comes back is styled Unicode text, but the
style is plain (and always the same). Which doesn't make sense to me.
If it's by design, I'd like to know why; if not, I'd assume it's a bug
of some sort.
Unicode is not a style but the universal alphabetic code.
From the AppleScript.component dictionary:
Class styled Unicode text : styled text in the Unicode format
Plural form:
styled Unicode text
What comes back from Safari, TextEdit, et-al is a value of type
'styled Unicode text' [1], which contains textual data plus style
data. However, the style information is always the same short data
block and doesn't reflect the styles of the document from which the
text was taken.
It's odd: why return a styled text type, not a plain text type, if
styles aren't portable outside the app? And frustrating, as there's
no easy way to transfer styled content from one application to
another. Might be a bug, or a still-to-be-implemented feature, or
something else completely - it'd be good to know.
Thanks,
has
[1] Note that AS still reports the value's class as 'Unicode text',
not 'styled Unicode text'.
--
http://www.barple.pwp.blueyonder.co.uk -- The Little Page of AppleScripts
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.