Well well. We have a functional editor. Now some CSS.

This commit is contained in:
Eston Bond
2010-11-03 16:52:14 -07:00
parent 4f166dc144
commit ff4fc6f708
4 changed files with 27 additions and 2 deletions
+6 -1
View File
@@ -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 */
+4
View File
@@ -39,6 +39,10 @@
<a href="#" id="function-hr" class="function-button">Horizontal Rule</a>
<span class="function-divider">&nbsp;</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">&nbsp;</span>
<a href="#" id="function-link" class="function-button">Link</a>
<a href="#" id="function-image" class="function-button">Image</a>
</div>
+2 -1
View File
@@ -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;