Skip to content

Instantly share code, notes, and snippets.

Luna Graysen non-binary

View GitHub Profile
View custom-button-toolbar-example.js
const toolbarItems = PSPDFKit.defaultToolbarItems;
let pagerIndex = toolbarItems.findIndex(item => item.type == "pager");
toolbarItems.splice(pagerIndex - 1, 0, {
type: "custom",
title: "click me",
onPress: function() {
console.log("click");
}
});
You can’t perform that action at this time.