Hi,
I have a simple Perl script, below, to create a new child page under a parent page identified by its ID.
However, the contents are being passed as literal strings and they do not render as described in the storage formatting guidelines. For example: when content is set to "h1. Test", that is the text which appears on the page: "h1. Test" instead of a heading "Test". I tried using {html} and different formatting suggested in the storage formatting guidelines as well as what have worked for others, posted around google and different forums, on lower versions of Confluence and end up with lines of text every time.
API 2.0 using jQuery also behaves the same for me.
Any ideas what I may be missing?
Any help is appreciated and thank you all in advance for your time and responses.
Code
#!/opt/local/bin/perl
use strict;
use XMLRPC::Lite;
use Confluence::Client::XMLRPC;
use warnings;
my $username="myUserName";
my $password="myPassword";
my $baseurl="https://confluenecServer.mydomain.com";
my $spaceKey="TST";
my $parentPageTitle="MyTestPage";
my $object = Confluence::Client::XMLRPC->new("$baseurl/rpc/xmlrpc", $username, $password );
my $parentPage = $object->getPage($spaceKey, $parentPageTitle);
my $newpage = {
space => $spaceKey,
title => "New Child Page7",
content => "h1. Test",
parentId => $parentPage->{id},
};
my $createdpage = $object->storePage($newpage);
die "could not create child page" unless $createdpage;Result
Capture.PNG