Mark table rows as header with the new editor (Version 4+)

Hello,

in the old wiki markup a table header could be created using two pipes:

|| this is a table cell in the table header ||

The result of this was html with <th class="confluenceTh">

Is there a way to create such a table header with the new editor as well?
I recognized that there is an item in the table menu called "Row highlight" but that is not what I mean.

Instead of changing from <td class="confluenceTd"> to <th class="confluenceTh"> the "Row highlight" just adds yet another css class making it a <td class="confluenceTd highlight">. Also the format is different as it doesn't have the same font weight as the original table header.

Since I have a lot of pages and tables that were created with the old markup I want to be able to get the same headers. When I create a new table this is not much of a problem because the first row is automatically formated as a header in the old style but when I work on tables, do some copy and paste, etc. I always end up with tables where I need an easy way to mark normal rows as headers or vice versa.

2 answers

1 accepted

It seems that with our latest update (to confluence 4.3.7) the behaviour has changed again and I can get the header I want with a click on the top menu item "Heading Row".

Works okay for me.


I'm not sure whether there is an 'easy' way. Perhaps someone who can knock together scripts or user macros could provide something simple.

In the meantime, you could use the Confluence Source Editor to change the table attributes manually:

https://marketplace.atlassian.com/plugins/com.atlassian.confluence.plugins.editor.confluence-source-editor

Or perhaps you could use the modifyPage, -findReplace, -findReplaceRegex commands available in the Confluence CLI plugin to automate this somewhat:

https://marketplace.atlassian.com/plugins/org.swift.confluence.cli

Hope that helps.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Thursday in Confluence

Three common content challenges + how to manage them

An efficient enterprise content management system, or ECM, is a must-have for companies that create work online (cough   cough, all companies). If content calendars, marketing plans, and bu...

100 views 0 6
Read article

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