Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

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

Bob Swift
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.
September 16, 2012
  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 votes
Bob Swift
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.
October 5, 2013

Could someone from Atlassian comment on this behavior?

0 votes
Bill McAvinney
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 20, 2013

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 {
  display:none;
}

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

{style}
  .noP p {
   display:none;
}
{style}

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

{div:class=noP}
{table}
…
{table}
{div}
0 votes
David at David Simpson Apps
Atlassian Partner
September 16, 2012

You could try doing it client-side :)

Something like this:

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

David at David Simpson Apps
Atlassian Partner
September 16, 2012

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

Bob Swift
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.
September 16, 2012

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

tousifs
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.
September 17, 2012

Hi,

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.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events