Adding creole & asciidoc
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
* }
|
||||
*
|
||||
**/
|
||||
(function() {
|
||||
|
||||
var MarkDown = {
|
||||
|
||||
@@ -59,7 +60,7 @@ var MarkDown = {
|
||||
exec: function( txt, selText, $field ) {
|
||||
var results = null;
|
||||
$.GollumEditor.Dialog({
|
||||
title: '',
|
||||
title: 'Insert Link',
|
||||
fields: [
|
||||
{
|
||||
id: 'text',
|
||||
@@ -89,11 +90,37 @@ var MarkDown = {
|
||||
},
|
||||
|
||||
'function-image' : {
|
||||
/* Stub */
|
||||
exec: function( txt, selText, $field ) {
|
||||
var results = null;
|
||||
$.GollumEditor.Dialog.init({
|
||||
title: 'Insert Image',
|
||||
fields: [
|
||||
{
|
||||
id: 'url',
|
||||
name: 'Image URL',
|
||||
type: 'text'
|
||||
},
|
||||
{
|
||||
id: 'alt',
|
||||
name: 'Alt Text',
|
||||
type: 'text'
|
||||
}
|
||||
],
|
||||
OK: function( res ) {
|
||||
if ( res['url'] && res['alt'] ) {
|
||||
return '![' + res['alt'] + ']' +
|
||||
'(' + res['url'] + ')';
|
||||
} else
|
||||
return '';
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
// this is necessary for GollumEditor to pick this up
|
||||
jQuery.GollumEditor.defineLanguage('markdown', MarkDown);
|
||||
jQuery.GollumEditor.defineLanguage('markdown', MarkDown);
|
||||
|
||||
})();
|
||||
|
||||
Reference in New Issue
Block a user