Is there a way to add style to page content via API?

Agustin Recalde April 27, 2017

Hi!

 

I'm trying to automatically update a page's content via the REST API but it seems I cannot send style along the HTML.  For example, It will accept this:

<span>Something</span>

But not this:

<span style="color: red;">Something</span>

If I send the style information, I get:

{"statusCode":400,"data":{"authorized":false,"valid":true,"errors":[]},"message":"Error parsing xhtml"}

The only way I can send the content is raw, with no color. Is there a way to do this afterwards (using the API)? Or if there a way to allow the style to be sent to Confluence?

1 answer

1 accepted

1 vote
Answer accepted
Tyler T
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 27, 2017
Agustin Recalde April 27, 2017

Hi! Thanks for the answer!

That seemed to be the problem. I had tried to escape the quote marks but It seems I skipped something and it keept failing.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events