Add custom style to the confluence editor


i want to add custom styles to the predefined styles in the confluence editor.
I´ve read a lot of other threads where the statement was that this is not possible.

Is there still no possibility to add those styles?



image2016-8-19 14:1:13.png





4 answers

Possible? Yes. Easy? No. Confluence uses a version of TinyMCE, so it is possible to write a plugin for TinyMCE to add styles (basically adding references to classed HTML tags). The second part of the solution is easy – adding custom CSS to Confluence.

The workaround is user macros. Not as elegant, but does get the job done. For example, I wrote some simple user macros years ago we use for formatting figure and table titles in Confluence (and when exported) – a hole that has been in Confluence since the start.

Keep in mind, that the editor was designed by coders and not tech writers. wink

Did anyone ever try writing a plugin to add styles? Did it work?

I've been wondering if I can do it with the TinyMCE API and just add javascript to the Confluence theme.

This really shouldn't be so complicated. And macros that format text in-line in the TinyMCE editor should also be easier to build.

That is basically what I am saying. Just keep in mind, this is Confluence, so there are many parts of the menu you just don't have access to, or are not documented. wink So be  prepared for some experimentation!

Turns out in all my experimentation I couldn't use just plain javascript to add to the TinyMCE options. It appears that it needs to be done upon loading to modify the UI.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Oct 24, 2018 in Confluence

Atlassian Research opportunity with Confluence templates

Do you use templates with Confluence? Take part in a remote 1-hr workshop. You'll receive USD $100 for your time!   We're looking for people to participate in a   remote 1-hr workshop...

1,095 views 17 14
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you