This is the plugin for Redmine.
This plugin adds two buttons to jsToolBar to output HTML tags for changing the
text color and background color.
- Clone this repository to your Redmine plugins directory.
git clone https://github.com/sk-ys/redmine_wiki_text_colorizer.git YOUR_REDMINE_DIRECTORY/plugins/redmine_wiki_text_colorizer
- Restart Redmine.
- Download zip file from the release page or the latest main repository.
- Extract the ZIP file to your Redmine plugin directory. The name of the unzipped directory must be
redmine_wiki_text_colorizer
. - Restart Redmine.
- Navigate to your Redmine plugin directory.
- Delete the directory for this plugin.
rm -r redmine_wiki_text_colorizer
- Restart Redmine.
This information provides an overview of the text formatting styles supported by Redmine, and highlights specific test cases to demonstrate how different formats behave in various scenarios (unofficial).
This plugin supports both HTML format without double quotes
and Textile CSS format
.
<span style=color:red;>HTML format without double quotes</span>
%{color:red}Textile format%
(To use this option, you need to check the Use Textile CSS output
checkbox must be checked in plugin settings page and Redmine must be configured to use the Textile format.)
* %{color:red}Textile format%
* %{background-color:yellow}Textile format%
* %{color:red;background-color:yellow}Textile format with multiple styles%
* %{color:red}%{background-color:yellow}Nested Textile format%%
* <span style=color:red;>HTML format without double quotes</span>
* <span style=background-color:yellow;>HTML format without double quotes</span>
* <span style=color:red;background-color:yellow;>HTML format with multiple styles without double quotes</span>
* <span style=color:red;><span style=background-color:yellow;>Nested HTML format without double quotes</span></span>
* <span style="color:red;">HTML format with double quotes</span>
* <span style="background-color:yellow;">HTML format with double quotes</span>
* <span style="color:red;background-color:yellow;">HTML format with multiple styles with double quotes</span>
* <span style="color:red;"><span style="background-color:yellow;">Nested HTML format with double quotes</span></span>
Format | Textile | Markdown(Deprecated) | CommonMark Markdown (GitHub Flavored) |
---|---|---|---|
Textile format | ✔ | ✖ | ✖ |
Textile format with multiple styles | ✔ | ✖ | ✖ |
Nested Textile format1 | ✖ | ✖ | ✖ |
HTML format without double quotes | ✔ 2 | ✔ 3 | ✔ |
HTML format with multiple styles without double quotes | ✔ 2 | ✔ 3 | ✔ |
Nested HTML format without double quotes | ✔ 2 | ✔ 3 | ✔ |
HTML format with double quotes | ✖ | ✔ 3 | ✔ |
HTML format with multiple styles with double quotes | ✖ | ✔ 3 | ✔ |
Nested HTML format with double quotes | ✖ | ✔ 3 | ✔ |
This plugin utilizes the Spectrum library (https://github.com/seballot/spectrum) for color picker functionality. Thanks.
Footnotes
-
When applying both text color and background color to a string using Textile formatting, manual code modification is required.
Example:%{color:red}%{background-color:yellow}text%%
->%{color:red;background-color:yellow}text%
↩ -
Redmine source code must be manually updated.
Change the following:ALLOWED_TAGS = %w(pre code kbd notextile)
->ALLOWED_TAGS = %w(pre code kbd notextile span)
For details, refer to this link. ↩ ↩2 ↩3 -
Redmine source code must be manually updated, but this involves security risks, so I recommend using CommonMark Markdown (GitHub Flavored) text formatting.
Change the following::filter_html => true,
->:filter_html => false,
For details, refer to this link. ↩ ↩2 ↩3 ↩4 ↩5 ↩6