This repository was archived by the owner on Feb 18, 2023. It is now read-only.
forked from derobins/wmd
-
Notifications
You must be signed in to change notification settings - Fork 11
Configuration Options
tstone edited this page Sep 13, 2010
·
3 revisions
options = {
'preload' : function() {},
'postload' : function() {},
'preview' : 'toolbar',
'toolbar': {
'backgroundMode': 'light',
'layout': 'bold italic | link quote code image | numberlist bulletlist heading line',
'buttons' : [],
}
}A callback function to be fired right before MarkEdit is loaded.
A callback function to be fired right after MarkEdit has been loaded.
The preview mode. Possible values:
- toolbar — Causes Compose/Preview toggle buttons to be rendered on the toolbar
- above — Causes an auto-updated preview to appear above the editor
- below — Causes an auto-updated preview to appear below the editor (WMD Editor style)
- bottom — Same as ‘below’
- top — Same as ‘above’
- false — No preview will appear
Contains all settings related to the toolbar
Sets whether the icons should display assuming a light or dark background. Possible values:
- light — Assumes a light background. Foreground text will be black.
- dark — Assumes a dark background. Foreground text will be white.
Note this must be set independent of what jQuery theme you’re using.
Sets the order and grouping of the toolbar buttons. Available built-in buttons are listed in the defaults above. The syntax for layout is as follows:
- The id of the button is listed
- Spaces represents the break between buttons
- Pipe character “|” represents a button group break
- Buttons may be grouped as togglable by surrounding them in parenthesis
An array of custom button definitions.
{
'id' : String, -- Used to identify the button
'css' : String, -- CSS class(es) to add to the button
'tip' : String, -- Mouse-over tool tip to be shown (html Title)
'click' : function, -- Function to be executed on Click event
'mouseover' : function, -- Function to be executed on Click event
'mouseout' : function -- Function to be executed on Click event
}