Expand Macro

The Expand macro displays an expandable/collapsible section of text on your page.

Here is an example:

  Expand me...

This text is hidden until you expand the section.

Using the Expand Macro

To insert the Expand macro into a page using the macro browser:

  1. In the Confluence editor, choose Insert > Other Macros
  2. Find and select the required macro

Speeding up macro entry with autocomplete: Type { and the beginning of the macro name, to see a list of suggested macros. Details are in Autocomplete for links, files, macros and mentions.

To edit an existing macro: Click the macro placeholder and choose Edit. A macro dialog window will open, where you can edit the parameters of the macro.

Parameters

Parameters are options that you can set to control the content or format of the macro output. Where the parameter name used in Confluence storage format or wikimarkup is different to the label used in the macro browser, it will be listed below in brackets (example).

Parameter

Default

Description

Title


Click here to expand...

Defines the text that appears next to the expand/collapse icon.

Code examples

The following examples are provided for advanced users who want to inspect or edit the underlying markup for a Confluence page. 

Macro name: expand

Macro body: Accepts rich text.

Storage format example

Wikimarkup example

Notes

  • Text is expanded in PDF and HTML exports. When you export the page to PDF or HTML, the text between the macro tags is expanded so that readers can see it in the PDF and HTML versions of the page.
  • Nesting your Expand macros. You can put one Expand macro inside another, and Confluence will correctly show and hide the contents of all Expand macros, including the nested ones.

Was this helpful?

Thanks for your feedback!

100 Archived comments

  1. User avatar

    Hanna Nelson

    Is there a way to add formatting to the title?  For example, I'd like to use this feature for "See also" lists.  I changed the title to "See also", but would like to make that title bold and/or a color from the theme.

    31 Mar 2011
    1. User avatar

      Dhyana Scarano

      Hi Hanna,

      I've found that headings will still work with the expand macro e.g.:

      Wiki markup:

      Result:

       Click here to see the text...

      This text block will expand and collapse.

      But other text formatting markup seems to not work inside the "title" parameter:

      Wiki markup:

      Result:

       *Click here to see the text...*

      This text block will expand and collapse.

      However, using the {span} macro wrapped around the entire {expand} macro seems to work as long as you use a new line after the first {expand:...} tag and before the expanded text.
      (Note: it doesn't work in my version of Confluence 3.3.1 but it seems to work in this one).

      Wiki markup:

      Result:

      Unknown macro: {span}
       Click here to see the text...

      This text block will expand and collapse.

      28 Jun 2011
      1. User avatar

        Hanna Nelson

        Thanks Dhyana.

        The heading solution is elegant but causes all the text in the expand to also appear as a heading. 

        The span doesn't seem to work in my version (3.4.9) - maybe it's a 3.5 thing?

        28 Jun 2011
      1. User avatar

        Tom Corcoran

        Just coming to Confluence in 4.2. One can't edit the markup in v4. So that means we can have headings in expand titles any more it seems (sad)

        25 Sep 2012
      1. User avatar

        Neil Borilla

        Do you have equivalent for source editor in 4.3 ?

        04 Jan 2014
  2. User avatar

    Linden Hocking

    Is there a parameter that allows the default to display expanded rather than collapsed?

    20 Jul 2011
    1. User avatar

      Jessi Lawrence

      I second this! It would be a very useful feature.

      07 Jan 2015
  3. User avatar

    Andrey Shelakhaev

    Can you make option box - default expanded or collapsed?

    16 Nov 2011
    1. User avatar

      Shruti Visweswara

      Can I have an expandable option box? I mean when i expand, I need some status options for users to choose. Would that be some other macro?

      11 Jan 2015
      1. User avatar

        Esko Ryökäs

        If this could be helpful, take a look on this: https://wiki.uef.fi/display/~ryokas@uef.fi/Expand+tests

        The idea is, that it is not necessary to the visitor to know, it doesn't exists any really choises. With expand one can get a look-a-like "which option" look.

        Any better solutions?

        12 Jan 2015
        1. User avatar

          Shruti Visweswara

          Thanks for the idea. I guess I am looking for a drop down set of choices for the users to choose.

          So, user comes in, looks at the table, finds his row. Goes to Colum6 which is the status column and selects one of the status from the drop down list (started, completed, testing.. something like that)

          12 Jan 2015
  4. User avatar

    Anonymous

    (Suggestion for improvement) How about a separate parameter to provide text to display when expanded?

    31 Jan 2012
  5. User avatar

    Anonymous

    Is there a way to expand all your expands on a page? = an expand all and collapse all function?

    12 Jun 2012
    1. User avatar

      Rita Yassi

      That will be great.. i vote for that too

      26 Jun 2012
      1. User avatar

        Anonymous

        me too

        29 Aug 2012
        1. User avatar

          Anonymous

          I would like that feature too!

          07 Jan 2014
    1. User avatar

      Anonymous

      Voted! We really would like an "expand all" functionality.

      12 Jul 2013
    1. User avatar

      Anonymous

      I totally agree. I came to this page to figure out how I can "expand all" for a page.

      27 Aug 2013
    1. User avatar

      Anonymous

      I figured out how to do it with some custom code.  Put this line somewhere on the page in an HTML block. 

      <a id="toggleAll" href="#">Expand/Collapse All</a>

       

      Then at the bottom of the page create another HTML macro and add the following code. 

      <script type="text/javascript">
      AJS.toInit(function ()
      {

      AJS.$('#toggleAll').click(function()
      {

      jQuery(".expand-control").each(function(){ jQuery(this).trigger("click");})

      });

      });
      </script>

      This will use jQuery to automatically trigger the expand or collapse.  One problem is if you have something expanded already and then click this button. It will collapse all that are expanded and will expand all that are collapsed. So it doesn't work perfectly but a lot better. 

      10 Jan 2014
      1. User avatar

        ernie chang

        A slightly modified solution - this uses the actual function that gets attached to each item - that includes explicit expand and collapse, as well as the toggle.

        I ended up putting everything in one HTML block, rather than the two originally suggested. 

        This could be further optimized to reduce some of the copy-paste code (mainly by parametrizing the click handler to all for passing of expand/collapse into a single function, rather than the three functions), but works well enough for my needs.

        18 Feb 2014
        1. User avatar

          Jason Monsorno

          I needed a slight modification in order to get this to work for me. I had to move a }); block up to close the toggle function. Moved line 53 between 27&28; otherwise, expand and collapse only worked after clicking toggle. Not sure if that was intended for your actions but personally I removed toggle so it wasn't the behavior I wanted. Thanks!

          01 May 2014
        1. User avatar

          George Lewe

          Thanks for the code. It did not work for me in a macro tho and changed the toggle part. I also moved those brackets up from 53 to 27f.

          Then I created the following user macro that does the job (tested in 5.4.3):

          Best regards,

          George

          23 Sep 2014
          1. User avatar

            efavreau

            Works well!  Great job!

            04 Jun 2015
  6. User avatar

    Anonymous

    It seems the markup isn't working if umlaute (ä, ö, ü) are in the title.

    28 Jun 2012
  7. User avatar

    Anonymous

    Can I take a table of URL(SEO URL list) and use the expansion macro for each url to describe details around Meta Data etc and still have it display in a table format?

    30 Aug 2012
  8. User avatar

    Manfred Grau

    Create an user macro with the following code:

    ...

    ## @noparams

    <style type="text/css">

    .expand-control-text {

    font-weight:bold;color: #2438BB;

    }

    </style>

    or a css-style-sheet:

    .expand-control-text {

    font-weight:bold;color: #2438BB;

    }

    The header of the expand-macro will appear bold and blue.

    13 Sep 2012
    1. User avatar

      Anonymous

      Thanks!  (smile)  I've been looking for this for awhile and it was so easy.

      14 Dec 2012
    1. User avatar

      Srinivas Patruni

      Header font is changing with css but can we apply css for the text inside the expand macro?

      31 Jan 2014
  9. User avatar

    Anonymous

    This doesn't work for me. I only see the default title "Click here to expand..." no matter what I put in.

    E.g.

    still shows like this:

     Click here to expand...

    This text block will expand and collapse.

    19 Oct 2012
    1. User avatar

      Anonymous

      Found how to solve this. Leave out the "title=" bit:

      19 Oct 2012
  10. User avatar

    Anonymous

    Aside from formatting, there are a few other frustrating inconveniences when using the Expand macro...

    1. If you search within a doc that has Expand sections that are collapsed, the search won't find the content within those sections
    2. If you create an Anchor to a specific location within an Expand section and that section is collapsed, any link to that anchor won't function unless the section is expanded

    The second item is especially frustrating...If anyone knows a work around I'd be especially grateful.  Ultimately if this could be addressed properly in the next update, that would be great too.

    19 Oct 2012
    1. User avatar

      Anonymous

      Yah, a search function that opens cloaks or expand macro's would be great! We have built a large page that is cloaked and expand macro'd and we can't seem to search our cloaked and/or expanded sections. Any further word or suggestions for a different way of doing this with what is already built into confluence or even a plugin that exists would be AMAZING! Thanks for your time

      28 Oct 2012
    1. User avatar

      Praveen Paul

      Point 2 shown here would be a great addition, I have tried numerous methods to achieve this utilising existing Macros but am somewhat restrictied as I am using a hosted version of confluence. Does anyone have a workable solution to be able to nest an anchor within the expand section and when calling this anchor make the section auto collapse?

       

      25 Feb 2013
  11. User avatar

    Anonymous

    有没有办法解决在应用端编辑宏时,改变标题字体格式?

    29 Oct 2012
  12. User avatar

    Anonymous

    Hi (smile) it possible to make your title a different size from your content? I need my text to be quite large for my title only this also makes my content within the expand large as well, is it possible to give the title an independent size?

     

    Thanks (smile)

    06 Nov 2012
    1. User avatar

      Manfred Grau

      If it concerns the expand-control-text look at my proposition; otherwise you must use html-code or a division with css

      06 Nov 2012
  13. User avatar

    Anonymous

    Is there a way to put various Expand in a single page and when I click on one Expand any other expand in the page or inside another macro get collapsed?, I'm making a Glosary and I put autoadjustable columns and inside each collum and expand with an Include Page, so when I click in Expand A it shows the glosary for this letter, and when i click on Expand B it shows the content of page for the letter B but it doesn't collapse the first collapse, and with this logic i can have all the alphabet open at the same time.

    Regards, and sorry about my bad english!

    20 Nov 2012
  14. User avatar

    Anonymous

    Embedding this macro in the site welcome message doesn't work for me. Can anyone else confirm that the dashboard cannot display this macro?

    07 Dec 2012
    1. User avatar

      Sarah Maddox [Atlassian]

      Hallo there Anonymous

      I'm not sure about the dashboard, but I did notice that the Expand macro stopped working in the sidebar in the Confluence Documentation theme. That problem was fixed in Confluence 4.3.5 (just released). You can see it working at the bottom of the left-hand panel on this page, where it says "Choose a version...".

      Cheers, Sarah

      19 Dec 2012
  15. User avatar

    Fred Haigh

    Is there a way to not run the code under the expand macro until the macro is clicked? I use expand to hide the results of a report. I have a page with 60 small reports on it, each is hidden using an expand. The page takes a long time to load because it is rendering and hiding all the reports. As I have more data in my database to be searched for a report (or more reports on the page) the page will take longer to load. 

    Fred

    19 Dec 2012
    1. User avatar

      Sarah Maddox [Atlassian]

      Hallo Fred

      The Cache macro, by Bob Swift, can help you here. It delays the rendering of a part of the page so that the rest of the page can load faster:

      https://marketplace.atlassian.com/plugins/org.swift.confluence.cache

      I hope this helps!

      Cheers, Sarah

      19 Dec 2012
  16. User avatar

    Anonymous

    The expand macro is not working for me in certain situations.

    It works on my personal page (a sandbox copy)

    It works in the preview of the "production" page. 

    It works in the preview from the macro dialog.

    However, in the actual production page, I see the text "click to expand" and then the full contents of what is in the expand block. It cannot be expanded nor condensed.  I have tried removing and recreating the macro several times. The block contains several JIRA macros and text.

    The only difference I can see in the production page versus my sandbox is the layout. Production has a left sidebar. 

    Any thoughts?  Thank you!

    08 Feb 2013
    1. User avatar

      Sarah Maddox [Atlassian]

      Hallo there

      It sounds as if some CSS is overriding the expandability. Are you using a specific theme in the production version (a theme may be adding that left sidebar) or has someone applied custom CSS to the space?

      Cheers, Sarah

      10 Feb 2013
  17. User avatar

    Anonymous

     

    Is it possible for the content in the expand be a link? Example below where Page 1 and 2 is a link to the respective pages. Doesn't seem to allow this at the moment, but did with past version.

     Iteration 1

    Page 1

    Page 2

    27 Mar 2013
    1. User avatar

      KM

      Could the title be a link?
      Now in C5.7 the content can be links, but I'd need to make the title a link (to a page; the content is links to its subpages).

      04 Jun 2015
      1. User avatar

        Giles Brunning [Atlassian Technical Writer]

        Hi KM,

        Unfortunately, no, not that I'm aware of. Sounds like you could use the Children Display Macro to do that job, but the list would always be expanded.

        You could think about making a suggestion for a collapsed option for the Children Display macro.

        04 Jun 2015
        1. User avatar

          KM

          That would solve some of the problems (a collapsed option in the Children Display Macro). Sometimes I want to be able to manually select the tree structure, different from the page structure. That is when I'd need expand macro with the title as a link. The Expando macro mentioned below would also solve some but just some of the problems, but it seems to be partially discontinued.

          05 Jun 2015
  18. User avatar

    Anonymous

    Like many comments on the current page, I think that having an expand all option (like for bottom page comments) OR having a property like expended=true would be so nice.

    I hope anyone will read this and think this is a good idea.  (smile) Thanks.

     

    A fan of your products.

    05 Apr 2013
    1. User avatar

      Michael Brinson

      I agree 100% Anonymous.

      02 May 2013
  19. User avatar

    Anonymous

    Is there a way to have an expand function in an already created expand macro?

    10 Apr 2013
    1. User avatar

      Sarah Maddox [Atlassian]

      Hallo Anonymous

      It depends on your version of Confluence.

      If you are on Confluence 4.3.2 or later, you can put one Expand macro inside another.

      If you're using Confluence 3.5 or earlier, you can create your own user macro to allow nesting. See this blog post: http://ffeathers.wordpress.com/2011/08/20/nested-expand-macros-in-confluence-wiki/

      If your Confluence version is between 4.0 and 4.3.1, it's not possible to nest the Expand macros.

      Cheers, Sarah

      10 Apr 2013
  20. User avatar

    Sven Meyenburg

    Some of the mentioned feature requests on this page are similar to this on, but not the same: It would be great, if one could link to an opened expand-macro.

    I have a list of collapsed content, like a FAQ, and would like to send users directly to one of the items which in this case should be presented opened. The solution might potentially be an addition in the URL, but I don't know, if this is possible at all.

    If Yes: Thanks for any hint.

    If No: Are there any plans related to the described requisition?

    Sven

    22 Apr 2013
  21. User avatar

    Lisa Dyer

    Should I be able to nest other macros - e.g. HTML or Table - inside an Expand macro?

    23 Apr 2013
  22. User avatar

    Michael Brinson

    I would like to see the same functionality added as Sven Meyenburg described.

    02 May 2013
  23. User avatar

    Stefan Kleineikenscheidt (K15t Software)

    I have just blogged about our alternative Expando macro, that allows toggling of headings and expands sections based on the hash value in the url: http://blog.k15t.com/2013/07/expando-macro-for-confluence%3A-collapse-and-expand-headings.

    It's free and open-source. I am looking forward to read your comments!

    25 Jul 2013
  24. User avatar

    Esko Ryökäs

    In 5.2 the Expand macro allows more than text, i.e. also a picture can be opened.

    10 Dec 2013
  25. User avatar

    Shannon Hemmes

    We have a user that has created a page, that has 6 instances of this macro in use.  In 4 of the instances, clicking on the hyperlink briefly shows the text, then it is hidden again.  2 of the instances are working fine, in that clicking on the hyperlink, expands to show the text.  Clicking it again, hides the text.

    I'm afraid I'm not a user of the wiki, nor familiar with the macros, and am posting this here on our user's behalf.  

    Thanks in advance.

    16 Dec 2013
  26. User avatar

    Srinivas Patruni

    Is it possible to implement bold font and different color for the text in expandable macro? 

    31 Jan 2014
    1. User avatar

      Rachel Robins [Atlassian Tech Writer]

      Sorry, not that I am aware of. 

      31 Jan 2014
      1. User avatar

        Esko Ryökäs

        But if you put your text as a photo, it's works. Then you have any possibilities.

        31 Jan 2014
        1. User avatar

          Srinivas Patruni

          We cannot put the text as photo as this will restrict the usability of macro.

          31 Jan 2014
          1. User avatar

            Esko Ryökäs

            this is true and not a nice solution. But you can put a link to your photo (which looks like a text), too

            01 Feb 2014
  27. User avatar

    Tirthankar Banerjee

    Is it possible to point to a particular Expand Macro (EM) on any page when I have a multiple of them ?

    For example, if I have 3 EMs on any page and from another page if I would like to come directly to the

    second EM thru a link - is that possible?

    If not, is there any other macro which will inserting simple texts and still allow me to come to the beginning

    of a specific text area from another page thru links?

    11 Feb 2014
    1. User avatar

      Rachel Robins [Atlassian Tech Writer]

      Hi Tirthankar, I'm not aware of a way to link to a page in a way that the expand is triggered.  The closest I could get was placing an Anchor macro directly before the expand - the user would land at the right part of the page, but would still need to click the expand to open it. 

      There's information about using anchor links here - Working with Links

      You could also post your question on Answers, as someone from the community might have a workaround for this. 

      11 Feb 2014
  28. User avatar

    Jason Muzzarelli

    I've seen a number of requests for this, but I'm throwing my hat into the ring as well....we need the ability to have the expand macro expanded by default, then users can collapse if they choose to. I see there have been some work-arounds posted where it provides a collapse all / expand all, but what I need is specifically for the content to be all visible when the page loads, and collapsed upon the user doing so. Any help here?

    20 Feb 2014
  29. User avatar

    Li, Xiangfei

    Hello there, I wonder is it possible to make the expand macro be expanded by default? That means, when a user open the page, contents inside the macro could be displayed by default?

    23 Apr 2014
    1. User avatar

      Rachel Robins [Atlassian Tech Writer]

      Sorry, that is not currently possible.  There is a ticket about this that you can watch / vote on here  CONF-27077 - Option to display expand macro expanded/collapsed on page load Open .

      23 Apr 2014
  30. User avatar

    Loreal Shead

    Is it possible to use an image for the title field of the expand macro? If so can you please provide sample code.

    29 May 2014
    1. User avatar

      Jason Monsorno

      The macro itself won't allow you to, but if you really need to you can use jQuery to replace the text with an image.

      I've gone into the Custom HTML in the admin panel and added this to "At end of the HEAD"

      The first half is someone else, that fixes the generic error if an anonymous user clicks a check box by forcing them to log in.

      The second half replaces all {IMG:url} in the expand text with an image tag.

      Example:

       {IMG:https://www.google.com/images/srpr/logo11w.png}

       

      Since I can't run JavaScript here it won't display but on mine it will show up as the Google logo. 

      29 May 2014
      1. User avatar

        Loreal Shead

        I do not know how to access the "Custom HTML in the admin panel" can you provide guidance?

        -disregard I think my version doesnt offer the Custom Html under look and feel (sad)

        Thanks so much for all your help (smile)

        29 May 2014
        1. User avatar

          Rachel Robins [Atlassian Tech Writer]

          Hi Loreal, if you are an OnDemand customer HTML macros are not available for security reasons.  If you have installed Confluence, then your administrator can choose to enable the HTML macros - these are disabled by default. There is more info on the HTML Macro page. 

          01 Jun 2014
  31. User avatar

    Maarten van der Zande

    I've placed several anchors in expand macros, but unfortunately I can't have pages redirect to these anchors. How can I make this work?

    03 Jun 2014
    1. User avatar

      Rachel Robins [Atlassian Tech Writer]

      Hi Maarten, I think an issue has been raised about this previously  CONF-27357 - Anchors should link to an expanded content instead of staying closed Open .  From my quick test it looks like a link to an anchor will only go to that anchor if it the expand is already expanded on the page - and there is no way to default the expand macros to expanded.  Sorry!.

      03 Jun 2014
    1. User avatar

      Stephen Deutsch

      Hi Maarten,

      maybe you could try the workaround I posted in the associated JIRA ticket:  CONF-27357 - Anchors should link to an expanded content instead of staying closed Open

      24 Nov 2014
  32. User avatar

    Ionut Constantin

     Hi,

     Is there any way to collapse the Expand macros instantiated within a page when in Edit mode? Its a bit difficult to edit a page with multiple expands that wrap around each other (sad)

     Thank U,

    Ionut 

     

    23 Jun 2014
    1. User avatar

      Rachel Robins [Atlassian Tech Writer]

      Hi Ionut, sorry there's no way to collapse the macros in Edit mode. 

      24 Jun 2014
  33. User avatar

    Emma Allfree

    When you export to PDF, the section is expanded, however, the 'Click here to expand' text is also included, which makes no sense for the PDF. Is there any way to remove this text in the PDF output? The documents are also read online, so I don't want to delete the text for when it is viewed online...

    26 Jun 2014
  34. User avatar

    Bernhard Schwager

    You can disable the text with following css code. Refer to Customising Exports to PDF for more information about using it.

    11 Jul 2014
    1. User avatar

      Emma Allfree

      Works perfectly, thanks Bernhard (smile)

      11 Jul 2014
  35. User avatar

    Khanh Nguyen

    is there a css that shows the expand title but hides the text within when doing a pdf export?

    30 Sep 2014
  36. User avatar

    Michael Ling

    I have a page where I need to include multiple expand macros (around 20) and each expand macro is linked to another page.  I noticed with this setup, it usually takes a long time for the page to load.  Is there any way to make the page load faster?

    16 Feb 2015
    1. User avatar

      Rachel Robins [Atlassian Tech Writer]

      Hi Michael,  I haven't seen this behaviour on pages with a lot of expand macros (but I'm not quite sure what you mean by linked to another page). If you could raise a bug  with some more information (and maybe an example of how you've got the expands set up) our team can investigate. 

      18 Feb 2015
      1. User avatar

        Michael Ling

        Hi Rachel, thanks for the response.  Here's the layout of the page.  There are basically 20+ "Expand" macros.  Each "Expand" macro has a "Panel" macro inside.  Within each "Panel" macro is an "Include Page" macro (each of which is linked to a different page).

        Basically when I click on the link to this page, it takes over a minute and a half to load.  I'm guessing because it needs to load all the different pages for each expand macro.  But is there a way to make the page load faster?

        18 Feb 2015
  37. User avatar

    Paul hanson

    Is there a way to change the default text from "Click here to expand..." to "Click here to view a screenshot..."?

     

     

    21 Apr 2015
    1. User avatar

      Esko Ryökäs

      Yes. We used it here: https://wiki.uef.fi/display/Theologyhomes/Images+of+the+School++-+Osasto+kuvina

      You can edit it as a part of editing the "Expand" macro, or with Wiki Markup. Unfortunately, it is no more possible for me to reproduce, how we did it ...

      21 Apr 2015
    1. User avatar

      Michael Ling

      Yes, just as Esko said, when you edit the Expand Macro, there will be an option, under the "Title" heading, for you to change the text to anything you like.

      21 Apr 2015
      1. User avatar

        Paul hanson

        I was looking for a way to have the default text automatically be "Click here to view a screenshot..." 
        Because we are not using the current default text - "Click here to expand..." - I edit the text manually each time I add an expand macro. If there was a way to set that default text, that would make my work more efficient.
        21 Apr 2015
        1. User avatar

          Giles Brunning [Atlassian Technical Writer]

          Hi Paul, Michael, and Esko,

          I'd say the answer would be to build your own add-on, as the default text will be in the code of the add-on, with no way to edit it in the UI.

          You could also try asking over at answers to see if anyone's already done this.

          22 Apr 2015
  38. User avatar

    Bernhard Schwager

    As a Confluence Administrator you can add following User Macro:

    22 Apr 2015
    1. User avatar

      Paul hanson

      Thank you so very much!!! I never thought to try and create a macro.

      22 Apr 2015
  39. User avatar

    Paul hanson

    Let me take this a step further. We use "Click here to view a screenshot..." on multiple pages - for this example, 20. I was trying to think of a way to store just the text "Click here to view a screenshot..." as the link to expand a drop-down. The reason I want to store that as a snippet is that if we decide that "Click here to view a screenshot..." needs to be changed to something else - perhaps "View a screenshot" - we wouldn't have to change those 20 pages.

    If there isn't a way to do what I'm asking, how would you approach this?


    04 Jun 2015
  40. User avatar

    John Alton

    I'd like to request an enhancement to the Expand macro: I'd like the macro to

    1. display text up to x many characters (that I'm able to specify)
    2. and display a "more" link (that would expand & display the additional / hidden text) when the character count surpasses the default or my specified character count 
    3. by default, text is hidden behind "more" until clicked.

    Anyone else have that need? Or know of an existing way to accomplish this? 

    thanks, 

    John 

    07 Jul 2015
    1. User avatar

      Hans-Peter Geier

      I like to support this suggestion.

      I work around this missing functionality with a combination of excerpt/ excerpt-include and the expand macro. Quite a hazzle for a functionality which every similar product has but not Confluence.

      08 Jul 2015
  41. User avatar

    KM

    This "show N first characters" option would be needed in at least the following macros:

    • Expand
    • Include
    • Excerpt Include
    • Recently Updated
    • Recently Updated Dashboard
    • (Children Display, Page Tree)

    Preferably, there would also be options for "more" and "go to" links (even both could be chosen).

    Preferably, there would also be "show M first sentences" and "show K first paragraphs" options too. (If more than 1 option chosen, they all restrict the amount shown, i.e., the tightest applies.) I would typically have at most 1 paragraph, at most 3 sentences, at most xxx characters.

    For example, I often want to show the top of a user-edited blog-type page, and I cannot require the users to use the Excerpt macro. I could use "Include" with N first characters to show most recent items of several such pages on a Home page.

    08 Jul 2015
  42. User avatar

    Thomas Hajek

    Is there any way to "format" the expand "title"?

    I've tried the solution discussed between Hanna Nelson/Dhyana Scarano from 2011 (listet as the very first comment above), but this doesn't work for me - maybe it's because we use Confluence 5.7.1.?

    Would be nice to have an "formatting" option in the macro itself to give at least one of the "standard" formats from Confluence (h1-h6, p, cite, code) ... or need to use some Add-Ons from third-party vendors (but they somtimes run in other problems ...) ...!

    Additional: Maybe some option to change the "toggle"-icon?

    Voting for the "expand/collapse all"-function from Jun 12, 2012!

    Thx & regards!

    31 Jul 2015
    1. User avatar

      Giles Brunning [Atlassian Technical Writer]

      Hi Thomas,

      Your best bet for styling the expand macro is using space or global CSS. I've done it previously to change the appearance, and it works well.

      As far as expand/collapse all, I don't think it applies to the expand macro, as it only has one expandable/collapsible section.

      03 Aug 2015
  43. User avatar

    Excio Erving Lao Jr.

    Hi Guys,

    Just wanted to know if it's possible to apply the Expand Macro via inline text?

    What I'm trying to do is have the option to show/hide an image using this macro.

    For example:

    This is a sample text

    [hidden image]

    This is a sample text

     

    Appreciate your assistance.

    Thanks and regards.

    13 Aug 2015
    1. User avatar

      Giles Brunning [Atlassian Technical Writer]

      Hi,

      Unfortunately, it's not currently possible. Feel free to make a suggestion so we can gauge the interest, though.

      18 Aug 2015
    1. User avatar

      Milo Grika

      You can do it with the Rollover macro (though the image reverts as soon as the mouse cursor leaves the picture). If you need step by step instructions, please ask the question at Atlassian Answers.

       

      18 Aug 2015
      1. User avatar

        Excio Erving Lao Jr.

        Milo Grika and Giles Brunning [Atlassian Technical Writer],

        Thank you for the help.

        I'll check out the Rollover macro.

         

        Have a nice day!

         

        Cheers,

        19 Aug 2015
Powered by Confluence and Scroll Viewport