Skip to content
This repository was archived by the owner on Nov 1, 2022. It is now read-only.

Hooks on the editor object #4

Open
greg-galbraith opened this issue Feb 24, 2014 · 2 comments
Open

Hooks on the editor object #4

greg-galbraith opened this issue Feb 24, 2014 · 2 comments

Comments

@greg-galbraith
Copy link

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!

@kevinoconnor7
Copy link
Owner

@greg-galbraith
Copy link
Author

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants