Post HTML in description while using Rest API

salman zafar July 19, 2018

hi 

i have been using rest api /rest/api/2/issue to create an issue (sub task) .its working fine now issue is i have to post HTML . we can do this in Browser but somehow if i post html while using rest api its considered as TEXT 

is there any way i can do something about it 

i have read somewhere in which he preferred to use {html} before text but that didn't worked.

any help will be appreciated

2 answers

1 vote
Jared Volpe March 10, 2019

Can anyone shed some light on this? 

Carlo Nölle May 3, 2019

basically you cannot post html, just plain text or plain text with wiki formatting arguments, which is like markdown

0 votes
Earl McCutcheon
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 24, 2018

Hello Salman,

The fields you are posting the dat into are text fields, and have no way of guessing what the content type might be so it will not render HTML.

If you have the Text Fields configured as a Wiki style renderer which the description and comment fields should be by default, then you can use Wiki markup formatting for any formatting you are applying to the field.

Regards,
Earl

salman zafar July 31, 2018

i have tried using wiki markup formatting e.g. 

# First Item # Second Item 

and in result it renders

1. First item # Second Item

 

Any help will be appreciated 

Like Vishal R likes this
Earl McCutcheon
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 14, 2019

Hey Salman,

The Wiki markup for numbered lists is going to be line oriented and not an inline orientation

if you use:

# First Line
# Second Line

It will Render like this using markup:

  1. First Line
  2. Second Line

Regards,
Earl

Suggest an answer

Log in or Sign up to answer