Re: CSS style string to NSAttributedString attributes conversion
Re: CSS style string to NSAttributedString attributes conversion
- Subject: Re: CSS style string to NSAttributedString attributes conversion
- From: "email@hidden" <email@hidden>
- Date: Fri, 9 Apr 2010 12:24:21 +0100
On 8 Apr 2010, at 17:19, Jens Alfke wrote:
>
> I'm not aware of anything that does this.
> Are you talking about parsing entire CSS files, or just a single "property: value;" rule?
> Even the simple case isn't that simple; CSS can be pretty complex. And most of the attributes don't map cleanly into AppKit text attributes.
I don't need complex CSS transposition just fairly simple CSS property: value to attributes.
The CSS -> attribute mapping doesn't need to be exact. Decent coverage of the major CSS text based properties would be enough
>
> —Jens
> AppKit doesn't expose anything to handle CSS by itself, but if CSS is applied to HTML, AppKit's HTML import will convert it to attributes on the text. You might be able to make use of that.
>
Thanks douglas. This approach might work.
> Douglas Davidson
Regards
Jonathan_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden