How to prevent Confluence 4.x from inserting paragraphs around table elements inserted via wiki markup

  1. Edit a page and select Insert -> Wiki Markup
  2. Add table markup like
    || AA || 
    | bb |
  3. Results in a table that when viewed as source looks like:
    <table class="confluenceTable"><tbody><tr><th class="confluenceTh"><p>AA</p></th></tr><tr><td class="confluenceTd"><p>bb</p></td></tr></tbody></table>
  4. This is different than Confluence 3.x and different that what is produced using native table insert

Another question is how to you edit the page to remove the extra <p> that are inserted?

This seems like a bug.

3 answers

0 vote
David Simpson Community Champion Sep 16, 2012

You could try doing it client-side :)

Something like this:

AJS.$('.confluenceTh &gt; p,.confluenceTd &gt; p').children().unwrap();

David Simpson Community Champion Sep 16, 2012

Sorry, I didn't quite get what you meant by native table insert. Likely that won't work :(

Thanks, I just mean using insert table natively in the confluence editor.


i am also facing the same problem i have few user macros i want to fetch the contents between thoes where the </p> tags get added its not unexpected.

This is a kludge. It doesn't prevent Confluence from adding the <p>s, but it does prevent them from showing on your pages:

If you already have a stylesheet you use add to it:

.noP p {

If you don't have a stylesheet, add the following at the top of each page where you have the issue:

  .noP p {

Then wrap your tables with a div of class noP like so,


Could someone from Atlassian comment on this behavior?

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Apr 13, 2018 in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

2,811 views 26 10
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