Plugins Directory » jsToolbar Buttons Extension

11649 Author: T Leish
Website: https://github.com/tleish/redmine_jstoolbar_ext_buttons
Code repository: https://github.com/tleish/redmine_jstoolbar_ext_buttons.git
Registered on: 2014-05-21 (about 7 years ago)
Current version: 0.2.1
Compatible with: Redmine 3.1.x, 3.0.x, 2.6.x, 2.5.x, 2.4.x, 2.3.x, 2.2.x, 2.1.x, 2.0.x
User ratings:   (0)

Summary

The Redmine jsToolbar Buttons Extension adds some additional buttons to the Redmine wiki and text editor toolbar.

Requirements

This plugin requires the Redmine jsToolbar Ext plugin to also be installed.

Buttons

These buttons are for convenience for inserting text. * Insert Horizontal Rule * Insert Link Title * Insert Ruby Syntax Formatting * Insert Javascript Syntax Formatting * Textile Quick Reference

Buttons

Button Customization

To add/remove your own buttons to the list, update the following files:

  • plugins/redmine_jstoolbar_ext_buttons/assets/javascripts/redmine_jstoolbar_ext_buttons.js.
  • plugins/redmine_jstoolbar_ext_buttons/assets/stylesheets/redmine_jstoolbar_ext_stylesheets.js.
{
  title: 'My Button Title',
  after: 'h3', // element to place button after, in this particular case after the button with the class name '.jstb_h3'
  fn: {
    wiki: function () {
      this.encloseLineSelection('\n---\n', '', function (str) {
        if (str.length > 0) { str += '\n'; }
        return str;
      });
    }
  }
}

For other wiki function examples, look at the source code for the jsToolbar in the Redmine Github Repository:

See Also:

Installation notes

$ cd redmine/plugins
$ git clone https://github.com/tleish/redmine_jstoolbar_ext
$ git clone https://github.com/tleish/redmine_jstoolbar_ext_buttons

restart Redmine

Changelog

0.2.1 (2015-09-16)

Compatible with Redmine 3.1.x, 3.0.x, 2.6.x, 2.5.x, 2.4.x, 2.3.x, 2.2.x, 2.1.x, 2.0.x.

  • Adds support for Redmine 3
  • Fixes textile/markdown bug

0.1.0 (2014-05-21)

Compatible with Redmine 2.5.x, 2.4.x, 2.3.x, 2.2.x, 2.1.x, 2.0.x.