Apple Developer Connection
Member Login Log In | Not a Member? Contact ADC

Next Page > Hide TOC

WebDocumentText Protocol Reference

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

Overview

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.

Tasks

Getting Document Content

Selecting and Deselecting Text

Text Encoding

Instance Methods

attributedString

Returns the receiver’s content, the entire document, as an attributed string.

- (NSAttributedString *)attributedString

Availability
See Also
Declared In
WebDocument.h

deselectAll

Deselects the receiver’s current selection.

- (void)deselectAll

Availability
See Also
Declared In
WebDocument.h

selectAll

Selects all the text in the receiver.

- (void)selectAll

Availability
See Also
Declared In
WebDocument.h

selectedAttributedString

Returns the receiver’s current selection as an attributed string.

- (NSAttributedString *)selectedAttributedString

Availability
See Also
Declared In
WebDocument.h

selectedString

Returns the receiver’s current selection as a string.

- (NSString *)selectedString

Availability
See Also
Declared In
WebDocument.h

string

Returns the receiver’s content, the entire document, as a string.

- (NSString *)string

Availability
See Also
Declared In
WebDocument.h

supportsTextEncoding

Returns YES if the receiver supports text encoding, NO otherwise.

- (BOOL)supportsTextEncoding

Availability
Declared In
WebDocument.h

Next Page > Hide TOC


Last updated: 2006-05-23




Did this document help you?
Yes: Tell us what works for you.

It’s good, but: Report typos, inaccuracies, and so forth.

It wasn’t helpful: Tell us what would have helped.
Get information on Apple products.
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Copyright © 2007 Apple Inc.
All rights reserved. | Terms of use | Privacy Notice