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?
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 S 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:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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.