Protocol

WebDocumentText

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.

Symbols

Getting document content

func string()
Required.

Returns the entire content of the web document as a string.

func attributedString()
Required.

Returns the entire content of the web document as an attributed string.

Selecting and deselecting text

func selectAll()
Required.

Selects all the text in the web document.

func deselectAll()
Required.

Deselects the currently selected text in the web document.

func selectedString()
Required.

Returns the currently selected text in the web document as a string.

func selectedAttributedString()
Required.

Returns the currently selected text in the web document as an attributed string.

Text encoding

func supportsTextEncoding()
Required.

Returns a Boolean value that indicates whether the web document supports text encoding.

Relationships

Inherits From