replaceSelection(with:)
Replaces the current selection with an archive’s contents.
Declaration
@MainActor func replaceSelection(with archive: WebArchive!)Parameters
- archive:
The archive that replaces the current selection.
Discussion
If the current selection is collapsed (a range is selected with the same nodes and offsets for the start and end) then no content is removed when inserting the archive, and the selection is collapsed and moved to the end of the inserted content. If no content is selected, the archive is not inserted.
See Also
Editing Documents
replaceSelection(with:)replaceSelection(withText:)replaceSelection(withMarkupString:)deleteSelection()moveToBeginningOfSentence(_:)moveToBeginningOfSentenceAndModifySelection(_:)moveToEndOfSentence(_:)moveToEndOfSentenceAndModifySelection(_:)selectSentence(_:)toggleContinuousSpellChecking(_:)toggleSmartInsertDelete(_:)canMakeTextStandardSizemakeTextStandardSize(_:)maintainsInactiveSelection