How to get rid of the line break which Confluence is adding when editing.

I have created a template that contains a table holding partly prefixed texts. Users have to fill in texts themselves when creating a page. While testing this I noticed that Confluence is adding a <br/> after a text added in the editing mode. This <br/> causes a white line in the export to Word. This <br/> is not wanted.

Example:

The template says:

<td>
<p>
<em>1)</em>
</p>
</td>

The created Page based on this template says:

<td>
<em>1) Dizzy - Tommy Row<br/>
</em>
</td>

Can anybody explain why there is the <br/> and how can I get rid of it!!!

Thanks in advance. By the way, this ia all happening in Confluence 5.1.5.

Best regards,

Paula Quint

5 answers

1 accepted

Thanks again! I just discovered that using Italic <em></em> in the template is causing the <br/> when creating/editing a page based on this template. So now I skipped all the Italic in the template and add them when creating/editing. This gives me the result in Word I want!! :-)

I don't remember if this happens when creating a template, but Confluence inserts hidden tags all over the place when you work in the GUI editor. If you can (and again, I don't remember if template creation allows this), use the Source Editor plugin to get in there and remove extraneous tags.

Davin Studer Community Champion Oct 23, 2013

The source editor does work in template creation.

+1 Thanks for the help

I can't say why it is there. But have you tried to simply delete it? That is what I do with it.

Thanks for your answers, but I allready deleted alle the <br/>'s in the template via the source editor. But whenever I create a new page based on this template and I add texts the <br/>'s show up again after saving the page and causes whitelines in Word when I export the page. The idea of deleting all the <br/>'s everytime I create a page based on this template makes me unhappy! :-(

Any other ideas?

I have had the same experience as Matthew: There are lots of hidden tags and there is no way controlling it.

My typical problem are <p> within table headers.They are sometimes...

  • ...there: <th><p>text</p></th>
  • ...and sometimes not: <th>text</th>

The result is that the font formatting is different in Confluence and the height of the table header cell is different in PDF.

My "solution" is to ignore the difference in Confluence but to define CSS styles that make the header look the same in PDF.

Yup, I find myself going into the source editor on really complicated pages (lists within lists, macros within sub-lists). The most common thing I remove is extra <p> tags from list items and extraneous <span> tags. Requires a bit of manual work, but cleaning up a page in the source is so much easier than wrestling with the GUI's "generous" tag insertion.

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...

89 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