Namespace: message

Marked. message

Statusbar messages and tip popovers

Source:
message.js

Methods


Display text in the popup banner

Parameters:
Name Type Argument Description
bannerText string

The text to display

bannerClass string <optional>

The banner class ('footnote' creates a black banner, default 'clear')

Source:
message.js
Example
Marked.message.banner('Just some text to pop in at the bottom');

clear()

Clear both status bar and HTML popups

Source:
message.js
Example
Marked.message.clearAll();

clearBanner()

Clear the banner and hide

Source:
message.js
Example
Marked.message.clearBanner();

clearHTML()

Clear all HTML popups

Source:
message.js
Example
Marked.message.clearAll();

clearStatus( [name])

Clear statusbar message

Parameters:
Name Type Argument Description
name string <optional>

Specific named timer to clear, clear all timers if blank

Source:
message.js
Example
Marked.message.clearStatus();

clearTip()

Clear an HTML popup

Source:
message.js
Example
Marked.message.clearTip();

colorStatusBar(color)

Colorize current status bar message

Parameters:
Name Type Description
color string

Colorize message (red, blue, green, black, white, grey) default color if empty

Source:
message.js
Examples
Marked.message.colorStatusBar('green');
Marked.message.colorStatusBar('red');

dialog(options)

Display a dismissable dialog

Parameters:
Name Type Description
options object

Dictionary of options (type, message)

Source:
message.js

statusBar( [msg] [, timeout] [, name] [, color])

Updates statusbar message using object

Parameters:
Name Type Argument Description
msg String <optional>

String to display in status bar (clears last status if empty)

timeout Integer <optional>

Seconds to display message

name String <optional>

Named timer for later reference

color string <optional>

Colorize message (red, blue, green, black, white, grey)

Source:
message.js
Example
Marked.message.statusBar('Hey there!', 2500, 'heyThere', 'red');

tip(tiptext [, color] [, timeout] [, id] [, onClick])

Display an HTML popup

Parameters:
Name Type Argument Description
tiptext String

Text to display

color String <optional>

Background color for tip (green, blue, black, red, clear)

timeout Integer <optional>

Remove tip after X seconds

id string <optional>

tip ID

onClick function <optional>

onClick callback

Source:
message.js
Returns:

tip ID

Type
String
Example
// A tip that disappears in 1.5 seconds
    Marked.message.tip('A notification string', 'red', 1500);
    // A tip that remains fixed with an onClick callback
    Marked.message.tip('Sticky notification', 'clear', 0, 'stickyID', function(){...});