Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Set font-size via api content

Hello,

I am creating a content of a page using content api but I am not able to set a font size.

Example request:

{
"id": "123456789",
"type": "page",
"status": "current",
"title": "test123",
"version": {
"number": 78
},
"body": {
"storage": {
"value": "<p style=\"font-size: 10px\">test1</p>",
"representation": "storage"
}
}
}

I also tried:
"<p style=\"font-size: 10em\">test1</p>
"<p style=\"font-size: 10%\">test1</p>"

 

Whatever I do, the font size is 1em.

I see that other styles ex. text-align works fine.

Is there any way to set a font size? How can I know which styles works fine and which dont?

1 answer

0 votes

Hi Pawel,

Thank you for raising this with us! I hope you are doing well.

Confluence Cloud doesn't support different font sizes, so updating it using the API isn't possible.  You can try using the various formatting options mentioned in Insert Confluence Wiki Markup.

I'll refer you to an earlier discussion on the topic below:

I refer to the feature request CONFCLOUD-46077 (Ability to adjust font size). You can vote and follow that request if you want updates on that.

I hope that helps, but let me know if you have any questions.

Take care,

Shannon

@Shannon Spaniol Thank you for the response.

I am wondering - when I create page content via API(https://SERVER.atlassian.net/wiki/rest/api/content/) can I set a heading size for a text?

 

I tried, but it didnt work:

2021-06-17_16h37_05.png

Hi Pawel,

Can you show us the example REST call that you tried and the output? In the page REST API examples, you can learn how to convert the Wiki markup format.

There's also a thread at the Atlassian Developer Community, Create a page Confluence REST API, and there's an example there that shows adding an h1 heading.

I hope that helps, but please let me know if you have any trouble.

Shannon

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Site Admin
TAGS
Community showcase
Published in Confluence

Miss the Confluence demos at Team 21? Watch them here!

Phew, Atlassian Team 2021 blew by. With dozens of demos and a handful of keynotes, you may have missed some of the awesome Confluence Cloud sessions. Don't' worry, you can watch them all here or on Y...

312 views 2 6
Read article

Community Events

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

Events near you