Skip to content

Commit 1540d8e

Browse files
jenstroegerpeyerluk
authored andcommitted
chore: Fix a few of the example comments.
1 parent 2171aea commit 1540d8e

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

examples/index.html

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -140,21 +140,22 @@ <h2 class="example-title">iFrame</h2>
140140
<h2 class="example-title">Setup</h2>
141141

142142
<pre><code class="language-javascript">
143+
// create a new Editable object, and configure it as needed
143144
var editable = new Editable({
144-
// here you can pass an iframe window if required
145+
// here you can pass an iframe window if required (default: main window)
145146
window: window,
146147

147-
// activate the default behaviour for merge, split and insert
148+
// activate the default behaviour for merge, split and insert (default: true)
148149
defaultBehavior: true,
149150

150-
// fire selection events on mouse move
151+
// fire selection events on mouse move (default: false)
151152
mouseMoveSelectionChanges: false,
152153

153-
// control the 'spellcheck' attribute on editable elements
154+
// control the 'spellcheck' attribute on editable elements (default: true)
154155
browserSpellcheck: true
155156
});
156157

157-
// add and initialize a block element to be made editable
158+
// add and initialize a block element to make it editable
158159
editable.add(elem)
159160
</code></pre>
160161

@@ -204,7 +205,7 @@ <h2 class="example-title">Events</h2>
204205
<h4>
205206
<span>focus</span> <span>blur</span>
206207
</h4>
207-
<p>Fired when when editable block gets focus and after it is blurred. </p>
208+
<p>Fired when when an editable block gets focus and after it is blurred. </p>
208209

209210
<div class="code-example">
210211
<h3>Example:</h3>
@@ -253,7 +254,7 @@ <h3>Example:</h3>
253254
<h4>
254255
<span>cursor</span>
255256
</h4>
256-
<p>Fired when the user selects some text inside an editable block.</p>
257+
<p>Fired when the user moves the cursor within an editable block.</p>
257258

258259
<div class="code-example">
259260
<h3>Example:</h3>
@@ -275,7 +276,7 @@ <h3>Example:</h3>
275276
<h4>
276277
<span>change</span>
277278
</h4>
278-
<p>Fired when the user selects some text inside an editable block.</p>
279+
<p>Fired when the user changes the content of an editable block.</p>
279280

280281
<div class="code-example">
281282
<h3>Example:</h3>
@@ -336,7 +337,7 @@ <h3>Example:</h3>
336337
<h4>
337338
<span>insert</span>
338339
</h4>
339-
<p>Fired when the user presses enter (&#x23ce;) at the beginning or end of an editable (For example you can insert a new paragraph after the element if this happens).</p>
340+
<p>Fired when the user presses enter (&#x23ce;) at the beginning or end of an editable (for example you can insert a new paragraph after the element if this happens).</p>
340341

341342
<p class="edit-example">
342343
The end<span class="cursor">&nbsp;</span>
@@ -412,7 +413,7 @@ <h4>
412413
<span>switch</span>
413414
</h4>
414415

415-
<p>Fired when the user pressed an arrow key at the top or bottom so that you may want to set the cursor into the preceding or following editale element.</p>
416+
<p>Fired when the user presses an arrow key at the top or bottom so that you may want to set the cursor into the preceding or following editable element.</p>
416417

417418
<div class="code-example">
418419
<h3>Example:</h3>

0 commit comments

Comments
 (0)