You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.
View groupJoin the community to find out what other Atlassian users are discussing, debating and creating.
Hello,
Im trying to get the contents of the Confluence page to another site using the JSON-RPC renderContent method. The below code return me most of the contents but some javascript functions are missing and CSS so some Confluence plugins are not working (Expand macro,Info macro).
Do you know how to fix this? Or is there another method to load the Confluence javascript and CSS ?
Also we did notice a character "�" getting displayed when the html code has an empty paragraph
' <p> </p>' . Do you also know why this occurs ?
Is this an encoding issue ? I checked my Confluence configuration and the Encoding s set to UTF-8.
Below is the code to call "renderContent" method
$.ajax({ type: "POST", url: "http://samplehost.net/confluence/rpc/json-rpc/confluenceservice-v2/renderContent", data: ' [ "AIPAS", 32538632, "" ] ', contentType: "application/json; charset=utf-8", dataType: "json", success: function(data){ $("#mydiv").html(data); }, failure: function(errMsg){ alert(errMsg); } });
I think you might be better off just doing a regular fetch of the page -- use the actual page URL:
jQuery.ajax({ url : "/display/${space}/${mypage}?decorator=printable", success : function(result){ do something with the result; } });
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
👋 Hi there, a few of us at Atlassian would love to learn about how you use "space settings" functionality in Confluence. A facelift to the space settings is long overdue and we want to start with im...
Connect with like-minded Atlassian users at free events near you!
Find an eventConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.
Host an eventYou're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.