Closed neha291994 closed 3 years ago
Hello @neha291994
There is no exists export button by default.
The export function returns an object. You can do whatever you want with it (Download, send by get or post, display on screen, save to variable).
var exportdata = editor.export();
console.log(exportdata)
For example in demo https://jerosoler.github.io/Drawflow/ show info popup.
Jero
Thank you for the response. It worked a for me.
can you please help in import a json file .I'm trying to call import function with the desired json data.Its doing nothing.
Hello, @neha291994
How are you trying to import it? Did you get an error in the Javascript console?
First with export saved in database .and then importing it .
No error shown in console if i pass the export function data(json data ) to import function .
Print in console your jsondata before import.
it's showing jsondata in console.
Compare how the data is displayed in the javascript console.
const data = editor.export (); console.log (data);
and your import data. console.log (jsondata);
is different? Is it displayed differently?
Pass image of the two data.
If this const data = editor.export () or the data with correct json data format is passed to import function, does it will generate the flowchart automatically ?
or i need to add some additional functionality?
@neha291994
Simple:
var exportdata = editor.export();
editor.import(exportdata);
View example: Download and change src from javascript and style. Or clone repository and run with npm run dev.
https://github.com/jerosoler/Drawflow/blob/master/test.html
Click button "Export"
Remove element.
And click "ImportFromExport"
ok thanks a lot for the response.
Where is the generated JSON file is downloaded ?