New features
- You can customize the bookmarks by using the
renderBookmarkItem
properly:
<Bookmark renderBookmarkItem={renderBookmarkItem} />
- The default layout plugin provides new
toggleTab
function to toggle a given tab in the sidebar:
const defaultLayoutPluginInstance = defaultLayoutPlugin();
const { toggleTab } = defaultLayoutPluginInstance;
// Toggle the second tab
toggleTab(1);
Improvement
- Clicking
Command
+ArrowUp
(on macOS) orCtrl
+ArrowUp
(on Windows) will bring users to the previous clicked link annotation.
You can disable that shortcuts via theenableShortcuts
option:
// Use the standalone page navigation plugin
const pageNavigationPluginInstance = pageNavigationPlugin({
enableShortcuts: false,
});
// Use the default layout plugin
const defaultLayoutPluginInstance = defaultLayoutPlugin({
toolbarPlugin: {
pageNavigationPlugin: {
enableShortcuts: false,
},
},
});
Bug fixes
- Clicking a particular bookmark might not go to the destination
- Targets of link annotations are sanitized to avoid secutiry issues
- The
CharacterMap
type isn't available - The
onPageChange
callback does not trigger if the current page equals to the initial page - The page navigation options are missing when creating a toolbar plugin
- The search popover always shows up after pressing shortcuts
- The viewer always navigates to previous, next pages after users press shortcuts even the document isn't focused