When I include a js file in my confluence plugin and specify its context in atlassian-plugin.xml as "editor", the js file doesnt get loaded in some cases when we are in editing mode of a page. I will specify below the conditions in which this context works and in which it doesnt
Not Working
1. When we open a page in editing mode from the edit option on the page. My validation js file doesnt get included in the edit mode of the page.
Working
1. When we are creating a new page, this js file gets included in the editing mode or creating mode of the page which is the same.
2. When we open a page in editing mode from the edit option on the page and again after this we reload or refresh the url the js file gets loaded from the editor context.
I want to know if i am doing anything wrong here, and if so then how do i correct it to get the not working part, working.
or whether this is a atlassian confluence issue?
(Note :- Moreover, the scenario works well for Documentation theme in confluence, but breaks down for Default theme.)
Community moderators have prevented the ability to post new answers.
I have the same problem and question. I want to fire jQuery from Page Layout template. Something like
#if ($mode == "edit")<button id="copySection">Copy layout section</button>#end
and more jQuery which is injecting content into a layout section of the page.
The button is shown only when the page in edit mode is manually reloaded. Also the jQuery runs only after a reload.
No idea how to trigger to run after "Edit" button is clicked an edit mode is started.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi all, I'm just solving the similar problem. I figured out that page in 'edit' mode is only rendered with JS, so it is not RELOADED and document.ready is not invoked. I guess it is the problem you and I have. When the page is reloaded manually in the browser, document.ready is invoked and everything works fine. I tried to listen for URL change, but it doesn't work, so if you will have any idea, I would appreciate any help :) Thank you
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
nope. I havnt found a solution for this problem yet.
I am thinking that this is a confluence issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Community moderators have prevented the ability to post new answers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.