Adds multi-levels blockquotes support by using > at the beginning of lines.

Textile is preserved inside quoted text.

git-svn-id: http://redmine.rubyforge.org/svn/trunk@1479 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2008-05-30 16:35:36 +00:00
parent 4311ecbc04
commit 88dea1a06d
35 changed files with 160 additions and 2 deletions
+32 -1
View File
@@ -498,6 +498,37 @@ jsToolBar.prototype.elements.ol = {
}
}
// spacer
jsToolBar.prototype.elements.space3 = {type: 'space'}
// bq
jsToolBar.prototype.elements.bq = {
type: 'button',
title: 'Quote',
fn: {
wiki: function() {
this.encloseLineSelection('','',function(str) {
str = str.replace(/\r/g,'');
return str.replace(/(\n|^) *([^\n]*)/g,"$1> $2");
});
}
}
}
// unbq
jsToolBar.prototype.elements.unbq = {
type: 'button',
title: 'Unquote',
fn: {
wiki: function() {
this.encloseLineSelection('','',function(str) {
str = str.replace(/\r/g,'');
return str.replace(/(\n|^) *[>]? *([^\n]*)/g,"$1$2");
});
}
}
}
// pre
jsToolBar.prototype.elements.pre = {
type: 'button',
@@ -508,7 +539,7 @@ jsToolBar.prototype.elements.pre = {
}
// spacer
jsToolBar.prototype.elements.space3 = {type: 'space'}
jsToolBar.prototype.elements.space4 = {type: 'space'}
// wiki page
jsToolBar.prototype.elements.link = {