Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to Render HTML in Unlimited text field

Adam Barylak
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 20, 2014

I am looking for a way to enter and display/render HTML code that is entered into a field able to handle an unlimited text length.

My plan is to have this field as Read-Only by not placing it on any Edit screens, and only updating the field via workflow scripting using the Script Runner plugin.

However, the built in Text Field (single and multi-line) do not render the HTML because they escape the HTML code. Now, there is a Text Field (read only) this i do not think is a standard custom field type but may be from one of the plugins i have, however that only takes a maximum of 255 characters. I have also tried using the Hideable Free Text Field which comes with the Behaviours plugin, however that is currently causing errors in my instance so i can't even test to see if it will display the HTML correctly. The last resort option is to use a Scripted Field from the Script Runner plugin, but the information is all based on workflow transitions, so i would much rather have the field updated once and then it is set for all subsequent views hopefully reducing the stress on the server.

Any help will be appreciated, I basically want to set some HTML and have it display as rendered HTML code.

6 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
B_ Normann P_ Nielsen
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 3, 2014

The https://marketplace.atlassian.com/plugins/com.atlassian.jira.toolkithas 2 fields for HTML,

message custom field (for edit)

message custom field (for view)

I use the fields quite frequenty to link to documentation within an issue, only annoyed by the fact I have to make 2 fields for every issue/project - and that the Field name is only visible in one of the fields.

To make a JIRA/Confluence linke button, but something like this in the field(s): http://www.mos-eisley.dk/display/ATLASSIAN/Making+a+AUG+like+button#

Adam Barylak
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 5, 2014

Thanks for the suggestion, however for my needs, that isn't going to work. I tested it out and it will only display what was set in the default value. I'm trying to set my field programatically, and i tried that and it just still won't display.

I think i may have to create my own custom field for this purpose.

1 vote
Boris Georgiev _Appfire_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 20, 2014

Is this a real question ?

0 votes
Umair Haroon
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 5, 2014

I think I did something similar, insert HTML from a workflow transition via a script.

Mine wasnt rendering till I changed the renderer to wiki style.

Then it came out fine.

Read these two links to get an idea how to get it right (first relating to jira and wiki renderer which is what you would need to use in my opinion).

https://jira.atlassian.com/secure/WikiRendererHelpAction.jspa?section=links

https://confluence.atlassian.com/display/DOC/Confluence+Wiki+Markup

0 votes
Mike Sorensen
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 31, 2014

Wiki Style Renderer does not take raw HTML. It takes Contour Markup Language and translates it to HTML for your browser.

There is no convenient and secure way to show formatted HTML from raw HTML in a JIRA Field.

Nicolas Bier May 27, 2016

"Contour Markup Language"?

Is that an open standard?

Like Etienne Farnault likes this
0 votes
Boris Georgiev _Appfire_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 20, 2014

What renderer are you using on the field Default Text or Wiki Style? Try changing the renderer and see if it will show up as html

Adam Barylak
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 20, 2014

Yep, i thought of that first thing after i noticed it was just displaying the actual HTML code, but when i switched it to Wiki Style rendering, it didn't change anything, it still displays the HTML code.

0 votes
Adam Barylak
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 20, 2014
I was having a little bit of a problem submitting the question initially, got a 405 error message from the server l, so I started stripping information out to submit the question, then added the information bad in. You must have clicked on the immediately after I submitted, but before I finished editing.

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

TAGS
AUG Leaders

Atlassian Community Events