How can I update the rendered HTML for a node, I don't care about export
See original GitHub issuethis is what I tried:
var id = '1';
var node = editor.drawflow.drawflow.Home.data[id];
node.html = '<div>HELLO WORLD</div>';
editor.updateNodeDataFromId(id, {});
I was hoping to update the HTML visible, but it doesn’t work. This is read-only HTML and no input
or textarea
is involved, so df-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
directly
any suggestions would be appreciated !
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Render HTML file in Node.js and Express.js framework
In this short tutorial, I am going to explain to you how to render HTML files in a custom NodeJS and ExpressJS Server....
Read more >Render basic HTML view? - Stack Overflow
ejs will tell the view system to require('ejs') , the module being loaded must export the method exports.render(str, options) to comply with Express,...
Read more >Upgrade your Node app: From CommonJS to ES Modules
1) Prepare your code · 2) Update the package.json · 3) Convert all imports and exports · 4) Fix imports and exports ·...
Read more >Advanced Features: Static HTML Export - Next.js
Export your Next.js app to static HTML, and run it standalone without the need of a Node.js server.
Read more >Understanding Modules and Import and Export Statements in ...
Rendered HTML with the values 10 and 5 and the results of the ... update your functions.js file to be a module and...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hello @shubhambattoo
You have to update the json as well.
View: https://github.com/jerosoler/Drawflow/issues/40
If I understand you correctly then this would be one way I think:
var t = document.querySelector(".drawflow-node[id='node-1'] .drawflow_content_node");