Hi,
I'm currently pushing fully-formed HTML content to Confluence Cloud using the v2 REST API, specifically in the storage representation.
However, I’ve noticed that any <style> tags or inline CSS declarations (e.g., <div style="...">) are either stripped out or ignored when the page is rendered in Confluence. This happens even when the content is well-formed and valid HTML.
My use case is to generate and upload formatted tables or reports, and I need consistent visual formatting — especially for things like tooltips and font styling.
Is there any documented limitation or workaround for including inline CSS in pages created/updated via the REST API?
Thanks in advance for your help!
Hi @Florent Lambrette
You can’t use arbitrary CSS styling in Confluence. Instead, Confluence has its own set of markup and styling options. You can find the documentation here — it should be the same for both Cloud and Data Center.
I’d recommend manually creating a test page that includes all the styling options available in your Confluence instance (including any formatting features added by 3rd-party apps) and reverse-engineer the format from there. You can always inspect the storage format of that page, which is also the format used when creating pages via the REST API.
Thank you @Lucas Knorr ! it helped me
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.