Skip to content

Commit

Permalink
add API getSerializedRangeFromUid; bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinWang15 committed Sep 30, 2021
1 parent d9a1002 commit 4297c34
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@notelix/web-marker",
"version": "1.0.12",
"version": "1.0.13",
"description": "a web page highlighter",
"main": "./build/web-marker.js",
"types": "./build/libroot.d.ts",
Expand Down
4 changes: 4 additions & 0 deletions src/lib/classes/Marker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -686,6 +686,10 @@ class Marker {
range.setEnd(prevNode, this.getInnerText(prevNode).length);
}
}

public getSerializedRangeFromUid(uid: string): SerializedRange | null {
return this.state.uidToSerializedRange[uid] || null;
}
}

export default Marker;

0 comments on commit 4297c34

Please sign in to comment.