Closed Refss closed 1 year ago
Nevermind. The documentation for it is under Validation, my bad. I tried looking for the keyword "event" the whole time.
https://retejs.org/docs/concepts/plugin-system
If you are using TS it will be easy to checkwhat values can be in the type
property
editor.addPipe(context => {
context.type // connectioncreate, connectioncreated, etc
return context
}
Example: https://github.com/retejs/readonly-plugin/blob/next/src/index.ts
Also is there a list available of all the events thrown by rete.js, like there used to be for Version 1?
I'm planning to add events in the Migration guide
Hey there,
I'm having trouble figuring out how to listen to events thrown by rete.js. In the previous version, I could use "editor.on..." to do this, but I'm struggling to do the same with Version 2. I tried searching for solutions in the documentation, but couldn't find anything helpful. So, I thought it would be a good idea to ask for help here. I am specifically looking to listen to the following events: "deleting a node" and "creating a connection". I am also wondering if I can "abort" creating a connection.
Also is there a list available of all the events thrown by rete.js, like there used to be for Version 1?
Thanks a lot for your help and your work on rete!
Best regards, Ref