deck.tab.active.background = #6495ED

Content Formatting Macros

A set of macros that allow easy formatting of Wiki content.

This plugin includes the following macros:
  • lozenge - an attractive, customisable lozenge button
  • bgcolor - set content background color
  • highlight - highlight background of bits of content
  • Symbols - insert a service, trade, or registered trademark.
  • center - center content on screen (including tables, etc)
  • strike - a graphical strikeout effect
  • 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
  • iframe - allows you to create iframes
  • rollover - allows you to create rollover effects

This macro creates a professional lozenge effect that's ideal for creating professional looking buttons or simply highlighting important information.

The Code

With an icon:

{lozenge:icon=!bell.png!|title=Announcement}Some important news here...{lozenge}

Without an icon and with a custom color:

{lozenge:title=Announcement|color=red}Some important news here...{lozenge}

Result

With an icon :

Some important news here...

Without an icon and with a custom color:

Some important news here...

Parameters

Name

Required?

Default

Description

link

(error)

 

if specified, clicking the lozenge will go to the specified link.

color

(error)

silver

The color of the left portion of the lozenge.

arrow

(error)

none or blue

Defines which arrow to use on the left portion of the lozenge:

  • none (default if no "link" specified) - the arrow will not be displayed
  • blue (default if a link is specified) - a blue arrow will be displayed
  • green - a green arrow will be displayed.

title

(error)

 

The title to show at the top of the main panel.

icon

(error)

 

Attach an image (see above) or some text to the left of the lozenge.

width

(error)

347px

The width of the entire lozenge in pixels or as a percentage. Specify auto to make the lozenge automatically stretch to fit it's contents.

Sets the background color for a section of content. You can specify a background color using color names or hexadecimal color codes.

The Code

Color names:

{bgcolor:red}red{bgcolor}
{bgcolor:yellow}yellow{bgcolor}
{bgcolor:green}green (default){bgcolor}
{bgcolor:cyan}cyan{bgcolor}
{bgcolor:blue}blue{bgcolor}
{bgcolor:purple}purple{bgcolor}

Hexadecimal:

