Well well. We have a functional editor. Now some CSS.
This commit is contained in:
@@ -156,4 +156,9 @@
|
||||
filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#599bdc', endColorstr='#3072b3');
|
||||
background: -webkit-gradient(linear, left top, left bottom, from(#599bdc), to(#3072b3));
|
||||
background: -moz-linear-gradient(top, #599bdc, #3072b3);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* @control dialog */
|
||||
|
||||
|
||||
@@ -39,6 +39,10 @@
|
||||
|
||||
<a href="#" id="function-hr" class="function-button">Horizontal Rule</a>
|
||||
<span class="function-divider"> </span>
|
||||
<a href="#" id="function-h1" class="function-button">h1</a>
|
||||
<a href="#" id="function-h2" class="function-button">h2</a>
|
||||
<a href="#" id="function-h3" class="function-button">h3</a>
|
||||
<span class="function-divider"> </span>
|
||||
<a href="#" id="function-link" class="function-button">Link</a>
|
||||
<a href="#" id="function-image" class="function-button">Image</a>
|
||||
</div>
|
||||
|
||||
@@ -474,7 +474,8 @@
|
||||
createMarkup: function( title, body ) {
|
||||
Dialog.markupCreated = true;
|
||||
return '<div id="gollum-editor-dialog">' +
|
||||
'<div id="gollum-editor-dialog-title"><h4>' + title + '</h4></div>' +
|
||||
'<div id="gollum-editor-dialog-title"><h4>' +
|
||||
title +'</h4></div>' +
|
||||
'<div id="gollum-editor-dialog-body">' + body + '</div>' +
|
||||
'<div id="gollum-editor-dialog-buttons">' +
|
||||
'<a href="#" title="OK" id="gollum-editor-action-ok">OK</a>' +
|
||||
|
||||
@@ -56,6 +56,21 @@ var MarkDown = {
|
||||
replace: "> $1$2"
|
||||
},
|
||||
|
||||
'function-h1' : {
|
||||
search: /(.+)([\n]?)/gi,
|
||||
replace: "# $1$2"
|
||||
},
|
||||
|
||||
'function-h2' : {
|
||||
search: /(.+)([\n]?)/gi,
|
||||
replace: "## $1$2"
|
||||
},
|
||||
|
||||
'function-h3' : {
|
||||
search: /(.+)([\n]?)/gi,
|
||||
replace: "### $1$2"
|
||||
},
|
||||
|
||||
'function-link' : {
|
||||
exec: function( txt, selText, $field ) {
|
||||
var results = null;
|
||||
|
||||
Reference in New Issue
Block a user