This server will be upgraded at 3pm Sydney time on December 3rd (December 2nd, 8pm PST) and will be down for up to 30 minutes.

Content Formatting Macros

Name Content Formatting Macros
Vendor Adaptavist.com Ltd (Website)
Authors Alain Moran, Dan Hardiker
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.7
Availability Confluence v2.3-dr1 to v2.10
State Stable
Support Unsupported Plugins
License Freeware / Open Source (BSD)
Price Donate
Release Docs http://confluence.atlassian.com/display/CONFEXT/Content+Formatting+Macros
Java API Docs n/a
Download Source http://svn.atlassian.com/svn/public/contrib/confluence/contentFormattingMacros-plugin/tags/1.6.7
Download JAR adaptavist-plugin-contentFormattingMacros-1.6.7.jar
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?