The Atlassian Extension Spaces have been migrated to http://plugins.atlassian.com. These pages are now deprecated and will soon be deleted.

Content Formatting Macros

Name Content Formatting Macros
Vendor Adaptavist (Website)
Authors Dan Hardiker, Alain Moran, Shannon Krebs
Homepage http://confluence.atlassian.com/display/CONFEXT/Content+Formatting+Macros
Issue Management http://jira.adaptavist.com/browse/WEB
Continuous Integration n/a
Categories Formatting Macros
Most Recent Version 1.6.14
Availability confluence v3.0 to v3.1
State Stable
Support By: Adaptavist
License Freeware / Open Source (BSD)
Price Free
Release Docs
Java API Docs n/a
Download Source https://studio.plugins.atlassian.com/source/browse/WEBFormattingMacros-plugin/tags/1.6.14
Download JAR 18007

If running Confluence v2.3 or above make sure that the Confluence Compatibility Macros are disabled as that also has a {table} macro and is enabled by default.
This plugin is now available in the Confluence Repository Client.

Description/Features

A collection of macros designed for use easy content formatting:

  • Align divs
  • Lozenge buttons
  • Background colour and Highlights
  • Search box (specific space or global)
  • Graphical strikeout
  • Copyright, service mark, trademark, registered trademarks
  • Privacy mark and policy
  • Span, Div and Style control
  • Clickable regions
  • Round Rectangles

Requirements

None.

Installation

  1. Install the plugin jar using the admin interface
  2. You're done!

Tested Environments (confluence vs plugin version)

Confluence 1.4.x should use v1.0 of this plugin.

Confluence 2.0.x should use V1.0 of this plugin.

Confluence 2.1.x and above should use the latest version of this plugin.

Documentation

The macros in this pack are documented (with examples and related links) in the Builder User Guide:

  • lozenge - an attractive, customisable lozenge button
  • bgcolor - set content background color
  • highlight - highlight background of bits of content
  • copyright - insert a copyright statement
  • sm - insert a service mark
  • tm - insert a trade mark
  • reg-tm - insert a registered trademark
  • search-box - insert a search box (search current space, specified space or all spaces)
  • center - center content on screen (including tables, etc)
  • style - insert a style sheet (includes support for media specific styles and importing of external style sheets)
  • div - insert a div layer with custom class and style parameters
  • span - insert a span layer with custom class and style parameters
  • strike - a graphical strikeout effect
  • privacy-mark - displays a privacy indicator on-screen, linked to a privacy-policy
  • privacy-policy - displays a note regarding your privacy policy on-screen
  • clickable - hyperlinks all contained content to a page or URL
  • roundrect - an attractive customisable round rectangle
  • align - allows you to left/right/center and justify-align your content
  • table, tr, td - allows you to manually create html tables
  • iframe - allows you to create iframes
  • rollover - allows you to create rollover effects
  • fancy-bullets - allows you to use images attached to a page as bullet points

Many of the macros also have accompanying documentation in the Wiki Notation Guide.

Version History

Version Comments Author
1.0
  • Initial release
Adaptavist.com
1.1
  • Confluence 2.x compatability
  • Fixed some bugs with Lozenge
Adaptavist.com
1.2
  • Added round rectangle
Adaptavist.com
1.3
  • Added antialiasing to round rectangle
Adaptavist.com
1.3.1
  • Fixed bugs in rendering roundrect wiki content
Adaptavist.com
1.3.2
  • Fixed bugs in rendering headings and linfeeds within roundrect body content
Adaptavist.com
1.3.3
  • Removed background from lozenge images
  • Removed deprecated use of getDomainName
  • Removed dependance on http servlet request
Adaptavist.com
1.3.4 Upgraded the div macro David Peterson
1.4 Added align macro Adaptavist.com
1.4.1 Fixes for problem with lozenge and clickable when used in an installation with a non-root base path Adaptavist.com
1.4.2 Stop lozenge clickable area filling
macros, add footnote-like features to privacy-mark and privacy-policy
Adaptavist.com
1.4.3 Allow setting of the roundrect title & footer background colours separatley from the main background colour Adaptavist.com
1.4.4 Moved style macro over to using NO_RENDER for body RenderMode and allow antialiased roundrects to be placed on image backgrounds Adaptavist.com
1.5 Added table, table-row & table-cell macros Adaptavist.com
1.5.1 Added security validation for htmltag macros, ported div & span over to using htmltag, added class= parameter to most macros, added ability to have individual square corners on a roundrect or miss out rows entirely Adaptavist.com
1.6 Added rollover and iframe macros, updated html-tag validation and context help documentation Adaptavist.com
1.6.1 Added HTMLcomment, list item & unordered list macros, fixed roundrect for IE, added external target to rollover Adaptavist.com
1.6.2 Fixed NPE in lozenge and added fancy-bullets macro Adaptavist.com

