| Conforms to | |
| Framework | /System/Library/Frameworks/WebKit.framework |
| Availability | Available in Mac OS X v10.2 with Safari 1.0 and later. Available in Mac OS X v10.2.7 and later. |
| Companion guide | |
| Declared in | WebDocument.h |
WebDocumentText is an optional protocol for document view objects that display text. This protocol defines methods for accessing document content as strings, and methods for text selection. Classes that adopt this protocol should also adopt WebDocumentView and inherit from NSView.
– string required method
– attributedString required method
– selectAll required method
– deselectAll required method
– selectedString required method
– selectedAttributedString required method
– supportsTextEncoding required method
Returns the entire content of the web document as an attributed string. (required)
- (NSAttributedString *)attributedString
An attributed string containing the entire content of the web document.
WebDocument.hDeselects the currently selected text in the web document. (required)
- (void)deselectAll
WebDocument.hSelects all the text in the web document. (required)
- (void)selectAll
WebDocument.hReturns the currently selected text in the web document as an attributed string. (required)
- (NSAttributedString *)selectedAttributedString
An attributed string containing the currently selected text in the web document.
WebDocument.hReturns the currently selected text in the web document as a string. (required)
- (NSString *)selectedString
The currently selected text in the web document.
WebDocument.hReturns the entire content of the web document as a string. (required)
- (NSString *)string
The entire content of the web document.
WebDocument.hReturns a Boolean value that indicates whether the web document supports text encoding. (required)
- (BOOL)supportsTextEncoding
YES if the web document supports text encoding; otherwise, NO.
WebDocument.hLast updated: 2009-03-04