This is an small extension for redmine, which adds a code highlight button to the default editor.
Select a text and press the “code”-button, choose your desired language and
GET RID OF WRITING:
<pre> <code class="ruby"> MyClass.new(:blah) </code> <pre>
This plugin also has a Settings page where you can configure the desired default language for the dropdown menu.
It’s a requested feature on redmine.org and I decided to try to implement it for my needs. Thankfully Felix S. has provided his code. I used the “redmine_wiki_extensions” which guides me through the process.
I also wanna thank Andriy L. which offers me the first hint for figuring out how to implement.
stackoverflow.com/questions/19378096/syntax-highlight-in-redmine
-
Clone or download this repo into your redmine_root/plugins/ folder
$ git clone https://github.com/mediatainment/redmine_codebutton.git
-
or add it as a submodule of git:
$ git submodule add git://github.com/mediatainment/redmine_codebutton.git plugins/redmine_codebutton
-
Run rake to install the coderay_bash gem to provide bash support
$ bundle install --without development test
-
You may have to run the plugin rake task to provide the assets (from the Redmine root directory):
$ rake redmine:plugins:migrate RAILS_ENV=production
-
Restart redmine