Post HTML Issue Description with JIRA REST API v3

@PaulTaggart Have you noticed font color, super, and subscript in HTML don’t get converted to Wiki with this transformer? Even using the latest version it still fails to represent these, while tables, bullet lists, etc. all get converted just fine.

Update: I ended up switching to TinyMCE. It is smaller than Atlaskit’s Rich Text Editor still. I noticed these same issues with either prosemirror or TinyMCE occurring though.

@evbo This is working for me. Below is the Wiki Markup and the HTML it is converted to.

This Wiki Markup:

h1. Heading 1
h2. Heading 2
h3. Heading 3
*bold*
_italic_
+underlined+
{panel:bgColor=#deebff}
info
{panel}
{panel:bgColor=#eae6ff}
note
{panel}
{panel:bgColor=#e3fcef}
success
{panel}
{panel:bgColor=#fffae6}
warning
{panel}
{panel:bgColor=#ffebe6}
hair on fire - updated - updated
{panel}
~subscript~ normal ^superscript^
{color:#bf2600}red{color} {color:#0747a6}blue{color}

Is converted to this HTML:

vue-betr-html.js?2ea2:46 
<h1>
	Heading 1
</h1>
<h2>
	Heading 2
</h2>
<h3>
	Heading 3
</h3>
<p>
	<strong>bold</strong>
</p>
<p>
	<em>italic</em>
</p>
<p>
	<u>underlined</u>
</p>
<div data-panel-type="info">
	<div data-panel-content="true">
		<p>
			info
		</p>
	</div>
</div>
<div data-panel-type="note">
	<div data-panel-content="true">
		<p>
			note
		</p>
	</div>
</div>
<div data-panel-type="success">
	<div data-panel-content="true">
		<p>
			success
		</p>
	</div>
</div>
<div data-panel-type="warning">
	<div data-panel-content="true">
		<p>
			warning
		</p>
	</div>
</div>
<div data-panel-type="error">
	<div data-panel-content="true">
		<p>
			hair on fire - updated - updated
		</p>
	</div>
</div>
<p>
	<sub>subscript</sub> normal <sup>superscript</sup>
</p>
<p>
	<span class="fabric-text-color-mark" style="--custom-text-color: #bf2600" data-text-custom-color="#bf2600">red</span> <span class="fabric-text-color-mark" style="--custom-text-color: #0747a6" data-text-custom-color="#0747a6">blue</span>
</p>

NOTE: I have used custom SCSS for the panels, e.g.:

div[data-panel-type="info"] {
  background-color: #deebff;
}

Thanks, but my issue is going from HTML → Wiki. For instance, when I try to convert the following html no color information is preserved:

<p><span style="color: rgb(224, 62, 45);">asdfjdddddd</span></p>

@evbo, What happens if you try to convert this HTML?:

<span class="fabric-text-color-mark" style="--custom-text-color: #bf2600" data-text-custom-color="#bf2600">red</span> <span class="fabric-text-color-mark" style="--custom-text-color: #0747a6" data-text-custom-color="#0747a6">blue</span>

I suspect that the transformer is specifically looking for the data-text-custom-color.

Thanks, unfortunately I’m using tinyMCE which does not use that format. So I will need to transform it into that variant of colored html tag.

@PaulTaggart what about img tags, this doesn’t seem to convert to wiki markup for me:

<p><img src="http://jira:8080/secure/attachment/10200/128x1282x.png" alt="">test</p>

For instance, in this case it is converting to ADF format and not wiki like it should:

{adf:display=inline}{"type":"image", "attrs":{"src":"https..."}}{adf}

I think the correct wiki markup is something like this?:

[!](....path to image)

Hi, @evbo.
I’d started to look at img tags. Fortunately my wife has just had a baby and I have 2.5 months paternity leave so I will not get around to this until September.
If this is looked into while I’m away I will update this thread.

Atlassian have details of the wiki markup that should be created. For example, if you attach an image to an issue (image.png) then you can add the following to show that attachment:

!image.png|width=400,height=229!

From wiki markup documentation, Atlassian allows macros. I think that this is such a macro (so I think it is correct):

{adf:display=inline}{"type":"image", "attrs":{"src":"https...", "alt"="test"}}{adf}

From my post above, the following is a panel macro:

{panel:bgColor=#deebff}
info
{panel}

Paul

Congrats @PaulTaggart and I actually am programming with my 3 month old by my side as a write this :slight_smile:

unfortunately I can’t find documentation for this particular format of a macro, and it looks an awful lot like JSON, so I think it is ADF and not a macro. There is an “attachment” and “multimedia” macro but looks nothing like this.

I created a separate issue for this here:

Recently I needed this and I discovered that sending the summary with Markdown also works. Ineeded to use bold, h2, etc… You can text the summary as:

h2. Heading
* *title:* value

and it will create the issue with the summary formatted. I think this is useful for most of use cases.

Here’s the reference for markdown:

Hello @pakogn

Given that the Summary field is and always has been a plain text field, not a rich text field, your claim to be able to make the Summary field display markdown formatted text is difficult to believe.

Also, ‘h2’ isn’t a markdown code, so using it would achieve nothing, even in a rich text field.

Hello you find a solution to this problème? Thanks

Hello you find a solution to this problème? Thanks??

Hello @meddebamir

This question was correctly marked as solved and closed. If you think you have new or different problem that’s not covered already by the many comments in this thread, please open a new question yourself.

I don’t think this trick works anymore with the v3 API, since I only get “Operation value must be an Atlassian Document (see the Atlassian Document Format)”.