Future Development

There are several more macros planned for this plugin in a future release:

  • typewriter - a simple typewriter effect (see user macro version)
  • dotted-line - create a dotted line across the screen (multiple colours)
  • button - add a simple button for custom content navigation (name may change)

There are a few others - if you have any comments or suggestions, please contact us or report them in our issue tracker.

Screenshots

Here's a few screen grabs of some of the macros in action...


 

Outstanding Tasks

Labels

confluence14 confluence14 Delete
confluence21 confluence21 Delete
confluence20 confluence20 Delete
plugin plugin Delete
content content Delete
formatting formatting Delete
macro macro Delete
adaptavist adaptavist Delete
repository_current repository_current Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. Nov 14, 2005

    Bob Swift says:

    Nice stuff! Thanks for providing this. Excellent documentation and looks good ...

    Nice stuff! Thanks for providing this. Excellent documentation and looks good too! It is good you bundled all of these in a single plugin - that makes it easier to install.

  2. Mar 01, 2006

    Bob Swift says:

    So what does the {xyzzy} macro do?

    So what does the {xyzzy} macro do?

    1. Mar 01, 2006

      Guy Fraser says:

      Exactly what you'd expect it to

      Exactly what you'd expect it to

  3. Sep 03, 2006

    Bhavin Turakhia says:

    I cant seem to find the "table" macro documented anywhere. and it doesnt seem to...

    I cant seem to find the "table" macro documented anywhere. and it doesnt seem to work in my confluence install. I tried putting the following -

    {table:width=100%}{tr}{td}whatever{td}{tr}{table} 

    and it doesnt seem to wkr

    • Bhavin
    1. Sep 05, 2006

      Alain Moran says:

      The table macro is not yet fully documented, at this time the only docs are thos...

      The table macro is not yet fully documented, at this time the only docs are those at www.w3schools.com ... the table, tr, td, div, span and iframe macros are all built on a framework that allows quick implementation of HTML tags ... basically I take the list of properties on www.w3schools.com, define regex validations for them, add the tagname and youre done .. so if w3schools says you can do it, then the macro implements it.

      If there are any other tags people want access to then please let me know and I'll schedule them in for a future release.

      What versions of confluence & content formatting are you using?

      1. Sep 05, 2006

        Alain Moran says:

        it should be noted that the javascript events are NOT implemented.

        it should be noted that the javascript events are NOT implemented.

  4. Oct 10, 2006

    Neil Arrowsmith says:

    I've just installed version 1.6.1 of this plugin, and the nice table of lozenges...

    I've just installed version 1.6.1 of this plugin, and the nice table of lozenges that I had set up have been completely messed up, with lots of errors like "Error formatting macro: lozenge: java.lang.NullPointerException"

    I think it's an issue with how i'm using it as, a new empty lozenge works OK, but this doesn't:

    {lozenge:link=SALES:Home|icon=Sales & Marketing|color=purple|arrow=none}
    
    1. Oct 10, 2006

      Alain Moran says:

      Ah .. sorry about that ... this is fixed in 1.6.2 which I will be releasing any ...

      Ah .. sorry about that ... this is fixed in 1.6.2 which I will be releasing any minute now!

      1. Oct 10, 2006

        Alain Moran says:

        1.6.2 should be available in a repository near you very shortly

        1.6.2 should be available in a repository near you very shortly

        1. Oct 11, 2006

          Neil Arrowsmith says:

          Thanks Alain, that fixes the problem. Thanks for getting the fix up so quickly.

          Thanks Alain, that fixes the problem. Thanks for getting the fix up so quickly.

          1. Oct 11, 2006

            Alain Moran says:

            Heh ... I've actually had the fix sat waiting for release for a while, it was he...

            Heh ... I've actually had the fix sat waiting for release for a while, it was held back a little by the addition of the fancy-bullets macro, but then other plugins got in the way of releasing this ... sorry :s

            1. Oct 12, 2006

              Neil Arrowsmith says:

              Hello again I've got another problem with my lozenges. The lozenges have links ...

              Hello again

              I've got another problem with my lozenges. The lozenges have links configured, and I'm using text "icons" on the coloured part of the lozenge, which I think might cause the problem. If I click on the coloured part, then nothing happens. The behavious is then different for Firefox and IE. With firefox, the next click on the coloured part will activate the link. With IE you can click away forever and the link never gets activated.

              1. Oct 12, 2006

                Alain Moran says:

                Would it be possible for you to give me an example?

                Would it be possible for you to give me an example?

                1. Oct 12, 2006

                  Neil Arrowsmith says:

                  I can't give you a live example as our Confluence installation doesn't have publ...

                  I can't give you a live example as our Confluence installation doesn't have public access, but here's the wiki syntax i've used:

                  {lozenge:link=HR:HR & Finance Home|icon=HR & Finance|color=silver|arrow=none}HR Procedures & Forms{lozenge}
                  
                  1. Oct 12, 2006

                    Alain Moran says:

                    Thats cool ... it was the wiki markup I was after anyway However unfortunatley...

                    Thats cool ... it was the wiki markup I was after anyway

                    However unfortunatley I'm not able to reproduce your result, the lozenge works perfectly on my install.

                    What version of confluence are you using? (I assume you're using 1.6.2 of CFM)

                    Are you seeing any javascript errors at all?

                    What is the lozenge surrounded by?

                    What happens when you put the above markup into an empty page?

                    1. Oct 12, 2006

                      Neil Arrowsmith says:

                      We're using Confluence 2.2.5, and CFM 1.6.2. No Javascript errors. And I don't...

                      We're using Confluence 2.2.5, and CFM 1.6.2.

                      No Javascript errors.

                      And I don't get the problem on a fresh page - ah, something I should have said. The lozenges causing the problem are in a table cell (or more correctly a {table-plus} cell)

                      Can you recreate it if you try it in a table?

                      1. Oct 12, 2006

                        Neil Arrowsmith says:

                        I can be more specific about this now. Looks like the Lozenge macro doesn't play...

                        I can be more specific about this now. Looks like the Lozenge macro doesn't play nice with table-plus. I've replaced the table-plus with a regular table and all works fine. There wasn't actually a proper reason to be using table-plus in this case, so this is no longer a big problem for me.

                        And as the table-plus macro is written by someone different, I guess the responsiblity for resolving it might be debatable I'll cross post to that macro's page.

  5. Oct 12, 2006

    André Bangma says:

    If i use the header command (h1. t/m h5.) in conjunction with the Center macro (...

    If i use the header command (h1. t/m h5.) in conjunction with the Center macro (Content formating macro's) everythings goes allright when i view the page or print it. But when i convert the page to an adobe acrobat format, i get an error, (see Oops -an error has occured_bestanden) When i only use header or center everything goes allright. I tried the latest version 1.6.2 of the Content formating plugin, but the problem keeps the same. I'm currently using Confluence 2.2.8. See attachments for the errors

    Kind regards, André Bangma, Technical Application Administrator of KIS (based on Confluence

    1. Oct 12, 2006

      André Bangma says:

      Sorry, forgot the attachments. See: Oops - an error occurred.htm

      Sorry, forgot the attachments. See: Oops - an error occurred.htm

      1. Oct 12, 2006

        André Bangma says:

        Oops - an error has occurred.htm main-action.css cookieUtils.js
        1. Oct 12, 2006

          Alain Moran says:

          Neither main-action.css or cookieUtils.js are part of content formatting, so I w...

          Neither main-action.css or cookieUtils.js are part of content formatting, so I would imagine that the problem lies elsewhere.

          All the {centre} macro does is wrap the content in a <div style="text-align:center;"> ... </div>, so I'm guessing that the problem lies somewhere in confluence's pdf export.

          Its probably relying on the header being the first thing on the line, have you tried the following:

          {center}
          h1. my heading
          {center}
          
          1. Oct 24, 2006

            André Bangma says:

            Hello Alain,  I tried your solution. It works fine. When i try the Align m...

            Hello Alain,

             I tried your solution. It works fine. When i try the Align mode, the same error occurs when i put the h1. before the Align command. I can work with this workaround. Thanks for your answer.

            With kind regards, André Bangma

  6. Nov 06, 2006

    David Aldrich says:

    Hi Alain, How can I emulate the <th> tag, i.e. use table-cell to achieve a...

    Hi Alain,
    How can I emulate the <th> tag, i.e. use table-cell to achieve a heading like the leftmost screenshot of the second row of screenshots above?

    David

  7. Dec 16, 2006

    Andrew Whyte says:

    Is it just me, or are all the documentation links broken? I can't seem to succes...

    Is it just me, or are all the documentation links broken? I can't seem to successfuly find documentation on the full use and options for most of the macros in this set.

    Without a decent example it's kind of difficult to figure out exactly how to use options like frame and rules for the table macro. :-/

    Can someone suggest a place I might find this stuff?

    1. Dec 16, 2006

      Alain Moran says:

      The iframe and table macros are duplicates of the HTML tags that they are named ...

      The iframe and table macros are duplicates of the HTML tags that they are named after, you should be able to find a plethora of documentation about HTML on the web, however the following URL is the reference that was used to define regex that validates the list of properties and their possible values.

      http://www.w3schools.com/tags/default.asp

  8. Jan 18, 2007

    Alexander Bollens says:

    Hi! I have a problem while trying to use the search-box Macro. When I put ...

    Hi!

    I have a problem while trying to use the search-box Macro.

    When I put the Macro on a page every thing is fine and can use it. But when I try to edit the page again I got an error  using the Rich-Text-Editor. The following Error-Message appears:

    "Unable to render content due to system error: com/adaptavist/confluence/VelocityMacro.suppressSurroundingTagDuringWysiwygRendering?"

    Can anybody help me.

    Thanks, Alex

    1. Jan 18, 2007

      Alain Moran says:

      1) What version of confluence are you using? 2) Is the macro displayed in a buil...

      1) What version of confluence are you using?
      2) Is the macro displayed in a builder panel, or is this with the default confluence theme?
      3) What happens when you pul ONLY the search-box macro into the page and no other content?

      1. Jan 19, 2007

        Alexander Bollens says:

        1) I'm using Confluence Version 2.2.10 2) I'm using the Confluence Left Navigati...

        1) I'm using Confluence Version 2.2.10
        2) I'm using the Confluence Left Navigation Theme
        3) With a new page I have the same prroblem.

        Procedure:
        - Creating a new Page
        - Entering {search-box} in "Rich Text" Editor
        - Switching to "Wiki Markup" Editor
        - Switching back to "Rich Text" Editor
        - The Error-Message "Unable to render content due to system error: com/adaptavist/confluence/VelocityMacro.suppressSurroundingTagDuringWysiwygRendering" appears in the "Rich Text" Editor and all other content is gone

        1. Jan 20, 2007

          Alain Moran says:

          I should have asked before, but what version of content formatting are you using...

          I should have asked before, but what version of content formatting are you using?

          Also, does this happen with any of the other VelocityMacro based macros, eg: {align}, {center}, {copyright} etc..?

          I dont currently have a 2.2.x release of confluence setup (I'm working on builder 2.1 at the moment which is 2.3 only), and our online sites have the RTE disabled because it causes so many problems, so I'm going to need you to test things out for me.

          I'm guessing that this could be an issue with the RTE since none of the VelocityMacro based macros have any RTE functionality. So in theory they should be ignored by the RTE and rendered as text, its possible though that the RTE isnt coping well with the fact that this macro doesnt have a body.

          My immediate suggestion for a workaround would be to disable the RTE

          1. Jan 24, 2007

            Alexander Bollens says:

            I'm using the version from 14-11-2005 of content formatting. I thing that is the...

            I'm using the version from 14-11-2005 of content formatting. I thing that is the latest version.

            I tryied the macros {copyright} {bgcolor} {highlight} All have the same problem.

            When I disable the RTE it is OK. But I don't like this solution

            Maybe I try to migrate to Confluence 2.3 and see what happens in this version.

            1. Jan 24, 2007

              Alain Moran says:

              The latest release of content formatting is version 1.6.4, which was released on...

              The latest release of content formatting is version 1.6.4, which was released on 1st November 2007, you should probably try upgrading to a more recent version of content formatting first

              1. Jan 24, 2007

                Alain Moran says:

                Ooops .. sorry .. typo (in the content formatting metadata) 10th Jan 2007 .... ...

                Ooops .. sorry .. typo (in the content formatting metadata)

                10th Jan 2007 .... I will update the metadata to use the right date format!

                Grr, those pesky american's and their bass ackwards date formats!

  9. Jan 25, 2007

    Christopher Christophorou says:

    Hi, I can't seem to find documentation anywhere for the {iframe} macro. Does t...

    Hi,

    I can't seem to find documentation anywhere for the {iframe} macro.

    Does this macro have any documentation?

    Thanks.

  10. Jan 25, 2007

    Alain Moran says:

    Unfortunatle the only documentation that exists for the iframe (and several othe...

    Unfortunatle the only documentation that exists for the iframe (and several other of the html tag replication macros) is in the confluence notation guide (on the right when you edit a page), this is one of several macros (like the {table} macro) which directly replicate the html tag of the same name. So documentiong these in HTML isnt a high priority at the moment.

  11. May 04, 2007

    Haider says:

    table:border=1 does not work. Any ideas why it wont work. I am using confluence ...

    table:border=1 does not work. Any ideas why it wont work. I am using confluence 2.5

    1. May 04, 2007

      Guy Fraser says:

      Confluence default style sheet removes the border - you'll have to do something ...

      Confluence default style sheet removes the border - you'll have to do something like this:

      {table:border=1|style=border:1px solid #000;}
      ...
      
      1. May 07, 2007

        Haider says:

        I tried the following and it did not work on condluence 2.5. Any ideas? windo...

        I tried the following and it did not work on condluence 2.5. Any ideas?

        {table:border=1|style=border:1px solid #000;}
        {tr}
        {td}Cell 1{td}
        {td}Cell 2{td}
        {tr}
        {table}
        
        1. May 07, 2007

          Dan Hardiker says:

          Can you confirm that the Compatibility Macros are disabled? This has a {table} ...

          Can you confirm that the Compatibility Macros are disabled?

          This has a {table} macro which can interfere with this plugin's operation.

          1. May 07, 2007

            Haider says:

            Thanks this worked.

            Thanks this worked.

  12. Sep 07, 2007

    Robert Tosch says:

    How can I make cells with the table-macro, which span multiple rows or colu...

    How can I make cells with the table-macro, which span multiple rows or columns?

    1. Sep 07, 2007

      Alain Moran says:

      Use colspan & rowspan just as you would in HTML .. these macros are DIRECT a...

      Use colspan & rowspan just as you would in HTML .. these macros are DIRECT analogues of the html tags that they are named after.

      1. Sep 10, 2007

        Robert Tosch says:

        Thanx. It works fine Now I've to try out, how to make the heading cell backgro...

        Thanx. It works fine

        Now I've to try out, how to make the heading cell background grey

        1. Sep 10, 2007

          Guy Fraser says:

          Same way you would on the HTML equivalents - either use the class or style param...

          Same way you would on the HTML equivalents - either use the class or style param. To make the tables look the same as Confluence tables, add a class=confluenceTable to the table macro, then a class=confluenceTh to the th's and a class=confluenceTd to the td's.

          1. Sep 10, 2007

            Robert Tosch says:

            Great! Now the table looks fine. Thank you. Any idea, how to merge this&nbs...

            Great! Now the table looks fine. Thank you.

            Any idea, how to merge this table with spanning headline cells with the
            table-data macro from the scaffolding-plugin?
            I want to create a template, with a dynamic table which has cellspanning headlines.

            1. Sep 10, 2007

              David Peterson [CustomWare] says:

              {table-data} doesn't have any way of specifying column or row spanning at the mo...

              {table-data} doesn't have any way of specifying column or row spanning at the moment.

  13. Jan 21, 2008

    Frank Haefemeier says:

    Hi, I am very interested to use this plugin, but how can I download it without ...

    Hi,

    I am very interested to use this plugin, but how can I download it without the repository client? This page display the error

    Bye

        Frank
     

    1. Jan 21, 2008

      Frank Haefemeier says:

      Oh, now it is working. I get the header table with the latest plugin link.

      Oh, now it is working. I get the header table with the latest plugin link.

  14. Feb 16, 2008

    Kevin Ross says:

    Open source BSD license but no source?  I'm not sure that makes sense, perh...

    Open source BSD license but no source?  I'm not sure that makes sense, perhaps either the source should be referenced or 'Open Source' should be removed from the description.

    Am I missing a link to the source or subversion?

    1. Feb 17, 2008

      Alain Moran says:

      Sorry that was a bit harsh, got out of the wrong side of bed ths morning, you an...

      Sorry that was a bit harsh, got out of the wrong side of bed ths morning, you an find the source for content formating (alongside the source of most of the other open-source plugins) here:

      http://svn.atlassian.com/fisheye/browse/public/contrib/confluence/contentFormattingMacros-plugin

  15. Apr 15, 2008

    Slava Kandakou says:

    I still can't find any examples for iframe. Can someone, please, provide an exam...

    I still can't find any examples for iframe. Can someone, please, provide an example?

    Thank you.

    1. Apr 15, 2008

      Leslie Power says:

      Syntax seems to be no quotes, attributes separated by a pipe... (At least, that ...

      Syntax seems to be no quotes, attributes separated by a pipe... (At least, that worked for me.)

      {iframe: width=700|height=700|frameborder=0|src=mystuff}{iframe}
      

    2. Apr 16, 2008

      Alain Moran says:

      Did you try looking in the notation guide? The iframe macro is a direct analogu...

      Did you try looking in the notation guide?

      The iframe macro is a direct analogue of the iframe tag, the only difference is that there is no way to use the JS events (this is deliberate), so you use it just like you would an iframe in html.

  16. Jul 29, 2008

    Peter R. says:

    Anyone know the difference between 1.6.5 and 1.6.6? There aren't any release not...

    Anyone know the difference between 1.6.5 and 1.6.6? There aren't any release notes. Thanks.

  17. Sep 04, 2008

    David Lacey says:

    The roundrect macro has some css issues on the bottom corners when using the new...

    The roundrect macro has some css issues on the bottom corners when using the new Default Theme in 2.8. I don't know if this problem exists in 2.9. It works fine in the Classic Theme.

    1. Sep 08, 2008

      Nat Budin says:

      I noticed the same thing, and I posted a bug report. The bug report contains a ...

      I noticed the same thing, and I posted a bug report. The bug report contains a workaround I discovered through some trial and error.

      You can read the bug report here: http://jira.adaptavist.com/browse/WEB-65

  18. Sep 25, 2008

    Carol Geng says:

    It seems I can't have the color work on Internet Explorer 6.0: window.SyntaxH...

    It seems I can't have the color work on Internet Explorer 6.0:

    {bgcolor:red}red color{bgcolor} 
    

    Any suggestions?

    Thanks,

    Carol

    1. Nov 04, 2008

      Alain Moran says:

      IE probably doesnt like the named colours, you could try using #FF0000 instead

      IE probably doesnt like the named colours, you could try using #FF0000 instead

  19. Oct 22, 2008

    Andrew Livingston says:

    Can someone please confirm whether or not any of these macros would expose us to...

    Can someone please confirm whether or not any of these macros would expose us to cross-site scripting attacks?
    Do they work with "Anti XSS Mode", and would that prevent any potential problems?

    1. Nov 04, 2008

      Alain Moran says:

      I'd be interested to hear why you feel that these macros could present an xss ri...

      I'd be interested to hear why you feel that these macros could present an xss risk?

      1. Nov 20, 2008

        Andrew Livingston says:

        I don't know much about xss, but these appear to allow users to write HTML, whic...

        I don't know much about xss, but these appear to allow users to write HTML, which I understand is bad (and why the Atlassian HTML Macros are disabled by default).

        1. Nov 21, 2008

          Alain Moran says:

          The html tag macros that content formatting provides deliberately prevent the us...

          The html tag macros that content formatting provides deliberately prevent the user from adding any javascript to the page, as such these macros should not present an XSS risk .. feel free to attempt to use them to create an XSS attack, however you should find that they throw a MacroException complaining about the invalid syntax of the parameter you are trying to abuse.

          Internally, all parameters are validated to ensure that they conform with the w3c spec, for instance here is the complete code for the iframe macro:

          package com.adaptavist.confluence.contentformatting;
          
          import java.util.HashMap;
          
          public class IframeMacro extends HtmlTagMacro {
              public String getTagname() {
                  return "iframe";
              }
          
              public HashMap generateRegex(HashMap regex) {
                  regex.put("align","(left|right|top|middle|bottom)");
                  regex.put("frameborder","[01]");
                  regex.put("height","[0-9]*(%|px){0,1}");
                  regex.put("longdesc","[^\">]*");
                  regex.put("marginheight","[0-9]*(px){0,1}");
                  regex.put("marginwidth","[0-9]*(px){0,1}");
                  regex.put("name","[^\">]*");
                  regex.put("scroling","(yes|no|auto)");
                  regex.put("src","[^\">]*");
                  regex.put("width","[0-9]*(%|px){0,1}");
                  return addStdAttributes(regex);
              }
          }
          

          The HtmlTagMacro class is just a framework that takes a list of regular expressions, looks for parameters passed to the macro with those names, validates them and then formats out a tag with the specified tag name ... simple but effective

  20. Nov 04, 2008

    Alister Scott says:

    When using multiple lozenge macros in columns and sections, in Confluence 2.9.2 ...

    When using multiple lozenge macros in columns and sections, in Confluence 2.9.2 (latest) there is no spacing between the lozenges. For example:
     Compared to previous versions:
     
     I like the previous version better. Any advice on what to do to make it look like the old version?

  21. Nov 04, 2008

    Alain Moran says:

    Add the following css window.SyntaxHighlighter.config.clipboardSwf = '/s/172...

    Add the following css

    table.lozenge { margin:3px; }
    
    1. Nov 04, 2008

      Alister Scott says:

      Alain: sorry, newbie question, where exactly do I add this CSS?

      Alain: sorry, newbie question, where exactly do I add this CSS?

      1. Nov 04, 2008

        Alain Moran says:

        If you are using builder then you add it to your 'custom css' through the css ta...

        If you are using builder then you add it to your 'custom css' through the css tab in the layout manager, if you are using confluence then you will need to use the custom html options in site admin.

        1. Nov 04, 2008

          Alister Scott says:

          I added this to the custom html but it didn't make any difference. This command ...

          I added this to the custom html but it didn't make any difference. This command simply appeared on the Confluence page.

          1. Nov 04, 2008

            Alain Moran says:

            custom HTML is exactly that ... it is HTML ... not css styles Try wrapping it ...

            custom HTML is exactly that ... it is HTML ... not css styles

            Try wrapping it in style tags:

            <style>
            table.lozenge { margin:3px; }
            </style>
            
            1. Nov 04, 2008

              Alister Scott says:

              Sorry, but thanks! excellent . The vertical spacing looks fine, now only th...

              Sorry, but thanks! excellent . The vertical spacing looks fine, now only the horizontal spacing doesn't work.

              Is there another trick I should know? I have two columns both width=50%. I tried width=48% but they look the same.

               

              1. Nov 05, 2008

                Alain Moran says:

                Something is overriding the margin setting, try using the following css wind...

                Something is overriding the margin setting, try using the following css

                <style>
                table.lozenge { margin:3px !important; }
                </style>
                
                1. Nov 05, 2008

                  Alister Scott says:

                  Thanks for your suggestion, but no, that didn't work. It still looks the same.

                  Thanks for your suggestion, but no, that didn't work. It still looks the same.

                  1. Nov 05, 2008

                    Alain Moran says:

                    Please create an issue in the GSUP project at tracker.adaptavist.com where our C...

                    Please create an issue in the GSUP project at tracker.adaptavist.com where our CSS people will be glad to help you further.

                    1. Nov 05, 2008

                      Alister Scott says:

                      Thanks Alain, I raised it as a support issue: Link

                      Thanks Alain, I raised it as a support issue: Link

                      1. Nov 11, 2008

                        Alister Scott says:

                        Emma Rush has suggested changing the width of each macro to 99% which makes the ...

                        Emma Rush has suggested changing the width of each macro to 99% which makes the horizontal spacing work.

  22. Dec 08, 2008

    Stuart Gilberd says:

    Is there any documentation about the new search-box functionality?  I rolle...

    Is there any documentation about the new search-box functionality?  I rolled back the upgrade after all the search boxes we had set up to search just the space they were in gained drop boxes with global search as the default search.

    It would be the nice if the default option was the same as it was and the dropdown box was an option....

  23. Dec 25, 2008

    Benjamin Robinson says:

    I'm having the same problem as Stuart Gilberd above. I'm trying to use the seach...

    I'm having the same problem as Stuart Gilberd above. I'm trying to use the seach-box to find information in one specific space, then group that information by type. My code is as follows.

    {search-box:space=TEST|group=type}

    As Stuart explained, i only get a dropdown box next to the search box with an option to search the TEST space. However, the dropdown box defaults to Global Spaces, which is not helpful. Furthermore, the results do not group by type.

    Any advice would be greatly appreciated! Thanks.

  24. Feb 23, 2009

    Richmond-rae Dalisay says:

    Salutations, The lozenge macro works fine for me. Just a question, is it possib...

    Salutations,

    The lozenge macro works fine for me. Just a question, is it possible that its link parameter when activated/clicked directly opens the link in a new page or a tab?

    Thanks in advance.

  25. Apr 08, 2009

    Harikrishnan says:

    Hi, Currently we are using multiple iframes in a wiki page to render external u...

    Hi,

    Currently we are using multiple iframes in a wiki page to render external url's..  Sometimes all iframes are get rendered. but some times only few iframes are get displayed.  what will be the reason?  how to make all iframes get worked at all times ?

    could anyone advise?

    Thx

    Hari.

  26. Jun 26, 2009

    Cameron Mosher says:

    I realize the lozenge macro was intentionally designed to "break" when there is ...

    I realize the lozenge macro was intentionally designed to "break" when there is too much text inside it. However, we still have users that like to use 800x600 resolution, and even concise descriptions are too long, and cause the lozenge to "break" for them. Is there any way, using CSS even (which is easy in the latest Confluence release) to either allow the lozenge to grow, or to specify its height?

  27. Jul 22, 2009

    abed says:

    hi i have this problem with the lozenge macro when using it in a user macro (th...

    hi

    i have this problem with the lozenge macro when using it in a user macro (the links and icons are not apear inside the box), this problem happened when i upgrade the confluecne to 3.0

    even thoug it works with out using it in the user macro, it was working fine in the previous version of confluecne 2.10.2

    can any one help

    thanks

  28. Jul 30, 2009

    Matt Boesch says:

    Is this going to be updated to work with Confluence 3.0?  I do not see it t...

    Is this going to be updated to work with Confluence 3.0?  I do not see it the Confluence 3.0 Plugin Repository.

    1. Jul 31, 2009

      Guy Fraser says:

      We're currently compiling a task list to update all 30+ of our open source plugi...

      We're currently compiling a task list to update all 30+ of our open source plugins to Confluence 3.x compatible. We'll be announcing updates in our plugins blog.

      As for the plugin repo, it's a bit of a mess at the moment. Atlassian were going to switch over to using plugins.atlassian.com but released it half baked and it's a major pain for us to maintain plugin details in there (cumbersome web ui for plugin devs). If we had just one or two plugins it wouldn't be an issue, but with 30+ it's going to take days just to update p.a.c and we can't spend that amount of time on freebies so there's a chance the data in p.a.c will get really out of date. We'll still update the metadata in the old repo for now, but not sure what will happen when Atlassian fully switch over to p.a.c.

  29. Aug 04, 2009

    Angela Burrows says:

    I'm unable to see this in the Confluence 3.0 Repository and its preventing me fr...

    I'm unable to see this in the Confluence 3.0 Repository and its preventing me from using theme builder  :(

    Any idea when it will be available?

    1. Aug 04, 2009

      Alain Moran says:

      Shortly after atlassian fix their repository code ... at this point in time nobo...

      Shortly after atlassian fix their repository code ... at this point in time nobody really knows which out of the plugin repository metadata & plugins.atlassian.com is authoritative.

      As a workaround, please download the jar manually from here: http://svn.atlassian.com/svn/public/contrib/confluence/contentFormattingMacros-plugin/jars/adaptavist-plugin-contentFormattingMacros-1.6.9.jar

      And install it through the more reliable plugins.action: http://confluence.atlassian.com/display/DOC/Installing+and+Configuring+Plugins+Manually

  30. Oct 29

    Sally Duval says:

    Hi, I would like to install this plugin but our Confluence 2.8.2 is running on J...

    Hi, I would like to install this plugin but our Confluence 2.8.2 is running on Java 1.4 and I've had some problems loading plugins that were compiled with newer versions of Java. Could you please tell me which version of this plugin will work with Java 1.4 ?

    1. Nov 05

      Guy Fraser says:

      Suggest using Java 1.5 or above. We have no plans to make any of our open source...

      Suggest using Java 1.5 or above. We have no plans to make any of our open source plugins work with Java 1.4 as it's EOL'ed by Sun.

  31. Nov 05

    Don Gamble says:

    In the discussion above there is a thread (http://confluence.atlassian.com/displ...

    In the discussion above there is a thread (http://confluence.atlassian.com/display/CONFEXT/Content+Formatting+Macros?focusedCommentId=170493004#comment-170493004) discussing the spacing between lozenges.  There is some recommended CSS to put into Confluence's Custom HTML.  Doing this makes things better, but does not solve the issue completely.  When you are previewing a page the spacing is incorrect.

    Are there plans to move this CSS into the plugin?

    BTW, I opened a related JIRA issue (http://jira.adaptavist.com/browse/WEB-79) if people wish to vote for this.

    Thanks,
    don.

    1. Nov 05

      Guy Fraser says:

      At some point, yes, we're just utterly swamped at the moment so it will probably...

      At some point, yes, we're just utterly swamped at the moment so it will probably be December/January before we get round to this. Will see if we can get one of our junior devs to look at it.

  32. Nov 30

    huhadhac says:

    The roundrect macro is not displayed correctly on our Confluence v3.0.1. The ro...

    The roundrect macro is not displayed correctly on our Confluence v3.0.1.

    The roundrect macro is displayed differently when opened in firefox or in IE . (see attached screenshots)

    This is how it displays in Internet Explorer:

    And this is how it looks in Firefox:

    This might be css related.

    Can this issue be solved by some css settings?

    Any help/ideas are welcome.

  33. Dec 16

    Christian N says:

    Hi, is there any way to get conditional comments to work with style macro ? e....

    Hi,

    is there any way to get conditional comments to work with style macro ?

    e.g.

    {style}
    < !––[if lt IE 7]>––>
    div.topsectionright span.bigsize span.image-wrap img{width:140% !important;}
    <![endif]-->
    {style}