Why does multiexcept plugin insert a before and after?

Richard, Jr. Rabil September 10, 2013

When I insert a multiexcerpt into a wiki page, it seems that the macro automatically creates a <p></p> before and after it. Does anyone know why this is the case and whether or not those p tags can be removed? They're adding unwanted before and after space in a table I'm constructing.

6 answers

1 accepted

1 vote
Answer accepted
BillA
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 11, 2013

When constructing the editor we had to allow users to be able get their cursors above, below and between block elements on the page. For example, if you had an excerpt macro at the very top of your page, you otherwise would have no way of getting your cursor above the macro without the empty <p>. The empty <p>'s you see when editing should get removed when you save the page. It is possible that the multi-excerpt macro is adding its own empty paragraphs but it's also standard editor functionality on all block macros for the reasons stated above.

1 vote
Matthew J. Horn
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 10, 2013

A lot of macros do this. There are some tricks to removing the extra <p> tags, including:

  • Using JavaScript to extract them after page loads
  • Piping the output of the macro through another macro that extracts the tags

Sometimes these work, sometimes these don't. If you search this site, you'll find examples that illustrate both of these approaches.

hth,

matt

Richard, Jr. Rabil September 10, 2013

Thanks, Matt. I'll try your suggestions and see if I can find a workaround.

0 votes
Brendan Patterson
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.
April 27, 2014

Hi Everyone,

Apologies just saw this. The MultiExcerpt AddOn does not contribute <p> or other extraneous elements. Confluence did it! :) I've tested this many times but most recently on Confluence 5.4.2 and 4.9.2

I made a video demo! :)

http://www.youtube.com/watch?v=ohT2iBJ3kU4

thanks,

Brendan

p.s. By the way the "MultiExcerpt for OnDemand" is now available! Check it out!

http://bit.ly/multiexcerpt-ondemand

0 votes
Richard, Jr. Rabil September 14, 2013

Thanks for the explanation, Bill. That design rationale makes sense. Unfortunately I think the multi-excerpt macro is adding its own empty paragraphs in this case, and is thus throwing off the padding and alignment in a rather obvious way, so I'm still hoping to find a workaround.

0 votes
MB
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 10, 2013

Did you try asking authors of that plugin, by clicking on the Support and Issues link?

0 votes
Richard, Jr. Rabil September 10, 2013

Just submitted a ticket to them. Thanks for the suggestion. If / when I get an answer, I will post it here.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events