Closed Gorgona9 closed 6 years ago
@Gorgona9 If I understand your question, this is how you can get the html data from your Mosaico plugins, which you define as part of your initialization:
var plugins = [
function (viewModel) {
var saveCmd = {
name: 'Save Command',
enabled: ko.observable(true)
};
saveCmd.execute = function () {
saveCmd.enabled(false);
// Here is the Mosaico data
var html = viewModel.exportHTML();
var json_data = viewModel.exportJSON();
var meta = viewModel.exportMetadata();
saveCmd.enabled(true);
};
viewModel.save = saveCmd;
}
];
thank You so much.
Hello.... I've included mosaico editor in my angularJS app. And now I have a proble. As it should be a part of a page and its output html should join to the rest of data to be send to backend. How can I get the output html? not download but thrown out of the page so I can get it in other angularjs page?