Hello, I love bpmn.io , I am integrating it into WordPress and like to save the model (bpmn and svg) in the server via ajax call, where is the logic to control the file download? I searched the index.js file and couldn’t find it anywhere?
Thanks
Ralph
nikku
July 21, 2015, 2:42pm
2
Checkout the modeler example that provides a download button. Instead of downloading you can simply push it up to a REST back-end or the like.
1 Like
Thanks Nikku,
My question was how the download button work. It seems that it stores the contents of the xml in href tag.
Is there an API documentation for Renderer class?
Thanks very much.
nikku
July 22, 2015, 6:13am
4
No API documentation as of yet. We are going to set one up in the future.
Foen1x
July 22, 2015, 9:30am
5
I use this:
function saveSVG(done) {
renderer.saveSVG(done);
}
function saveDiagram(done) {
renderer.saveXML({ format: true }, function(err, xml) {
done(err, xml);
});
}
saveSVG(function(err, xml){
//do some ajax thing
});
saveDiagram(function(err, xml){
//do some ajax thing
});