I'm currently having a custom node, which I've created.
What I need is, to do something when the Done
(id: node-dialog-ok) button is clicked from the editor-tray-toolbar instead of the default functionalities.
Is it possible to override the onclick
event of the button?
Or how could I use it in my favor, within my node itself if I'm to just print an alert
when the Done
button is being clicked? I'm still new to this, so please do bare, for me being obscure.
Any help could be appreciated. Thanks!
You want the oneditsave
call back in the node HTML file.
The docs for creating the HTML file are here
oneditsave: (function) called when the edit dialog is okayed. See custom edit behaviour.
<script type="text/javascript">
RED.nodes.registerType('node-type',{
// node definition
oneditsave: function() {
....
}
});
</script>