Skip to content

Displays a button in editor to surround selected text with snippets for convenient codehighlight in the wiki

Notifications You must be signed in to change notification settings

paginagmbh/redmine_codebutton

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

code_highlight

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.

www.redmine.org/issues/14937

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

Installation

  • 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

About

Displays a button in editor to surround selected text with snippets for convenient codehighlight in the wiki

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 46.5%
  • CSS 23.3%
  • HTML 20.0%
  • Ruby 10.2%