Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How do I get rid of the blank line at the beginning of the Table of Contents Zone macro? Edited

I've added a Table of Contents Zone macro and set the minimum heading level to 2, but a blank line still precedes the first Heading 2 entry.  I've reviewed other community discussions about this issue and most users had extra white space with Heading formatting - once they changed that to Paragraph the issue was resolved.

  • I've gone line by line in the editor and verified that there is no extra white space, and that all macros preceding the first Heading 2 entry are set to Paragraph.
  • I've checked the page source and verified that there are no extra <h2>...</h2> tags denoting anything else as Heading 2.
  • I've hit backspace after the Panel macro preceding the Table of Contents Zone macro (and every other line before the first Heading 2 entry) many times just to be sure there's no extra white space.  The cursor shows that line is formatted as Paragraph.

What else do you suggest I try to eliminate that blank line?  Here are screenshots of the published page and the editor:

Published page.PNGEditor with macros.PNG

4 answers

1 accepted

1 vote
Answer accepted

Hello Jared and welcome to the Community!

Thank you for bringing this to our attention and posting the steps you used to recreate and cause the extra line break. I went through and was able to recreate the extra line break myself. This then leads me to the following article; Confluence Editor Automatically Adds Line Break Before or After a Macro. Within this article, there are a few workarounds for this issue:

Workaround

  • Install Confluence Source Editor plugin
  • Edit the source of the page using Confluence Source Editor plugin. Remove the unnecessary <div> tag from the content and save it. Now there shouldn't be any new line break added automatically every time you edit the page.

Another workaround, valid also in Cloud (above plugin is not available for Cloud instances), is to press SHIFT+ENTER instead of ENTER to go to a new line without adding a new paragraphs/div.

These workarounds should help to avoid the extra line return when creating content.

Regards,
Stephen Sifers

I didn't have any extra <div> tags, but I did find the following in the source and deleting it solved my issue:

<p>
<br/>
</p>

 Thank you for the help!

Like # people like this

Good day,

I'm having the same issue when using Excerpt macro wrapped around a table and CANNOT install any plugins because I'm not an admin on our Confluence server.

When I use the Excerpt Include macro and found that there is an extra line break.

Looking at the source, I found that there is an extra br in the Excerpt in the main page that I CAN'T get rid of no matter what I try... -_-

Help... Please.

I've deleted the first blank line hundreds of times (either by deleting, backspacing, or removing the p and br tags in source editor)… why does it keep appearing? It keeps inserting that line by itself.

Same, I can't get rid of them and they're messing up the formatting of tables.

This is still a huge issue almost everywhere when trying to design clean content. The constant addition of white space really needs to go. The workaround with the Source editor does NOT work because there is always a new addition of newlines once the page is saved. 

This is particularly annoying when including pages somewhere else because the macro output almost guaranteed generates an extra whitespace newline.

This is marked closed? The issue is still there. The 'edit the html' answer isn't an answer.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Posted in Confluence

What do you think is the most *delightful* Confluence feature? Comment for a prize!

- Create your own custom emoji 🔥 - "Shake for Feedback" on mobile 📱 - An endless supply of GIFs via GIPHY 🤩 Is there anything quite as nice as a pleasant surprise? Comment below with what...

463 views 24 9
Join discussion

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you