',
'BOLD_LFT' : '',
'BOLD_RGT' : '',
'ITALIC_LFT' : '',
'ITALIC_RGT' : '',
'UNDERLINE_LFT' : '__',
'UNDERLINE_RGT' : '__',
'STRIKE_LFT' : '@@',
'STRIKE_RGT' : '@@',
'LINE_LFT' : '',
'LINE_RGT' : '',
'LINK_LFT' : '',
'LINK_RGT' : ''
}
};
// The actual plugin constructor
function Plugin( element, options ) {
this.element = element;
// jQuery has an extend method which merges the contents of two or
// more objects, storing the result in the first object. The first object
// is generally empty as we don't want to alter the default options for
// future instances of the plugin
this.options = $.extend( {}, defaults, options) ;
this.syntax = syntax;
this._defaults = defaults;
this._name = pluginName;
this.init();
}
Plugin.prototype.init = function () {
// Place initialization logic here
// You already have access to the DOM element and the options via the instance,
// e.g., this.element and this.options
if (this.element.tagName === 'TEXTAREA') {
var toolbar = $('
').addClass("btn-toolbar aceditor-toolbar");
if (this.options.savebtn) {
toolbar.append($(''));
}
// Text formatting
toolbar.append( '