jerosoler / Drawflow

Simple flow library 🖥️🖱️
https://jerosoler.github.io/Drawflow/
MIT License
4.42k stars 714 forks source link

Custom function call on each node #732

Open hashiranwaar opened 1 year ago

hashiranwaar commented 1 year ago

Hi Jero, First of all, I appreciate your efforts on Drawflow, it is life-saving for me.

I have attached a screenshot, you may see I have developed custom Control Blocks. I want to load custom data (maybe a list of events in a select box or a list of templates for specific channels). I am not good in JS, I am not able to add functions in your minified draflow.min.js file. What is the best approach to adding my custom features in drawflow.

PS: I am developing a Flow for customers, who did some specific event and after that, I send them some specific emails/sms, etc.

image

jerosoler commented 1 year ago

You can add new features with:

editor.yourname = function () {
...
}

Or:
You can load the drawflow file like this: