-
-
Notifications
You must be signed in to change notification settings - Fork 703
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
Edit node? #52
Labels
question
Further information is requested
Comments
Thank you for coming back.
I was able to work around this by removing and re-adding the nodes, then rebuilding the connections. It does require a lot of code to keep it in sync (I’m using Angular not Vue).
This library is one of my absolute favorites thank you for making it. (You should consider a pro version with support, it really is good).
Regards
Sam
From: Jero Soler <notifications@github.com>
Sent: 24 October 2020 16:09
To: jerosoler/Drawflow <Drawflow@noreply.github.com>
Cc: Sam Smith <sam@justaddfeatures.com>; Author <author@noreply.github.com>
Subject: Re: [jerosoler/Drawflow] Edit node? (#52)
Hello
Thanks!
There is currently no method. Maybe in the future.
Since when updating the html content, the data values would also have to be updated.
You can also update the html as mentioned in: #40<#40>
You will probably also need: #43<#43>
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#52 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ANIFG4BBU7N4R7FKRNBLMHTSMLUZHANCNFSM4S4ZEJAA>.
|
It's been a long time this issue is closed but facing the same issue I managed a workaround that looks a lot simpler to me. What I made from an angular app is something like this (simplified): @ViewChild('editor')
editorElementRef: ElementRef;
updateNodeHtml(nodeId: number, content: string): void {
const nodeContainer = this.editorElementRef.nativeElement.querySelector('#node-' + nodeId + ' .drawflow_content_node');
nodeContainer.innerHTML = content;
}
// ....
this.updateNodeHtml(1, '<h1>MyNewNodeContent</h1>'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
First off Drawflow is brilliant, thank you!
I couldn't see any method to actually update the content of an existing node, e.g. to change the layout in the template. Failing this, perhaps a redraw method which doesn't clear the IDs?
The use-case is to have my application change content, e.g. the title or icon or other HTML content, then display this change to the user.
Thanks!
Sam
The text was updated successfully, but these errors were encountered: