2013-06-20 22:28:49 +00:00
|
|
|
define([
|
|
|
|
"jquery",
|
2013-06-22 23:48:57 +00:00
|
|
|
"classes/Extension",
|
2013-06-20 22:28:49 +00:00
|
|
|
"text!html/buttonMarkdownSyntax.html",
|
2013-06-22 23:48:57 +00:00
|
|
|
], function($, Extension, buttonMarkdownSyntaxHTML) {
|
2013-06-20 22:28:49 +00:00
|
|
|
|
2013-06-22 23:48:57 +00:00
|
|
|
var buttonMarkdownSyntax = new Extension("buttonMarkdownSyntax", 'Button "Markdown syntax', true);
|
|
|
|
buttonMarkdownSyntax.settingsBlock = '<p>Adds a "Markdown syntax" button over the preview.</p>';
|
2013-06-20 22:28:49 +00:00
|
|
|
|
|
|
|
buttonMarkdownSyntax.onCreatePreviewButton = function() {
|
2013-08-08 21:53:15 +00:00
|
|
|
return '<button class="btn btn-default dropdown-toggle" title="Markdown syntax" data-toggle="dropdown" data-target=".panel-markdown-syntax"><i class="icon-help-circled"></i></button>';
|
2013-06-20 22:28:49 +00:00
|
|
|
};
|
2013-08-08 21:53:15 +00:00
|
|
|
|
|
|
|
buttonMarkdownSyntax.onReady = function() {
|
|
|
|
$('#extension-preview-buttons').append($(buttonMarkdownSyntaxHTML));
|
|
|
|
};
|
|
|
|
|
2013-06-20 22:28:49 +00:00
|
|
|
return buttonMarkdownSyntax;
|
|
|
|
|
|
|
|
});
|