I am trying to develop a Plugin for Jira Admins, in which they can Submit a Text through a form and something happens with the text(That part is not in scope right now).
In this form I would like to use the fancy Richt Text Editor from Jira itself, the Wiki Renderer and submit the form through it. Unfortunately I am a beginner in this context and don’t know where to start.
I have read all the existing Threads on this topic and they were a few steps ahead already leaving out the information I need. I already managed to add in the Websection for the plugin and add a webitem from which the VM Template with the form gets rendered.
How do I initialise the Wiki Renderer:
a) On my VM template?
b) In my servlet(?), java file where the VM gets loaded in
I am sorry if it is a complete duplicate in your opinion, but the existing threads unfortunately did not help. Thank you for reading!
Here are the different places where I have tried to gather more information from(Posting over pastebin since the community forum only allows 2 links to be shared):
and also WRM.require('wr!com.atlassian.jira.plugins.jira-wiki-editor:wiki-editor-resources-init').then(function () {}); in my main js file. My Js is being read properly
Do I know create a Text area and give it a class or an id that is predefined? Is there a custom component to declare? Maybe something like <wiki-editor-field> ?
I have tried <rich-editor> and <wiki-textfield> both, also separately. Only <wiki-textfield> seems to get rendered but completely empty, on purpose I wrote “rich-editor” and “wiki-textfield” to see if any of them get rendered.
JS and the HTML are as stated above, I can provide more code if it makes it easier?
Must these two fields be in a form to function properly?
This is my result:
As you can see it has a <rich-editor> element with different props inside it. Also contains some wiki-* classes and props like renderer-type="atlassian-wiki-renderer".
Hope it helps