-
Notifications
You must be signed in to change notification settings - Fork 34
Modules
Aferdita Muriqi edited this page Nov 11, 2019
·
2 revisions
<script>
D2Reader.load({
url: new URL("http....."),
rights: {
enableBookmarks: true
},
api: {
addBookmark: function (bookmark) {
return new Promise(function (resolve, reject) {
bookmark.id = Math.random()
resolve(
bookmark
)
})
},
deleteBookmark: function (bookmark) {
return new Promise(function (resolve, reject) {
resolve(
bookmark
)
})
}
}
}).then(instance => {
console.log("D2Reader loaded ", instance);
}).catch(error => {
console.error("error.message ", error.message);
});
</script>
D2Reader.saveBookmark()
<button onclick="javascript:D2Reader.saveBookmark()">add bookmark</button>
D2Reader.deleteBookmark(<#json#>)
<button onclick="javascript:D2Reader.deleteBookmark({id:123})">delete bookmark</button>
- GitHub Package
- Initialize Reader
-
Injectables
- Readium CSS
- Footnotes
- Glossary
- Fonts
- Pagebreak
- Injectable Context Menu
-
Reader API
- User Settings API
- Navigator API
- Bookmark API
- Annotation API
- TTS API
- Search API
- Callback API
-
Modules
- Bookmarks
- Annotations
- Search
- TTS