mirror of
https://github.com/logseq/logseq.git
synced 2026-05-03 18:36:43 +00:00
Enhance/pdf improvements (#6475)
Full-text search, highlights and assets alias support
It also exposes a plugin API for highlight context menu
```ts
/**
* Current it's only available for pdf viewer
* @param label - displayed name of command
* @param action - callback for the clickable item
* @param opts - clearSelection: clear highlight selection when callback invoked
*/
registerHighlightContextMenuItem: (
label: string,
action: SimpleCommandCallback,
opts?: {
clearSelection: boolean
}
) => unknown
```
This commit is contained in:
@@ -291,15 +291,6 @@ export const toPosixPath = (input) => {
|
||||
return input && input.replace(/\\+/g, '/')
|
||||
}
|
||||
|
||||
// Delegation of Path.js but unified into POXIS style
|
||||
// https://nodejs.org/api/path.html#pathparsepath
|
||||
// path.parse('/home/user/dir/file.txt');
|
||||
// Returns:
|
||||
// { root: '/',
|
||||
// dir: '/home/user/dir',
|
||||
// base: 'file.txt',
|
||||
// ext: '.txt',
|
||||
// name: 'file' }
|
||||
export const nodePath = Object.assign({}, path, {
|
||||
basename (input) {
|
||||
input = toPosixPath(input)
|
||||
|
||||
Reference in New Issue
Block a user