Skip to content

Loading…

I updated readme docs. Please add to main branch. #4

Open
wants to merge 4 commits into from

4 participants

@bio
bio commented

No description provided.

@orpheuslummis

This pull request should get merged. ;)

@axolx

Please merge this patch. It's just the click of a button these days and the additional info in the README will save time to many users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Nov 9, 2010
  1. @biog
  2. @biog

    fixed typos

    biog committed
  3. @biog

    fixed links

    biog committed
Commits on Apr 2, 2011
  1. @bio

    upd jstoolbar, add jstoolbar css

    bio committed
Showing with 63 additions and 7 deletions.
  1. +50 −0 README.md
  2. +13 −7 app/helpers/redmine_markdown_formatter/helper.rb
View
50 README.md
@@ -0,0 +1,50 @@
+Redmine Markdown Formatter
+==========================
+
+This is a redmine plugin for supporting Markdown as a wiki format.
+
+What is redmine?
+----------------
+
+Redmine is a flexible project management web application.
+See [the official site](http://www.redmine.org) for more details.
+
+
+What is Markdown?
+-----------------
+
+Markdown is a text-to-HTML conversion tool for web writers. Markdown allows
+you to write using an easy-to-read, easy-to-write plain text format, then
+convert it to structurally valid XHTML (or HTML).
+
+See [the article on John Gruber's blog](http://daringfireball.net/projects/markdown/)
+for more details.
+
+
+Plugin installation
+-------------------
+
+### Prerequisites
+
+* Redmine and its prerequisites
+* [rdiscount](http://tomayko.com/writings/ruby-markdown-libraries-real-cheap-for-you-two-for-price-of-one) gem
+
+### Installation
+
+1. Copy the plugin directory into the vendor/plugins directory
+2. Start Redmine
+
+Installed plugins are listed on 'Admin -> Information' screen.
+
+Don't forget to change "Text formatting" option under
+Administration -> Settings -> General tab.
+
+### 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
+* make the blockquote and unblockquote work for list items to indent
+ and un-indent. Current behavior is kind of confusing.
View
20 app/helpers/redmine_markdown_formatter/helper.rb
@@ -3,7 +3,8 @@ module Helper
unloadable
def wikitoolbar_for(field_id)
-
+ heads_for_wiki_formatter
+
url = Redmine::Utils.relative_url_root +
Engines::RailsExtensions::AssetHelpers.plugin_asset_path('redmine_markdown_formatter', 'help', 'markdown_syntax.html')
@@ -11,11 +12,7 @@ def wikitoolbar_for(field_id)
link_to(l(:label_help), url,
:onclick => "window.open(\"#{url}\", \"\", \"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', :plugin => 'redmine_markdown_formatter') +
- # javascript_include_tag("lang/markdown-#{current_language}", :plugin => 'redmine_markdown_formatter') +
- javascript_include_tag("jstoolbar/lang/jstoolbar-#{current_language}") +
- javascript_tag("var toolbar = new jsToolBar($('#{field_id}')); toolbar.setHelpLink('#{help_link}'); toolbar.draw();")
+ javascript_tag("var wikiToolbar = new jsToolBar($('#{field_id}')); wikiToolbar.setHelpLink('#{escape_javascript help_link}'); wikiToolbar.draw();")
end
@@ -24,7 +21,16 @@ def initial_page_content(page)
end
def heads_for_wiki_formatter
- stylesheet_link_tag('jstoolbar')
+ unless @heads_for_wiki_formatter_included
+ content_for :header_tags do
+ javascript_include_tag('jstoolbar/jstoolbar') +
+ javascript_include_tag('markdown', :plugin => 'redmine_markdown_formatter') +
+ # javascript_include_tag("lang/markdown-#{current_language}", :plugin => 'redmine_markdown_formatter') +
+ javascript_include_tag("jstoolbar/lang/jstoolbar-#{current_language.to_s.downcase}") +
+ stylesheet_link_tag('jstoolbar')
+ end
+ @heads_for_wiki_formatter_included = true
+ end
end
end
end
Something went wrong with that request. Please try again.