jsoneditor icon indicating copy to clipboard operation
jsoneditor copied to clipboard

MouseOver event

Open TakhirMamirov opened this issue 4 years ago • 1 comments

Is there any onMouseOver event handler for a Tree mode, so I could make relevant actions when the row is changed?

Preamble: I need an inline Copy button to copy the node path from the JSON tree, and having onEvent handler I can get that path. The problem is that onEvent is fired only when I mouse over only a JSON key, but I would want to fire when I mouse over the whole row and the row is changed then.

Or maybe there's another way to add a custom HTML renderer into a raw?

TakhirMamirov avatar Oct 19 '20 10:10 TakhirMamirov

Thanks for your question Takhir. There is indeed no such an event handler. You could try attach your own event listener to the root of the editor but the propagation of the events may be stopped by the editor, I'm not sure.

We have a plan which should make it easy to create a custom button like the copy button you're implementing: #738

josdejong avatar Oct 21 '20 15:10 josdejong