Package Exports
- @editorjs/caret
- @editorjs/caret/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@editorjs/caret) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@editorjs/caret
Utils useful for work with caret for Editor.js tools development
Installation
npm install @editorjs/caretFunction list
- checkContenteditableSliceForEmptiness - Checks content at left or right of the passed node for emptiness.
- focus - Set focus to contenteditable or native input element
- getCaretNodeAndOffset - Returns TextNode containing a caret and a caret offset in it
- getContenteditableSlice - Returns slice of the contenteditable html element from caret position to the start or end (depending on direction)
- getRange - Returns the first range
- isCaretAtEndOfInput - Checks if caret is at the end of the passed input
- isCaretAtStartOfInput - Checks if caret is at the start of the passed input
- save - Saves caret position using hidden
About CodeX
CodeX is a team of digital specialists around the world interested in building high-quality open source products on a global market. We are open for young people who want to constantly improve their skills and grow professionally with experiments in cutting-edge technologies.
| 🌐 | Join 👋 | ||
|---|---|---|---|
| codex.so | codex.so/join | @codex_team | @codex_team |