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

feat: Expose nodes that are being highlighted #70

Closed
4 tasks done
xxholly32 opened this issue Aug 1, 2023 · 1 comment
Closed
4 tasks done

feat: Expose nodes that are being highlighted #70

xxholly32 opened this issue Aug 1, 2023 · 1 comment

Comments

@xxholly32
Copy link

xxholly32 commented Aug 1, 2023

Before you start, please make sure to:

  • Read the doc
  • Have tried the latest version
  • Search to see if your issue already exists
  • Look for / ask questions on Stack Overflow

What problem does this feature solve?

In readonly mode, the user can select the corresponding node, which often needs to obtain the information of the user's click in another scenario. So I wonder if I can throw an event to the outside when the user clicks on the node

What does the proposed API look like?

Name Description Type
click triggers after a node click ^[Function]`(node: any, clickNode:string === 'key'
@cloydlau
Copy link
Owner

cloydlau commented Aug 1, 2023

Hello, I think you should be able to find some relevant APIs in the doc.
See josdejong/svelte-jsoneditor#163
Or

document.querySelector('.jse-contents').addEventListener('click', (e) => {
  console.log(e.target.innerText)
})

@cloydlau cloydlau closed this as not planned Won't fix, can't repro, duplicate, stale Aug 1, 2023
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

No branches or pull requests

2 participants