Open nqtuyen opened 4 years ago
Hi, could you, please, provide the config you use during plugin initialization.
Hi, this is my config. pls give me your solutions, thank you so much! I use it in ASP.NET MVC projects. I store datajson to db and reload when edit.
$("#editor").brickyeditor({ templatesUrl: "/design/templates/", blocksUrl: '/design/datajson/@Model.Id',
onload: function (editor) {
$("#renderHtmlBtn").on("click", function () {
var html = editor.getHtml();
$('#renderHtml').val(html);
});
},
onChange: function (blocksJson, blocksHtml) {
$('#renderHtml').val(JSON.stringify(blocksJson));
}
});
pls help me. Thanks!
jquery.brickyeditor.js:426 Uncaught (in promise) TypeError: blocks.forEach is not a function at Editor.loadBlocks (jquery.brickyeditor.js:426) at Editor. (jquery.brickyeditor.js:335)
at step (jquery.brickyeditor.js:31)
at Object.next (jquery.brickyeditor.js:12)
at fulfilled (jquery.brickyeditor.js:3)