@ephox/robin
TypeScript icon, indicating that this package has built-in type declarations

10.4.1 • Public • Published

Description

robin is a project that groups sibling DOM nodes together by boundary points, for example the list of elements and nodes representing a word.

Installation

robin is available as an npm package. You can install it via the npm package @ephox/robin

Install from npm

npm install @ephox/robin

Usage

Text node traversal within text boundaries

Robin text search API functions generally operate on and navigate through text nodes rather than general DOM elements. Text searches also generally stop at boundary (block) elements such as DIVs.

Finding a text node, given an element

If you have a DOM element and need to find a specific contained text node and offset to start searching from then consider the phoenix DomDescent API functions freefallLtr() and freefallRtl() functions which, given an element, return a text node and offset from the left-most or right-most end of the element, respectively.

Tests

robin uses bedrock to run tests.

Running Tests

$ yarn test-manual $ yarn test

/@ephox/robin/

    Package Sidebar

    Install

    npm i @ephox/robin

    Weekly Downloads

    492

    Version

    10.4.1

    License

    MIT

    Unpacked Size

    766 kB

    Total Files

    476

    Last publish

    Collaborators

    • ephox
    • tinymce