forked from juno/redmine_markdown_extra_formatter
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Junya Ogura
committed
Jun 11, 2009
0 parents
commit 0f885d0
Showing
21 changed files
with
528 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
= Redmine Markdown Extra formatter | ||
|
||
This is a redmine plugin for supporting Markdown Extra as a wiki format. | ||
|
||
== What is redmine? | ||
Redmine is a flexible project management web application. | ||
See ((<the official site|URL:http://www.redmine.org>)) for more details. | ||
|
||
== What is Markdown Extra? | ||
(from http://michelf.com/projects/php-markdown/extra/) | ||
PHP Markdown Extra is a special version of PHP Markdown implementing some | ||
features currently not available with the plain Markdown syntax. | ||
|
||
|
||
== Plugin installation | ||
=== Prerequisites | ||
* Redmine and its prerequisites | ||
* bluefeather gem - see http://ruby.morphball.net/bluefeather/ | ||
|
||
=== Installation | ||
(1) Copy the plugin directory into the vendor/plugins directory | ||
(2) Start Redmine | ||
|
||
Installed plugins are listed on 'Admin -> Information' screen. | ||
|
||
=== Credits | ||
* Yuki Sonoda (http://github.com/yugui) did the real work by creating the | ||
redmine_rd_formatter | ||
* Jean-Philippe Lang for making the change to RedMine (based on Yuki's patch) to | ||
allow pluggable formatters | ||
|
||
== Future Plans | ||
* update HTML syntax help and implement JavaScript preview |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
module RedmineMarkdownExtraFormatter | ||
module Helper | ||
unloadable | ||
|
||
def wikitoolbar_for(field_id) | ||
file = Engines::RailsExtensions::AssetHelpers.plugin_asset_path('redmine_markdown_extra_formatter', 'help', 'markdown_extra_syntax.html') | ||
help_link = l(:setting_text_formatting) + ': ' + | ||
link_to(l(:label_help), file, | ||
:onclick => "window.open(\"#{file}\", \"\", \"resizable=yes, location=no, width=300, height=640, menubar=no, status=no, scrollbars=yes\"); return false;") | ||
|
||
javascript_include_tag('jstoolbar/jstoolbar') + | ||
javascript_include_tag('markdown_extra', :plugin => 'redmine_markdown_extra_formatter') + | ||
javascript_include_tag("jstoolbar/lang/jstoolbar-#{current_language}") + | ||
javascript_tag("var toolbar = new jsToolBar($('#{field_id}')); toolbar.setHelpLink('#{help_link}'); toolbar.draw();") | ||
end | ||
|
||
|
||
def initial_page_content(page) | ||
"#{page.pretty_title}\n#{'='*page.pretty_title.length}" | ||
end | ||
|
||
def heads_for_wiki_formatter | ||
stylesheet_link_tag('jstoolbar') | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,179 @@ | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
<html xmlns="http://www.w3.org/1999/xhtml"> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | ||
<meta http-equiv="Content-Style-Type" content="text/css" /> | ||
<title>Wiki formatting</title> | ||
<style type="text/css"> | ||
h1 { font-family: Verdana, sans-serif; font-size: 14px; text-align: center; color: #444; } | ||
body { font-family: Verdana, sans-serif; font-size: 12px; color: #444; } | ||
table th { padding-top: 1em; } | ||
table td { vertical-align: top; background-color: #f5f5f5; height: 2em; vertical-align: middle;} | ||
table td code { font-size: 1.2em; } | ||
table td h1 { font-size: 1.8em; text-align: left; } | ||
table td h2 { font-size: 1.4em; text-align: left; } | ||
table td h3 { font-size: 1.2em; text-align: left; } | ||
img.tool { border: 1px solid #bbb; } | ||
|
||
</style> | ||
</head> | ||
<body> | ||
|
||
<h1>Wiki Syntax Quick Reference</h1> | ||
|
||
<table width="100%"> | ||
<tr><th colspan="3">Font Styles</th></tr> | ||
<tr> | ||
<th> | ||
<img src="../../../images/jstoolbar/bt_strong.png" | ||
class="tool" | ||
alt="Strong" /> | ||
</th> | ||
<td width="50%">**Strong**</td> | ||
<td width="50%"><strong>Strong</strong></td> | ||
</tr> | ||
<tr> | ||
<th><img src="../../../images/jstoolbar/bt_em.png" | ||
class="tool" | ||
alt="Emphasis" /></th> | ||
<td>*Emphasis*</td> | ||
<td><em>Emphasis</em></td> | ||
</tr> | ||
<tr> | ||
<th><img src="../../../images/jstoolbar/bt_ins.png" | ||
class="tool" | ||
alt="Underline" /></th> | ||
<td><ins>Underline</ins>></td> | ||
<td><ins>Underline</ins></td> | ||
</tr> | ||
<tr> | ||
<th><img src="../../../images/jstoolbar/bt_del.png" | ||
class="tool" alt="Deleted" /></th> | ||
<td><del>Deleted</del></td> | ||
<td><del>Deleted</del></td> | ||
</tr> | ||
<tr> | ||
<th></th> | ||
<td></cite>Quote</cite></td> | ||
<td><cite>Quote</cite></td> | ||
</tr> | ||
<tr> | ||
<th><img src="../../../images/jstoolbar/bt_code.png" | ||
class="tool" alt="Inline Code" /></th> | ||
<td>`Inline Code`</td> | ||
<td><code>Inline Code</code></td> | ||
</tr> | ||
<tr> | ||
<th><img src="../../../images/jstoolbar/bt_pre.png" | ||
class="tool" alt="Preformatted text" /></th> | ||
<td><pre><br /> lines<br /> of code<br /></pre></td> | ||
<td> | ||
<pre> | ||
lines | ||
of code | ||
</pre> | ||
</td> | ||
</tr> | ||
|
||
<tr><th colspan="3">Lists</th></tr> | ||
<tr> | ||
<th> <img src="../../../images/jstoolbar/bt_ul.png" | ||
class="tool" alt="Unordered list" /></th> | ||
<td>* Item 1<br />* Item 2</td> | ||
<td><ul><li>Item 1</li><li>Item 2</li></ul></td> | ||
</tr> | ||
<tr> | ||
<th><img src="../../../images/jstoolbar/bt_ol.png" | ||
class="tool" alt="Ordered list" /></th> | ||
<td>1. Item 1<br />1. Item 2</td> | ||
<td><ol><li>Item 1</li><li>Item 2</li></ol></td> | ||
</tr> | ||
|
||
<tr><th colspan="3">Headings</th></tr> | ||
<tr> | ||
<th><img src="../../../images/jstoolbar/bt_h1.png" | ||
class="tool" alt="Heading 1" /></th> | ||
<td>Title 1<br />=======</td> | ||
<td><h1>Title 1</h1></td> | ||
</tr> | ||
<tr> | ||
<th><img src="../../../images/jstoolbar/bt_h2.png" | ||
class="tool" alt="Heading 2" /></th> | ||
<td>Title 2<br />------</td> | ||
<td><h2>Title 2</h2></td> | ||
</tr> | ||
<tr> | ||
<th><img src="../../../images/jstoolbar/bt_h3.png" | ||
class="tool" alt="Heading 3" /></th> | ||
<td>### Title 3</td> | ||
<td><h3>Title 3</h3></td> | ||
</tr> | ||
|
||
<tr><th colspan="3">External Links</th></tr> | ||
<tr> | ||
<th></th> | ||
<td>[foobar](http://foo.bar) | ||
<hr /> | ||
[foobar][1]<br /> | ||
. . .<br /> | ||
[1]: http://foo.bar | ||
<hr /> | ||
[foobar][foobar]<br /> | ||
. . .<br /> | ||
[foobar]: http://foo.bar | ||
<hr /> | ||
[foobar][]<br /> | ||
. . .<br /> | ||
[foobar]: http://foo.bar | ||
</td> | ||
<td><a href="http://foo.bar">foobar</a></td> | ||
</tr> | ||
|
||
<tr> <th colspan="3">Redmine links</th></tr> | ||
<tr> | ||
<th><img src="../../../images/jstoolbar/bt_link.png" | ||
class="tool" alt="Link | ||
to a Wiki page" /></th> | ||
<td>[[Wiki page]]</td> | ||
<td><a href="#">Wiki page</a></td> | ||
</tr> | ||
<tr> | ||
<th></th> | ||
<td>Issue #12</td> | ||
<td>Issue <a href="#">#12</a></td> | ||
</tr> | ||
<tr> | ||
<th></th> | ||
<td>Revision r43</td> | ||
<td>Revision <a href="#">r43</a></td> | ||
</tr> | ||
<tr><th></th> | ||
<td>commit:f30e13e43</td> | ||
<td><a href="#">f30e13e4</a></td> | ||
</tr> | ||
<tr><th></th> | ||
<td>source:some/file</td> | ||
<td><a href="#">source:some/file</a></td> | ||
</tr> | ||
|
||
<tr><th colspan="3">Inline images</th></tr> | ||
<tr> | ||
<th><img src="../../../images/jstoolbar/bt_img.png" | ||
class="tool" alt="Image" | ||
/></th> | ||
<td></td> | ||
<td></td> | ||
</tr> | ||
</table> | ||
|
||
<p>See John Gruber's | ||
<a href="http://daringfireball.net/projects/markdown/basics" | ||
onclick="window.open('http://daringfireball.net/projects/markdown/basics', '', ''); return false;">Markdown</a> | ||
and | ||
<a href="http://daringfireball.net/projects/smartypants/" | ||
onclick="window.open('http://daringfireball.net/projects/smartypants/', '', ''); return false;">SmartyPants</a> | ||
postings for more details. | ||
</p> | ||
|
||
</body> | ||
</html> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
jsToolBar.strings = {}; | ||
jsToolBar.strings['Emphasized'] = '強調'; | ||
jsToolBar.strings['Code'] = 'コード'; | ||
jsToolBar.strings['Keyboard'] = 'キーボード入力'; | ||
jsToolBar.strings['Variable'] = '可変部分'; | ||
jsToolBar.strings['Heading 1'] = '見出し 1'; | ||
jsToolBar.strings['Heading 2'] = '見出し 2'; | ||
jsToolBar.strings['Heading 3'] = '見出し 3'; | ||
jsToolBar.strings['Unordered list'] = '順不同リスト'; | ||
jsToolBar.strings['Ordered list'] = '番号つきリスト'; | ||
jsToolBar.strings['Preformatted'] = '整形済み'; | ||
jsToolBar.strings['Un-preformatted'] = '未整形'; | ||
jsToolBar.strings['Wiki link'] = 'Wiki ページへのリンク'; | ||
jsToolBar.strings['Image'] = '画像'; |
Oops, something went wrong.