##// END OF EJS Templates
[#20288] Update styles to match CodeRay 1.1.0 (preserving changes of r10132)....
[#20288] Update styles to match CodeRay 1.1.0 (preserving changes of r10132). This commit updates the CSS styles to match with CodeRay 1.1.0, while it preserves the custom changes applied in r10132. The CSS styles were still based on CodeRay 1.0.6 (included since Redmine 1.4.0) with the custom changes from r10132 (included since Redmine 2.1.0). Redmine 2.3.2 till 2.3.4 came with CodeRay 1.0.9, an upgrade that didn't needed changes in the CSS styles. Starting with 2.4.0 Redmine comes with CodeRay 1.1.0, a minor upgrade that came with new/changed token_kinds and lots of changes in the alpha stylesheet, that in turn is used as a base for Redmine's own CodeRay CSS styles. As such, this upgrade needed CSS stylesheet changes like done before in r7618 and r7623 (for 1.0.0 upgrade) and r9389 (for 1.0.6 upgrade). But these changes, plus an update of the Redmine core documentation that is shipped along the core (wiki_syntax_detailed_[markdown|textile].html), aren't integrated up untill today. Contributed by Mischa The Evil. git-svn-id: http://svn.redmine.org/redmine/trunk@14488 e93f8b46-1217-0410-a6f0-8f06a7374b81

File last commit:

r14032:ae6c99321daa
r14106:6fbb56e55735
Show More
markdown.js
202 lines | 4.4 KiB | application/javascript | JavascriptLexer
Jean-Philippe Lang
Adds experimental support for Markdown formatting with redcarpet (#15520)....
r12177 /* ***** BEGIN LICENSE BLOCK *****
* This file is part of DotClear.
* Copyright (c) 2005 Nicolas Martin & Olivier Meunier and contributors. All
* rights reserved.
*
* DotClear is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
Toshi MARUYAMA
remove trailing white spaces from public/javascripts/jstoolbar/markdown.js...
r13806 *
Jean-Philippe Lang
Adds experimental support for Markdown formatting with redcarpet (#15520)....
r12177 * DotClear is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
Toshi MARUYAMA
remove trailing white spaces from public/javascripts/jstoolbar/markdown.js...
r13806 *
Jean-Philippe Lang
Adds experimental support for Markdown formatting with redcarpet (#15520)....
r12177 * You should have received a copy of the GNU General Public License
* along with DotClear; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* ***** END LICENSE BLOCK *****
*/
/* Modified by JP LANG for markdown formatting */
// strong
jsToolBar.prototype.elements.strong = {
Jean-Philippe Lang
Replace tabs with two spaces in jstoolbar scripts (#20241)....
r14032 type: 'button',
title: 'Strong',
fn: {
wiki: function() { this.singleTag('**') }
}
Jean-Philippe Lang
Adds experimental support for Markdown formatting with redcarpet (#15520)....
r12177 }
// em
jsToolBar.prototype.elements.em = {
Jean-Philippe Lang
Replace tabs with two spaces in jstoolbar scripts (#20241)....
r14032 type: 'button',
title: 'Italic',
fn: {
wiki: function() { this.singleTag("*") }
}
Jean-Philippe Lang
Adds experimental support for Markdown formatting with redcarpet (#15520)....
r12177 }
// del
jsToolBar.prototype.elements.del = {
Jean-Philippe Lang
Replace tabs with two spaces in jstoolbar scripts (#20241)....
r14032 type: 'button',
title: 'Deleted',
fn: {
wiki: function() { this.singleTag('~~') }
}
Jean-Philippe Lang
Adds experimental support for Markdown formatting with redcarpet (#15520)....
r12177 }
// code
jsToolBar.prototype.elements.code = {
Jean-Philippe Lang
Replace tabs with two spaces in jstoolbar scripts (#20241)....
r14032 type: 'button',
title: 'Code',
fn: {
wiki: function() { this.singleTag('`') }
}
Jean-Philippe Lang
Adds experimental support for Markdown formatting with redcarpet (#15520)....
r12177 }
// spacer
jsToolBar.prototype.elements.space1 = {type: 'space'}
// headings
jsToolBar.prototype.elements.h1 = {
Jean-Philippe Lang
Replace tabs with two spaces in jstoolbar scripts (#20241)....
r14032 type: 'button',
title: 'Heading 1',
fn: {
wiki: function() {
this.encloseLineSelection('# ', '',function(str) {
str = str.replace(/^#+\s+/, '')
return str;
});
}
}
Jean-Philippe Lang
Adds experimental support for Markdown formatting with redcarpet (#15520)....
r12177 }
jsToolBar.prototype.elements.h2 = {
Jean-Philippe Lang
Replace tabs with two spaces in jstoolbar scripts (#20241)....
r14032 type: 'button',
title: 'Heading 2',
fn: {
wiki: function() {
this.encloseLineSelection('## ', '',function(str) {
str = str.replace(/^#+\s+/, '')
return str;
});
}
}
Jean-Philippe Lang
Adds experimental support for Markdown formatting with redcarpet (#15520)....
r12177 }
jsToolBar.prototype.elements.h3 = {
Jean-Philippe Lang
Replace tabs with two spaces in jstoolbar scripts (#20241)....
r14032 type: 'button',
title: 'Heading 3',
fn: {
wiki: function() {
this.encloseLineSelection('### ', '',function(str) {
str = str.replace(/^#+\s+/, '')
return str;
});
}
}
Jean-Philippe Lang
Adds experimental support for Markdown formatting with redcarpet (#15520)....
r12177 }
// spacer
jsToolBar.prototype.elements.space2 = {type: 'space'}
// ul
jsToolBar.prototype.elements.ul = {
Jean-Philippe Lang
Replace tabs with two spaces in jstoolbar scripts (#20241)....
r14032 type: 'button',
title: 'Unordered list',
fn: {
wiki: function() {
this.encloseLineSelection('','',function(str) {
str = str.replace(/\r/g,'');
return str.replace(/(\n|^)[#-]?\s*/g,"$1* ");
});
}
}
Jean-Philippe Lang
Adds experimental support for Markdown formatting with redcarpet (#15520)....
r12177 }
// ol
jsToolBar.prototype.elements.ol = {
Jean-Philippe Lang
Replace tabs with two spaces in jstoolbar scripts (#20241)....
r14032 type: 'button',
title: 'Ordered list',
fn: {
wiki: function() {
this.encloseLineSelection('','',function(str) {
str = str.replace(/\r/g,'');
return str.replace(/(\n|^)[*-]?\s*/g,"$11. ");
});
}
}
Jean-Philippe Lang
Adds experimental support for Markdown formatting with redcarpet (#15520)....
r12177 }
// spacer
jsToolBar.prototype.elements.space3 = {type: 'space'}
// bq
jsToolBar.prototype.elements.bq = {
Jean-Philippe Lang
Replace tabs with two spaces in jstoolbar scripts (#20241)....
r14032 type: 'button',
title: 'Quote',
fn: {
wiki: function() {
this.encloseLineSelection('','',function(str) {
str = str.replace(/\r/g,'');
return str.replace(/(\n|^) *([^\n]*)/g,"$1> $2");
});
}
}
Jean-Philippe Lang
Adds experimental support for Markdown formatting with redcarpet (#15520)....
r12177 }
// unbq
jsToolBar.prototype.elements.unbq = {
Jean-Philippe Lang
Replace tabs with two spaces in jstoolbar scripts (#20241)....
r14032 type: 'button',
title: 'Unquote',
fn: {
wiki: function() {
this.encloseLineSelection('','',function(str) {
str = str.replace(/\r/g,'');
return str.replace(/(\n|^) *[>]? *([^\n]*)/g,"$1$2");
});
}
}
Jean-Philippe Lang
Adds experimental support for Markdown formatting with redcarpet (#15520)....
r12177 }
// pre
jsToolBar.prototype.elements.pre = {
Jean-Philippe Lang
Replace tabs with two spaces in jstoolbar scripts (#20241)....
r14032 type: 'button',
title: 'Preformatted text',
fn: {
wiki: function() { this.encloseLineSelection('~~~\n', '\n~~~') }
}
Jean-Philippe Lang
Adds experimental support for Markdown formatting with redcarpet (#15520)....
r12177 }
// spacer
jsToolBar.prototype.elements.space4 = {type: 'space'}
// wiki page
jsToolBar.prototype.elements.link = {
Jean-Philippe Lang
Replace tabs with two spaces in jstoolbar scripts (#20241)....
r14032 type: 'button',
title: 'Wiki link',
fn: {
wiki: function() { this.encloseSelection("[[", "]]") }
}
Jean-Philippe Lang
Adds experimental support for Markdown formatting with redcarpet (#15520)....
r12177 }
// image
jsToolBar.prototype.elements.img = {
Jean-Philippe Lang
Replace tabs with two spaces in jstoolbar scripts (#20241)....
r14032 type: 'button',
title: 'Image',
fn: {
wiki: function() { this.encloseSelection("![](", ")") }
}
Jean-Philippe Lang
Adds experimental support for Markdown formatting with redcarpet (#15520)....
r12177 }
// spacer
jsToolBar.prototype.elements.space5 = {type: 'space'}
Toshi MARUYAMA
add markdown wiki syntax help to tool bar (#16373)...
r13809 // help
jsToolBar.prototype.elements.help = {
Jean-Philippe Lang
Replace tabs with two spaces in jstoolbar scripts (#20241)....
r14032 type: 'button',
title: 'Help',
fn: {
wiki: function() { window.open(this.help_link, '', 'resizable=yes, location=no, width=300, height=640, menubar=no, status=no, scrollbars=yes') }
}
Toshi MARUYAMA
add markdown wiki syntax help to tool bar (#16373)...
r13809 }