Re: HTML + CSS specs used in the WebKit for NSTextView
Re: HTML + CSS specs used in the WebKit for NSTextView
- Subject: Re: HTML + CSS specs used in the WebKit for NSTextView
- From: Yvon Thoraval <email@hidden>
- Date: Tue, 5 Jul 2005 20:16:19 +0200
Le 5 juil. 05 à 19:27, Douglas Davidson a écrit :
I'm not sure exactly what you are asking, but Safari does use
WebKit and is representative of it.
exactly what you've answer fo ;-)
The Cocoa text system also uses WebKit for its HTML import
functionality, and so will at least parse whatever WebKit does, but
support is of course limited to the intersection of the features of
HTML and those of the text system.
the question was because i thought css in a NSTextView is far below
safari possibility
here is a screenshot of NSTextView : <http://yvon-thoraval.com/cocoa/
cjCave-2.png>
and here the "same" css within safari <http://yvon-thoraval.com/
VinePlants/pinot-noir.html>
its screenshot : <http://yvon-thoraval.com/cocoa/safari.png>
remarks the text around the image isn't the same for the given css :
<code>
<style type="text/css">
#containerG {float:left;margin-top: -50px;margin-right:
25px;margin-bottom:10px;text-align:center;}
#containerD {margin-top:50px;margin-left:25px;}
#containerD h3 {text-indent:-10px;}
</style>
</code>
float:left; and negative margin aren't working on NSTextView...
the way i've done that (Cocoa-Java) is straitforward :
<code>
NSData htmlData = new NSData(theText.getBytes());
NSAttributedString s = new NSAttributedString(((NSData)
htmlData), new NSMutableDictionary());
vinePlantTextView.textStorage().setAttributedString(s);
</code>
"vinePlantTextView" being the NSTextView and "theText" being the html
text.
do you think they are written and accessible specifications for css
into a NSTextView ???
regards,
Yvon
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden