Skip to content

Commit

Permalink
Docs: adding description. [short flow]
Browse files Browse the repository at this point in the history
  • Loading branch information
godai78 committed Oct 31, 2023
1 parent ec0ad4b commit 4ad9564
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docs/examples/how-tos.md
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,9 @@ for ( const value of range.getWalker() ) {

### How to find words in a document, and get their ranges?

```
If you need to search a text fragment and remap it to its model position, use the following example. It will find all words available in the document root, create a model range based on these and feed them into the console.

```js
const model = editor.model;
const rootElement = model.document.getRoot();
const rootRange = model.createRangeIn( rootElement );
Expand Down

0 comments on commit 4ad9564

Please sign in to comment.