Highlight words in confluence text editor

Max Pavlov August 29, 2015

Many text editors, including popular among developers StackExchange question editor, allows users to highlight single words in the sentence: bf3db20a9a67af1221ffcc37d2b71709.png

For example, ErrorAction is highlighted.

 

I don't seem to be able to find anything similar in Confluence page editor. How can I achieve a similar highlight background color effect? Thanks.

4 answers

4 votes
Deleted user May 28, 2019

Since the editor does not support highlighting, but it does support other features that no one uses like subscript, I hijacked the subscript feature to perform highlighting instead.  All you have to do is go to "Space Tools" > "Look and Feel" > "Stylesheet", and add the following.  Then anything that you set as subscript will instead be highlighted yellow.

<style type="text/css">
/* hijack subscript and make it highlighting instead */
.wiki-content sub {vertical-align: inherit; font-size: inherit; background-color: yellow; }
</style>

Please note that you must have the Space Admin permission to view and edit the stylesheet.

2 votes
Kuncheff January 23, 2019

Use span stype around the word that you want to highlight

 

<p>Here is something that we do not want to highlight<span style="background-color: yellow;”>WORD TO HIGLIGHT</span> </p>

Shraddha Nagar November 10, 2020

Sorry, this does not work. 

1 vote
Steffen Heller
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 30, 2015

There is a discussion about the same topic in another thread:
Change text background color in confluence editor?

0 votes
Milo Test
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 29, 2015

I agree that it should be as easy as selecting some text and hitting some kind of "background text color" button. But it's nearly as easy with the Highlight macro, though you may have to toy with putting extra spaces in front or behind the text in the macro to get it to space out right.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events