@@ -104,20 +104,20 @@ let selectPDomtree = {
104104drawHtmlTree (selectPDomtree, ' div.select-p-domtree' , 690 , 320 );
105105</script >
106106
107- Let's make a range for ` "Example: <i>italic</i>" ` .
108107
109- As we can see, this phrase consists of exactly two children of ` <p> ` , with indexes ` 0 ` and ` 1 ` :
108+ همانطور که می بینیم، این عبارت دقیقاً از دو فرزند ` <p> ` با نمایه های ` 0 ` و ` 1 ` تشکیل شده است :
110109
111110![ ] ( range-example-p-0-1.svg )
112111
113- - The starting point has ` <p> ` as the parent ` node ` , and ` 0 ` as the offset.
114112
115- So we can set it as ` range.setStart(p, 0) ` .
116- - The ending point also has ` <p> ` as the parent ` node ` , but ` 2 ` as the offset (it specifies the range up to, but not including ` offset ` ).
113+ - نقطه شروع ` <p> ` به عنوان ` node ` والد، و ` 0 ` به عنوان آفست است.
117114
118- So we can set it as ` range.setEnd(p, 2) ` .
115+ بنابراین میتوانیم آن را بهعنوان ` range.setStart(p, 0) ` تنظیم کنیم.
116+ - نقطه پایانی نیز ` <p> ` را به عنوان ` node ` والد، اما ` 2 ` را به عنوان آفست دارد (محدوده تا را مشخص می کند، اما ` offset ` را شامل نمی شود).
119117
120- Here's the demo. If you run it, you can see that the text gets selected:
118+ بنابراین میتوانیم آن را بهعنوان ` range.setEnd(p, 2) ` تنظیم کنیم.
119+
120+ در اینجا نسخه ی نمایشی است. اگر آن را اجرا کنید، می بینید که متن انتخاب شده است:
121121
122122``` html run
123123<p id =" p" >Example: <i >italic</i > and <b >bold</b ></p >
@@ -138,7 +138,7 @@ Here's the demo. If you run it, you can see that the text gets selected:
138138 </script >
139139```
140140
141- Here's a more flexible test stand where you can set range start/end numbers and explore other variants :
141+ در اینجا یک پایه تست انعطافپذیرتر وجود دارد که در آن میتوانید اعداد شروع/پایان محدوده را تنظیم کنید و انواع دیگر را بررسی کنیدد :
142142
143143``` html run autorun
144144<p id =" p" >Example: <i >italic</i > and <b >bold</b ></p >
@@ -161,7 +161,7 @@ From <input id="start" type="number" value=1> – To <input id="end" type="numbe
161161 </script >
162162```
163163
164- E.g. selecting in the same ` <p> ` from offset ` 1 ` to ` 4 ` gives us the range ` <i>italic</i> and <b>bold</b> ` :
164+ به عنوان مثال، انتخاب در همان ` <p> ` از آفست ` 1 ` تا ` 4 ` ، محدوده ` <i>italic</i> and <b>bold</b> ` را به ما میدهد :
165165
166166![ ] ( range-example-p-1-3.svg )
167167
0 commit comments