@cocreate/selection 1.13.1 → 1.13.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [1.13.2](https://github.com/CoCreate-app/CoCreate-selection/compare/v1.13.1...v1.13.2) (2024-09-21)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * selection returns start and end ([80f91c9](https://github.com/CoCreate-app/CoCreate-selection/commit/80f91c944e55013fd6c0e3a1eb19052fafc08c47))
7
+
1
8
  ## [1.13.1](https://github.com/CoCreate-app/CoCreate-selection/compare/v1.13.0...v1.13.1) (2024-06-23)
2
9
 
3
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cocreate/selection",
3
- "version": "1.13.1",
3
+ "version": "1.13.2",
4
4
  "description": "A simple selection component in vanilla javascript. Easily configured using HTML5 data-attributes and/or JavaScript API.",
5
5
  "keywords": [
6
6
  "selection",
package/src/index.js CHANGED
@@ -27,7 +27,7 @@ export function getSelection(element) {
27
27
 
28
28
  if (contenteditable) {
29
29
  element = contenteditable;
30
- } else return
30
+ } else return { start: range.startOffset, end: range.endOffset }
31
31
 
32
32
  let domTextEditor = element;
33
33
  if (!domTextEditor.htmlString) {