Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose API for registering callbacks when the PDF is clicked #155

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

JJK96
Copy link

@JJK96 JJK96 commented Apr 1, 2023

Possibility for registering a callback for receiving the piece of text that was clicked.

I'm working on an extension to synchronize this to my source format (similar to synctex).
Such an extension could hook into pdfviewer like this:

	var pdfviewer = vscode.extensions.getExtension('tomoki1207.pdf');
	if (pdfviewer) {
		pdfviewer.activate().then((api) => {
			api.registerOnClickCallback((content: string) => {
				channel.appendLine(content)
			})
		})
	}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants