From b82443d6b23c2d3ea0da898d263e454c1eb1261e Mon Sep 17 00:00:00 2001 From: LeviDing Date: Sat, 4 Apr 2020 16:40:05 +0800 Subject: [PATCH] Update article.md --- 2-ui/99-ui-misc/02-selection-range/article.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/2-ui/99-ui-misc/02-selection-range/article.md b/2-ui/99-ui-misc/02-selection-range/article.md index 1fcd1808..6f4d6814 100644 --- a/2-ui/99-ui-misc/02-selection-range/article.md +++ b/2-ui/99-ui-misc/02-selection-range/article.md @@ -194,9 +194,9 @@ Others: To manipulate the content within the range: -- `deleteContents()` - remove range content from the document -- `extractContents()` - remove range content from the document and return as [DocumentFragment](info:modifying-document#document-fragment) -- `cloneContents()` - clone range content and return as [DocumentFragment](info:modifying-document#document-fragment) +- `deleteContents()` -- remove range content from the document +- `extractContents()` -- remove range content from the document and return as [DocumentFragment](info:modifying-document#document-fragment) +- `cloneContents()` -- clone range content and return as [DocumentFragment](info:modifying-document#document-fragment) - `insertNode(node)` -- insert `node` into the document at the beginning of the range - `surroundContents(node)` -- wrap `node` around range content. For this to work, the range must contain both opening and closing tags for all elements inside it: no partial ranges like `abc`. @@ -318,8 +318,7 @@ There are events on to keep track of selection: ### Selection tracking demo -Here's a small demo that shows selection boundaries -dynamically as it changes: +Here's a small demo that shows selection boundaries dynamically as it changes: ```html run height=80

Select me: italic and bold