Hi All,
We need help in converting HTML code to Jira markup language.
An example: To create a table in description we have HTML table code and need to convert that to Jira markup language which will create a table through REST API to update an issue.
Can anyone help with this
This is the HTML code
<!DOCTYPE html>
<html>
<body>
<h2>HTML Table</h2>
<table>
<tr>
<th>Company</th>
<th>Contact</th>
<th>Country</th>
</tr>
<tr>
<td>Alfreds Futterkiste</td>
<td>Maria Anders</td>
<td>Germany</td>
</tr>
<tr>
<td>Centro comercial Moctezuma</td>
<td>Francisco Chang</td>
<td>Mexico</td>
</tr>
<tr>
</table></body>
</html>
I need to convert this to Jira Markup language like this(this will create a table)
||Company||Contact||Country||
|Alfreds Futterkiste|Maria Anders|Germany|
|Centro comercial Moctezuma|Francisco Chang|Mexico|
FYI We have tried with com.atlassian.renderer.wysiwyg.converter.DefaultWysiwygConverter (this was mentioned in some questions for a solution) will convert to text type, not Jira markup language.
I'm using Jira Software 7.12.3 and this is working for me
POST /rest/api/2/issue/{issueIdOrKey}/comment
{
"body":"||Company||Contact||Country||\n|Alfreds Futterkiste|Maria Anders|Germany|\n|Centro comercial Moctezuma|Francisco Chang|Mexico|",
"visibility": {
"type": "role",
"value": "Administrators"
}
}
It will work if you provide ' | ' between words.
my question is If I have an HTML code how do I convert that to Jira markup language.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry, i didn't understand your question properly.
Hope you find a solution.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.