I've been working on a solution to copy a macro filled with content, without going into the Edit mode. I did some research, I iterated on couple of drafts but to no avail.
Let me try to structure the problem, and path I went through.
1. Reasoning (the need)
The reason behind this kind of solution is to serve a user, that has read only permission, a possibilty to copy into his own Confluence page not only the outcome of the macro's work but also the whole macro filled with the content, so he/she can modify it, while keeping him/her from editing the page.
2. Example of use
There is a form (a ContiForm) pre-populated with content and variety of options already picked. Setting up such form takes a good while. Through such solution user could copy the form into his Confluence page, modify 1-2 fields and re-use the whole bunch of options. But he/she would not have a chance to change anything in the source page, since has read-only privileges.
So I've tried adding js scripts through html macro, with and without using the jQuery.
The furthest I got was to copy specific part of the page with full formatting and function (the result of macro's work), but not the macro itself.
var aux = document.createElement("div");
aux.innerHTML = document.getElementById(element_id).innerHTML;
<p id="demo"><b>Bold text</b> and <u>underlined text</u>.</p>
<button onclick="copy('demo')">Copy Result</button>
I know it might seem this is a very hacky attempt, but that was my idea. I have no experience in velocity, nor I have administration privileges in the the said Confluence sever instance. Hence this is the way I tried to achieve the goal with such attempt.
4. Discussion starter
If you have any insight you might share, or idea of your own or some advice, I'd be more the happy to read your input.
Any constructive help would be most appreciated.
Hi everyone, We’re always looking at how to improve Confluence and customer feedback plays an important role in making sure we're investing in the areas that will bring the most value to the most c...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events