Can I use the Jira rich editor in my plugin?

I wan't to use the jira rich editor (the editor of the description in the issue view) in my own plugin page for editing my custom field.

Is that possible?

1 answer

0 vote
Maarten Cautreels Community Champion Aug 05, 2017

Hi Harald,

That shouldn't be a problem. More info (including tutorials) can be found on the Developer Docs.

Hope this helps.

Best,

Maarten

Thx. I will try that asap.

Unfortunately , the links didn't contain what I needed.

What I have so far is:

A WebPanel:

<web-panel key="audit-structure-page" location="com.atlassian.jira.jira-projects-plugin:auditstructurepage">   
<resource type="velocity" name="view" location="templates/panel/audit-structure.vm"/>   
<context-provider class="com.soso.ism.project.panels.AuditStructureContextProvider"/>
</web-panel>



A Context Provider where I add the rederer descriptor:

JiraRendererPlugin renderer = ComponentAccessor.getRendererManager().getRendererForType("atlassian-wiki-renderer");
JiraRendererModuleDescriptor rendererDescriptor = renderer.getDescriptor();
context.put("rendererDescriptor", rendererDescriptor);
context.put("rendererParams", Maps.<String, Object>newHashMap());


And my .vm file where I add the RichEditor:


#disable_html_escaping()
$!rendererParams.put("rows", "5")
$!rendererParams.put("cols", "35")
$!rendererParams.put("wrap", "virtual")
$rendererDescriptor.getEditVM("Test", "null", "atlassian-wiki-renderer", "responsible", "responsible", $rendererParams, false)


What I get is that:

p1.png

What I want is that:
p2.png

It seems there is missing some CSS and/or JS. Any ideas?

Thx


I found out one more thing. If I deactive the new RichText Editor (what I want) the old RichText Editor in my page works as expected and doesn't show the original Text ("Test" without style) over the blue icon.

 

It looks like the activated new RichText Editor messes up the old  RichText Editor.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Thursday in Jira

5 ways you can make the most of Jira Software and Bitbucket Cloud

As part of the Bitbucket product team I'm always interested in better understanding what kind of impact the use of our tools have on the way you work. In a recent study we conducted of software devel...

82 views 0 5
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you