-
-
Notifications
You must be signed in to change notification settings - Fork 743
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How can I update the rendered HTML for a node, I don't care about export #172
Comments
If I understand you correctly then this would be one way I think: |
That you comment @SamuraiDante is correct. |
@SamuraiDante thank you, that helps ! in case this helps anyone else, I found that let me know if that is an ok approach @jerosoler - and thank you very much for this awesome library ! |
@jerosoler I tried the following code to update the html inside the node, but when I try const el = document.querySelector(
`.drawflow-node[id='node-1'] .drawflow_content_node`
);
el.innerHTML = `<div id="my-id" class="box"> New Inner Text </div>`; |
Hello @shubhambattoo You have to update the json as well. editor.drawflow.drawflow.Home.data[5].html = "...." View: #40 |
@jerosoler Yeah that worked. Thanks. |
this is what I tried:
I was hoping to update the HTML visible, but it doesn't work. This is read-only HTML and no
input
ortextarea
is involved, sodf-name
won't work. I know how to update the data, but here I want the HTML to "update".my use case is there is a separate edit popup, and after closing that, I want the respective node to "redraw".
is there a way to get the HTML DOM reference of a node ? I can then set the
innerHTML
directlyany suggestions would be appreciated !
The text was updated successfully, but these errors were encountered: