jerosoler / Drawflow

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

How I can update html and data? when I click to node I need to fill data and then update #645

Closed mushzak closed 1 year ago

mushzak commented 1 year ago
image
mushzak commented 1 year ago

Here I want to update the name and description, can you help, please?

mushzak commented 1 year ago

I know that I can use editor.updateNodeFromId and send {data}, but how I can use it for updating existing nodes? can I use data ? and if yes how?

jerosoler commented 1 year ago

View:

or:

mushzak commented 1 year ago

df-* this is working but it is for form elements, but as you can see in my screenshot there are no inputs, name and description

jerosoler commented 1 year ago

You can use df attributes without form, only for save information.

If you only want to modify the html you will have to update the template and the html.

Example adding input to node: in html and save for export.

https://github.com/jerosoler/Drawflow/issues/226#issuecomment-901025520

mushzak commented 1 year ago

can I do something like <span df-NAME></span>?

jerosoler commented 1 year ago

No, the html is not updated automaticaly. It would have to be forced as i specified before.

Maybe you could try an input type disabled.

mushzak commented 1 year ago

will try thanks