{bgcolor:#E47833}mandarin orange{bgcolor}
{bgcolor:#802A2A}brown{bgcolor}
{bgcolor:#F08080}light coral{bgcolor}
{bgcolor:#800000}maroon{bgcolor}
{bgcolor:#D44942}chili{bgcolor}
{bgcolor:#CDB7B5}misty rose{bgcolor}

Result

Color names:

red

yellow

green

cyan

blue

purple

Hexadecimal:
mandarin orange

brown

light coral

maroon

chili

misty rose

Parameters

{bgcolor:myColor}your content{bgcolor}

Name

Required?

Default

Description

default

(tick)

green

The "myColor" default parameter defines the background colour for the content contained within the macro and can be either a common colour name (supported by most browsers) or a hexadecimal colour code (supported by all browsers).

Allows you to highlight a portion of content. You can specify a color using color names or hexadecimal color codes.

The Code

{highlight:red}red{highlight}
{highlight:yellow}yellow (default){highlight}
{highlight:green}green{highlight}
{highlight:cyan}cyan{highlight}
{highlight:blue}blue{highlight}
{highlight:purple}purple{highlight}

Result

red

yellow

green

cyan

blue

purple

Parameters

{bgcolor:myColor}your content{bgcolor}

Name

Required?

Default

Description

default

(tick)

yellow

The "myColor" default parameter defines the background colour for the content contained within the macro and can be either a common colour name (supported by most browsers) or a hexadecimal colour code (supported by all browsers).

Add a trademark, a service mark, copyright, or registered trademark

The Code

Trademark:

{tm}Like a Rock{tm}

Service Mark:

{sm}My Service{sm}

Copyright:

{copyright}2010 Massachusetts Institute of Technology{copyright}

Registered Trademark:

{reg-tm}Registered Trademark{reg-tm}

Result

Trademark:

Like a Rock

Service Mark:
My Service

Copyright:
2010 Massachusetts Institute of Technology

Registered Trademark:
Registered Trademark

Use this macro to center a portion of content.

The Code

{center}Some centered content.{center}

Result

Some centered content.

This macro is designed to allow a single page to have custom styles applied to it. The style sheet can optionally be restricted to specific media types and you can optionally import an external style sheet from a URL.

The Code

This style sheet will make citation text look pretty:

{style}
/* citation */
cite:before {
 content: "\"";
}
cite:after {
 content: "\"";
}
cite, cite:before, cite:after {
 font-family: Georgia, "Times New Roman", serif;
 font-style: italic;
}
{style}

Now enter some citation text:

??Some citation text??

Result

Some citation text

Parameters

{style:media=x,y,z|import=url}
style sheet
{style}

Name

Required?

Default

Description

media

(error)

All

The media to apply this style sheet to, by default all media types are used.

import

(error)

 

Optionally specify a URL to import an external style sheet.

Adds a more graphical representation of deleted text.

The Code

{strike}deleted text{strike}

Result

deleted text

With this macro you can easily and cleanly link entire blocks of text, panels and just about anything else that appears on your Wiki pages.

The Code

Visit the {clickable:I NEED HELP!!|HELP:Home}*Wiki Help Pages*{clickable} for support.

Result

Visit the

Wiki Help Pages
for support.

Parameters

{clickable:tooltip|link}body content{clickable}

Name

Required?

Default

Description

default

(tick)

 

The default parameter should contain a tooltip and the page to link to (which can be an internal or external link as desired.

Creates a round rectangle with text or content.

The Code

Without a custom color:

{roundrect}Some Content{roundrect}

With a custom color:

{roundrect:bgcolor=#9966CC }Some Content{roundrect}

With a custom color and title:

{roundrect:bgcolor=#9966CC |title=Title}Some Content{roundrect}

Result

Without a custom color:

Some Content

With a custom color:

Some Content

With a custom color and title:

Some Content

Parameters

{roundrect:title=myTitle}body content{roundrect}

Name

Required?

Default

Description

bgcolor

(error)

#C0FFC0

The background colour of the rounded rectangle, this should be specified as a hex value.

title

(error)

 

The contents of the title cell, if required.

footer

(error)

 

The contents of the footer cell, if required.

width

(error)

fit contents

By default, the panel width will stretch to fit it's contents, unless you specify a specific width.

height

(error)

fit contents

By default, the panel height will stretch to fit it's contents, unless you specify a specific height

cornersize

(error)

25px

The radius, in pixels, of the panel corners. This sets the defaults for the hSize and vSize parameters below.

hSize

(error)

cornersize

This parameter, which defaults to the value defined by cornersize, defines the width of the panel corners.

vSize

(error)

cornersize

This parameter, which defaults to the value defined by cornersize, defines the height of the panel corners.

antialias

(error)

false

Setting the antialias parameter will result in much smoother corners and enable the cornercolor parameter.

footerbgcolor

(error)

bgcolor

The background colour of the footer area (defaults to the same colour as the overall background colour bgcolor), this should be specified as a hex value.

titlebgcolor

(error)

bgcolor

The background colour of the title area (defaults to the same colour as the overall background colour bgcolor), this should be specified as a hex value.

corners

(error)

true,true,true,true

a comma separated list of flags stating which corners should be rounded: Top Left, Top Right, Bottom Left, Bottom Right.

rows

(error)

true, true, true

a comma separated list of flags stating which rows should be displayed: Top, Middle, Bottom.

Allows the aligning of text.

The Code

Justified:

{align:justify}
some content
{align}

Align right:

{align:right}
some content
{align}

Align left:

{align:left}
some content
{align}

Align center:

{align:center}
some content
{align}

Result

Justified:

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam fermentum vestibulum est. Cras rhoncus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Sed quis tortor. Donec non ipsum. Mauris condimentum, odio nec porta tristique, ante neque malesuada massa, in dignissim eros velit at tellus. Donec et risus in ligula eleifend consectetuer. Donec volutpat eleifend augue. Integer gravida sodales leo. Nunc vehicula neque ac erat. Vivamus non nisl. Fusce ac magna. Suspendisse euismod libero eget mauris.

Align right:

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam fermentum vestibulum est. Cras rhoncus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Sed quis tortor. Donec non ipsum. Mauris condimentum, odio nec porta tristique, ante neque malesuada massa, in dignissim eros velit at tellus. Donec et risus in ligula eleifend consectetuer. Donec volutpat eleifend augue. Integer gravida sodales leo. Nunc vehicula neque ac erat. Vivamus non nisl. Fusce ac magna. Suspendisse euismod libero eget mauris.

Align left:

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam fermentum vestibulum est. Cras rhoncus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Sed quis tortor. Donec non ipsum. Mauris condimentum, odio nec porta tristique, ante neque malesuada massa, in dignissim eros velit at tellus. Donec et risus in ligula eleifend consectetuer. Donec volutpat eleifend augue. Integer gravida sodales leo. Nunc vehicula neque ac erat. Vivamus non nisl. Fusce ac magna. Suspendisse euismod libero eget mauris.

Align center:

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam fermentum vestibulum est. Cras rhoncus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Sed quis tortor. Donec non ipsum. Mauris condimentum, odio nec porta tristique, ante neque malesuada massa, in dignissim eros velit at tellus. Donec et risus in ligula eleifend consectetuer. Donec volutpat eleifend augue. Integer gravida sodales leo. Nunc vehicula neque ac erat. Vivamus non nisl. Fusce ac magna. Suspendisse euismod libero eget mauris.

Parameters

{align:alignment}your content{align}

Name

Required?

Default

Description

default

(tick)

justify

  • left Aligns text and content to the left of the page
  • right Aligns text and content to the right of the page
  • center Aligns text and content to the center of the page
  • justify Justifies text and content to fit the width of the page (default)

Displays a web-page within a Wiki page.

The Code

{iframe:src=http://stellar.mit.edu/|width=500|height=500}Your browser does not support iframes{iframe}

Result

Your browser does not support iframes

Parameters

{iframe:src=http://www.website.com}
text to show when browser does not support iframes
{iframe}

Name

Required?

Default

Description

class

(error)

 

The class to associate with the tag. Multiple classes can be specified by separating them with spaces.

title

(error)

 

An optional inline style sheet to apply to the tag.

style

(error)

 

Optional extra information about the tag.

id

(error)

 

The html ID of the tag.

align

(error)

 

The alignment of the iframe (left/right/top/middle/bottom).

frameborder

(error)

 

Whether to display a border (0/1).

height

(error)

 

The iframe height in px/%.

longdesc

(error)

 

A url to a page which contains a long description of the content within the iframe.

marginheight

(error)

 

The size of the top/bottom margins of the iframe.

marginwidth

(error)

 

The size of the left/right margins of the iframe.

name

(error)

 

The name of the iframe.

scrolling

(error)

 

Whether to show scrollbars or not (yes/no/auto).

src

(tick)

 

The url to be displayed within the iframe.

width

(error)

 

The width of the iframe in px/%.

Displays text when cursor hovers over designated area.

The Code

Basic rollover:

{style}
.test {
background-color:#00AA00;
color:#000000;
}
.test-rollover {
background-color:#0000AA;
color:#FFFFFF;
}
{style}
{rollover:class=test}{div}Some Content{div}{rollover}

Rollover with link:

{rollover:class=test|link=ADAPTAVIST:home}{div}Link to main homepage{div}{rollover}

Rollover with link and pointer:

{style}
.pointy-rollover {
background-color:#0000AA;
color:#FFFFFF;
cursor:pointer;
}
{style}
{rollover:class=test|over=pointy-rollover|link=MITDASHBOARD:home}{div}Link to MIT Wikis{div}{rollover}

Outside webpages can also be linked to by entering the url in the 'link=' parameter.

Result

Basic rollover:

.test {
background-color:#00AA00;
color:#000000;
}
.test-rollover {
background-color:#0000AA;
color:#FFFFFF;
}

Some Content

Rollover with link:

Link to MIT Wikis

Rollover with link and pointer:

.pointy-rollover {
background-color:#0000AA;
color:#FFFFFF;
cursor:pointer;
}

Link to MIT Wikis

Parameters

{rollover:class=test}body content{rollover}

Name

Required?

Default

Description

class

(tick)

 

The name of the CSS class that contains the styles for the rollover when in it's default state.

over

(error)

class-over

The name of the CSS class that contains the styles for the rollover when it is in the over state.

link

(error)

 

The page that the rollover should link to when clicked.

target

(error)

 

An optional external target to also modify.

targetclass

(error)

 

An optional class name to use solely for the external target (defaults to class).

targetover

(error)

 

An optional class name to use solely for the external target roll-over state(defaults to %targetclass%-rollover).