IMPORTANT!
A bug has recently been found in the plugin when used with Jira 5.0 which makes this plugin unusable UPDATE: The Jira 5 bug has been resolved by Atlassian in version 5.0.3 which is now available. Version 1.6.1 of the plugin is released in order to support existing users of the plugin, however no further support will be provided.
Please note: I am finding it increasingly hard to find time to provide the minimum support necessary, therefore this plugin is no longer supported. Please do not use this for any version of Jira as any upgrade or system change may result in the plugin not working.
For existing users of the plugin who wish to update their Jira instance: I recommend first testing the plugin in the new version (excluding version 5), and if this fails to work either disable the plugin and allow your users to edit the html in the existing fields by hand, or use the Reverse Renderer to remove the html tags.
Description
Jira plugin that provides a wysiwyg textarea renderer using the
TinyMCE Editor.
Links
Install
- Copy the tinymce-renderer-plugin-xx.jar file to {JIRA_HOME}/plugins/installed-plugins
- Restart jira
- Ensure the html renderer option is enabled. As Administrator go to plugins, choose "Wiki Renderer Macros Plugin", and select "Enable" for the html option.
- Modify the renderer for the field you wish to use TinyMCE in. Example: As Administrator go to "Field Configurations", select "Configure", next to a text field select "Renderers", choose "TinyMCE Renderer"
Features / Limitations
Because this plugin scratches my itch only a few of the TinyMCE plugins and themes are available:
- The only theme used is advanced-default
- The following plugins are used:
-
- contextmenu
- fullscreen
- inlinepopups
- paste
- preview
- table
- The configuration options are modifiable but lie deep in the jar file structure: tinymce-renderer-plugin.jar\templates\plugins\renderers\tinymce\tinymce-renderer-edit.vm
- Buttons available:
-
- bold, italic, underline, strikethrough
- justifyleft, justifycenter, justifyright, justifyfull
- bullist, numlist
- outdent, indent, blockquote
- undo, redo
- link, unlink, image
- formatselect, fontselect, fontsizeselect
- forecolor, backcolor
- tablecontrols
- hr, removeformat, visualaid
- pastetext, pasteword, selectall
- sub, sup, charmap
- fullscreen, preview, cleanup, code
Usage Notes
The buttons in the Editor are pretty self-explanatory, and more information can be found on the TinyMCE site.
For instructions on how to revert to plain text should you wish to stop using the plugin please see: Reverting to Plain Text
For instructions on how to modify templates in order to answer issue 18 (Emails are messy), please see: Modifying Templates
For instructions on how to modify templates in order to answer issue 17 (Export to Excel in Jira showing html tags for fields rendered by TinyMce), please see this comment for a possible solution.
Editing a page
The rendered content
Adding an image
Images cannot be directly uploaded using the TinyMCE editor. Instead, upload the image to the issue, make a note of the URL, and use this in the image popup.
Update: It seems that Firefox allows you to paste an image from your clipboard directly into the editor! Keep in mind that the image data is stored in the database, not in the attachments folder.
Multiple Renderers
Version 1.1 allows multiple renderers when editing an issue.
Wiki Text Translation
Version 1.4 gives an administration option which, when set, will force the plugin to translate any wiki text into html.
It is important to realise that this makes a permanent modification to the format of the field at the point when it is next edited, and this is not reversable! Be very sure that you want to make the conversion, and always make a backup of the data.
The images below show the effects of the option, plus what would happen if the field renderer is reverted after a field is edited.
- Environment Field edited with Wiki Renderer.
- Environment Field rendered with Wiki Renderer.
- (Not shown: Changing the renderer for the Environment field from Wiki to TinyMCE)
- TinyMCE plugin option to convert Wiki text to html. Found in the Administration Page.
- Environment Field edited with TinyMCE Renderer.
- (Not shown: Environment Field rendered with TinyMCE Renderer. Same output as with Wiki Renderer)
- Environment Field rendered with Wiki Renderer if converted to html!
Releases
- tinymce-renderer-plugin-1.6.1.jar (24th April 2012)
- Resolves Issue 32: "TinyMCE Renderer - Reverse"
- Resolves Issue 34: "Can not enable plugin after upgrade to JIRA 5.0"
- Resolves Issue 30: "Entry Navigator Exception when rendered field is Empty/Null"
- Resolves Issue 29: "Comment field cut-off and lack of spacebar in certain JIRA dialogs"
- tinymce-renderer-plugin-1.5.8.jar (11th March 2012)
- Resolves Issue 32: "TinyMCE Renderer - Reverse"
- Resolves Issue 30: "Entry Navigator Exception when rendered field is Empty/Null"
- (Release 1.5.7 is revoked and merged into 1.5.8 and 1.6.0 (11th March 2012))
- tinymce-renderer-plugin-1.5.6.jar (11th November 2011)
- Added additional renderer "TinyMCE Renderer - Reverse" to aid in reverting from TinyMCE generated HTML back to plain text. Please see the dedicated page for details: Reverting to Plain Text
- tinymce-renderer-plugin-1.5.5.jar (27th October 2011)
- Bug fix where Null Pointer Exception was thrown when field is not set (possibly introduced in Jira 5's use of dialogs to create new issues).
- Reintroduced most toolbar options in the dialog version of the editor as Jira 5 makes heavy use of dialogs, e.g. for editing an issue. When the dialog is too small for the editor the fullscreen icon is now to the far left which allows all toobar options to be seen.
- tinymce-renderer-plugin-1.5.4.jar (25th October 2011)
- Updated to be compatible with Jira 5.0. Is backwards compatible with 4.x hence the minor version number update.
- tinymce-renderer-plugin-1.5.3.jar (13th October 2011)
- Resolves Issue 19: "Renderer not working in pop-up"
- Resolves Issue 26: "Dialog fix breaks other dialogs"
- (Release 1.5.2 revoked and merged into 1.5.3 (9th October 2011))
- tinymce-renderer-plugin-1.5.1.jar (18th September 2011)
- Resolves Issue 22: "New 1.5 version breaks comment field on Jira 4.4 when using wiki-markup"
- tinymce-renderer-plugin-1.5.jar (4th August 2011)
- Resolves Issue 21: "Jira 4.4: Unable to instantiate module class". Fix for Jira 4.4.
- tinymce-renderer-plugin-1.4.5.jar (3rd March 2012)
- Resolves Issue 32: "TinyMCE Renderer - Reverse"
- tinymce-renderer-plugin-1.4.4.jar (18th February 2012)
- Resolves Issue 30: "Entry Navigator Exception when rendered field is Empty/Null"
- Resolves Issue 31: "Reverting from TinyMCE to plain text."
- tinymce-renderer-plugin-1.4.3.jar (13th October 2011)
- Resolves Issue 14: "TinyMCE Controls do not render in popup dialogs in Jira 4.2"
- Resolves Issue 26: "Dialog fix breaks other dialogs"
- (Release 1.4.2 revoked and merged into 1.4.3 (11th October 2011))
- tinymce-renderer-plugin-1.4.1.jar (16th July 2011)
- Security Update - restricts use of script and other tags in TinyMCE editor. It is higly recommended to upgrade to this version if your Jira is accessible to the public.
- tinymce-renderer-plugin-1.4.jar (23th April 2011)
- Resolves Issue 7: "Add option so that TinyMCE Renderer also translates WikiText". See below for details.
- Resolves Issue 9: "CSS race condition sets different fonts and sizes to <body>".
- Resolves Issue 11: "Issue with CR".
- Resolves Issue 16: "JIRA 4.3 support".
- tinymce-renderer-plugin-1.3.1.jar (13th January 2011)
- Resolves Issue 9: "CSS race condition sets different fonts and sizes to <body>".
- tinymce-renderer-plugin-1.3.jar (27th December 2010)
- Resolves Issue 6: "Issue with Firefox 3.5.15".
Please Note: There is still an issue though (I believe in v4.1.2+): when one selects the comment button from the top of the view page, and then selects the comment button at the bottom of the view page, the TinyMce editor fails to load correctly and the user cannot type in the textarea. I have tried several configurations to resolve this, but so far without success. I shall continue to search for an optimal solution.
- tinymce-renderer-plugin-1.2.jar (28th November 2010)
- Resolves Issue 5: "tinymce-renderer-plugin IE compatability".
- tinymce-renderer-plugin-1.1.jar (29th October 2010)
- Resolves Issue 3: "If there is more than one on a screen, only the last one renders correctly". (screenshot)
- Tested to work on Jira 4.2
- tinymce-renderer-plugin-1.0.jar (13th October 2010)
Support
This plugin is unsupported, I am releasing it in case it is useful for people. If the plugin is not working whatsoever I will try and find time to help resolve the issue. I do not currently plan on implementing more themes or mce-plugins, but will help as much as I can if you want to extend the plugin for your environment.
If you do encounter a problem, there is an issue tracker on github. Please be as specific as you can, and if possible include the following information:
- Browser + version
- Jira version
- Any relevant error messages in the error console of the browser
- If you have access, any relevant error messages in the atlassian-jira.log file on the server
Modifications to the TinyMCE Library
- tiny_mce_popup.js - modified to set the tinymce object which seemed to be not set when called within jira. Identified with comment: "Modified from the original by Gary Hodgson for Jira Plugin"
- themes/advanced/skins/default/dialog.css - prefixed all declarations with "tinymce_dialog"
- themes/advanced/skins/default/content.css - prefixed all declarations with "mceEditor"
- themes/advanced/*.htm - added explicit class attributes to body tags for theme css declarations (otherwise the jira css overrides the styles, for example: tabs and buttons) Perhaps there is a TinyMCE configuration item for this, but I couldn't find one that worked.
- plugins/table/*htm - as above.
License
BSD
Authors
Gary Hodgson (contact@garyhodgson.com)
Download
You can download this project in either zip or tar formats.
You can also clone the project with Git by running:
$ git clone git://github.com/garyhodgson/tinymce-renderer-plugin