diff options
author | Go MAEDA <maeda@farend.jp> | 2024-10-20 07:51:38 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2024-10-20 07:51:38 +0000 |
commit | 5407fea87338e2de3fb4bbd8edcd671eed910a52 (patch) | |
tree | d362b785d363ec394c01747285dedc40d50f5430 /app/assets | |
parent | d58c2a21eaf97a439c7adf061aa529e58fe51748 (diff) | |
download | redmine-5407fea87338e2de3fb4bbd8edcd671eed910a52.tar.gz redmine-5407fea87338e2de3fb4bbd8edcd671eed910a52.zip |
Drop deprecated Redcarpet based Markdown formatter (#40149).
Patch by Go MAEDA (user:maeda).
git-svn-id: https://svn.redmine.org/redmine/trunk@23153 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/assets')
-rw-r--r-- | app/assets/javascripts/jstoolbar/markdown.js | 230 |
1 files changed, 0 insertions, 230 deletions
diff --git a/app/assets/javascripts/jstoolbar/markdown.js b/app/assets/javascripts/jstoolbar/markdown.js deleted file mode 100644 index 62ad4674a..000000000 --- a/app/assets/javascripts/jstoolbar/markdown.js +++ /dev/null @@ -1,230 +0,0 @@ -/** - * This file is part of DotClear. - * Copyright (c) 2005 Nicolas Martin & Olivier Meunier and contributors. All rights reserved. - * This code is released under the GNU General Public License. - * - * Modified by JP LANG for markdown formatting - */ - -// strong -jsToolBar.prototype.elements.strong = { - type: 'button', - title: 'Strong', - shortcut: 'b', - fn: { - wiki: function() { this.singleTag('**') } - } -} - -// em -jsToolBar.prototype.elements.em = { - type: 'button', - title: 'Italic', - shortcut: 'i', - fn: { - wiki: function() { this.singleTag("*") } - } -} - -// ins -jsToolBar.prototype.elements.ins = { - type: 'button', - title: 'Underline', - shortcut: 'u', - fn: { - wiki: function() { this.singleTag('_') } - } -} - -// del -jsToolBar.prototype.elements.del = { - type: 'button', - title: 'Deleted', - fn: { - wiki: function() { this.singleTag('~~') } - } -} - -// code -jsToolBar.prototype.elements.code = { - type: 'button', - title: 'Code', - fn: { - wiki: function() { this.singleTag('`') } - } -} - -// spacer -jsToolBar.prototype.elements.space1 = {type: 'space'} - -// headings -jsToolBar.prototype.elements.h1 = { - type: 'button', - title: 'Heading 1', - fn: { - wiki: function() { - this.encloseLineSelection('# ', '',function(str) { - str = str.replace(/^#+\s+/, '') - return str; - }); - } - } -} -jsToolBar.prototype.elements.h2 = { - type: 'button', - title: 'Heading 2', - fn: { - wiki: function() { - this.encloseLineSelection('## ', '',function(str) { - str = str.replace(/^#+\s+/, '') - return str; - }); - } - } -} -jsToolBar.prototype.elements.h3 = { - type: 'button', - title: 'Heading 3', - fn: { - wiki: function() { - this.encloseLineSelection('### ', '',function(str) { - str = str.replace(/^#+\s+/, '') - return str; - }); - } - } -} - -// spacer -jsToolBar.prototype.elements.space2 = {type: 'space'} - -// ul -jsToolBar.prototype.elements.ul = { - type: 'button', - title: 'Unordered list', - fn: { - wiki: function() { - this.encloseLineSelection('','',function(str) { - str = str.replace(/\r/g,''); - return str.replace(/(\n|^)[#-]?\s*/g,"$1* "); - }); - } - } -} - -// ol -jsToolBar.prototype.elements.ol = { - type: 'button', - title: 'Ordered list', - fn: { - wiki: function() { - this.encloseLineSelection('','',function(str) { - str = str.replace(/\r/g,''); - return str.replace(/(\n|^)[*-]?\s*/g,"$11. "); - }); - } - } -} - -// 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$3"); - }); - } - } -} - -// 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$3$4"); - }); - } - } -} - -// table -jsToolBar.prototype.elements.table = { - type: 'button', - title: 'Table', - fn: { - wiki: function() { - var This = this; - this.tableMenu(function(cols, rowCount){ - This.encloseLineSelection( - '|'+cols.join(' |')+' |\n' + // header - Array(cols.length+1).join('|--')+'|\n' + // second line - Array(rowCount+1).join(Array(cols.length+1).join('| ')+'|\n') // cells - ); - }); - } - } -} - -// pre -jsToolBar.prototype.elements.pre = { - type: 'button', - title: 'Preformatted text', - fn: { - wiki: function() { this.encloseLineSelection('```\n', '\n```') } - } -} - -// Code highlighting -jsToolBar.prototype.elements.precode = { - type: 'button', - title: 'Highlighted code', - fn: { - wiki: function() { - var This = this; - this.precodeMenu(function(lang){ - This.encloseLineSelection('``` ' + lang + '\n', '\n```\n'); - }); - } - } -} - -// spacer -jsToolBar.prototype.elements.space4 = {type: 'space'} - -// wiki page -jsToolBar.prototype.elements.link = { - type: 'button', - title: 'Wiki link', - fn: { - wiki: function() { this.encloseSelection("[[", "]]") } - } -} -// image -jsToolBar.prototype.elements.img = { - type: 'button', - title: 'Image', - fn: { - wiki: function() { this.encloseSelection("![](", ")") } - } -} - -// spacer -jsToolBar.prototype.elements.space5 = {type: 'space'} -// help -jsToolBar.prototype.elements.help = { - 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') } - } -} |