pagedown-bootstrap
pagedown-bootstrap copied to clipboard
Hooks on the editor object
I'd really like to use this version of the pagedown editor, but I'm having trouble figuring out how to hook up to the editor's onPreviewRefresh event. The standard pagedown editor has the following example in the wiki:
editor.hooks.chain("onPreviewRefresh", function () {
console.log("the preview has been updated");
});
However, I'm not sure how I'd do something similar using pagedown-bootstrap. Any help is much appreciated!
https://gist.github.com/kevinoconnor7/5432376#file-advancedusage-html
That should show off how to do it.
That shows how to access the hooks available for the converter. I was interested in the onPreviewRefresh event/hook, on the editor. I've already made modifications to the pagedownBootstrap initialization that works. I've forked your repo and will probably submit a pull request with those changes when I've got them properly tested.