Editing page in Confluence: can we catch when it's called?

Hi, as title summary i was wondering if there is an event that we can observe specific when the user goes in page editing mode.

My target should be to change the behavior of my custom ui component / adding some stuffs in the template only when the page is being edited.

Maybe could be somehow done in the config macro, but this was not the app intention (the controls should be visible inside the app).

Hints welcome for other solution (i guess a custom “pencil edit” button inside the custom ui template is not the best, or not accepted at all)

Hello @michelegranato,

Currently, I do not think you can listen to when the edit page pencil is clicked.

But you can listen to the edit event; that is when you click the edit pencil then click the “publish” button.

Please see: https://developer.atlassian.com/platform/forge/events-reference/confluence/

Thank you for the reply. Yes i saw that, unfortunately it’s not so useful for my target

1 Like

@michelegranato we’re thinking of adding a value to the context of the macros as mentioned in [FRGE-437] - Ecosystem Jira. Would that solve your use case?

1 Like

HI @AdamMoore,

I have a question.

Please, why does confluence update API (PUT /wiki/rest/api/content/{id}) not trigger this update event in Forge?

that should do the trick, yes.

and also avoid reloading the macro every time a field of the configuration change value