We recently had to upgrade Confluence to 5.9.1 because of a bug in indexing that is supposed to be fixed in this version. But then we discovered that the source code editor we were using no longer works with that version. I used that editor to format our templates and create elements for CSS to format. We MUST have access to the html. Although we are allergic to plugins with a price, we may have to pay to find one that works. It's that important. Does anyone have any suggestions....please....
Community moderators have prevented the ability to post new answers.
Well, if you are willing to pay for it, I wouldn't turn it down, but there is an option for changing the source code without the Source Editor plugin. It takes a few manual steps, but it's not so hard.
Copy that and paste it over the <PASTE CODE HERE> part of this script (but leave the backticks `` intact):
var newBodyText = `<PASTE CODE HERE>`; jQuery.ajax({ url: contextPath + "/rest/api/content/" + AJS.params.pageId + "?expand=body.storage,version,ancestors", success: function(response) { response.body.storage.value = newBodyText; response.version.number += 1; jQuery.ajax({ contentType: 'application/json', type: 'PUT', url: contextPath + "/rest/api/content/" + AJS.params.pageId, data: JSON.stringify(response), success: function(response) { console.log(response); console.log("Success!"); }, error: function(response) { console.log(response); console.log("Error!"); } }); } });
This would actually work in Confluence Cloud as well.
EDIT: Modern browsers let you make multiline strings using backticks (`) which makes steps 4 and 5 unnecessary.
Nice, simple en to the point
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Our organization offers a paid plugin, Source Editor for Confluence to edit the source of Confluence pages. We support both server and cloud.
Let me know if you have any questions or feedback about the plugin.
Mohammed
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.