Hook for Post Update?
-
Hi!
I found a list of all available events: https://github.com/NodeBB/NodeBB/wiki/HooksBut cannot find the one, which is responsible for the post update/load.
For example, when I finished editing my post and click "Submit" button, the original post in the topic page reloads. And I want to listen to that exact event.P.S. Is there a NodeBB hooks refence, where all the hooks are exaplained? Because in the list on Gihub I can only guess what each of the hooks means. And as practice shows, I didn't guess, because tried around 10 different hooks and failed.
-
@baris said in Hook for Post Update?:
action:post.edited
I tried it and it doesn't work. I think, this even is triggered when I click the "Submit" button. But after that, the post itself reloads on the topic page. And I need to catch that moment.
-
@baris said in Hook for Post Update?:
That is the hook that is fired after the post is refreshed on the page. How are you adding the listener for it?
I'm doing it exactly like this, like @PitaJ suggested earlier: https://community.nodebb.org/post/80958
I added your suggested hook as well:
$(window).on('action:posts.loaded action:post.edited action:ajaxify.end action:composer.preview', pretifyFileLinks);