JIRA - Rich-Text-Editor not loaded in Admin-Configuration

Hi,

I have implemented a Configuration-View for administrators with a Rich-Text-Editor. I added the editor like I did before in some other views but unfortunetly the editor doesnt render correctly in my admin-config-view…

In any other view I use the Rich-Text-Editor it works fine just like in this screenshot

Here is my java function to load the editor

        final RendererManager rendererManager = ComponentAccessor.getRendererManager();
        final Map<String, String> rendererParams = new HashMap<String, String>();

        final JiraRendererPlugin wikiRenderer = rendererManager.getRendererForType(
                "atlassian-wiki-renderer");
        final JiraRendererModuleDescriptor descriptor = wikiRenderer.getDescriptor();

        rendererParams.put("rows", "45");
        rendererParams.put("cols", "40");
        rendererParams.put("wrap", "virtual");
        editVmWithHtml = descriptor.getEditVM("",
                "",
                "atlassian-wiki-renderer",
                "email-content",
                "",
                rendererParams,
                false);

How is it possible that the editor doesnt work for my admin-config-view? What do I have to consider when using rich-text-editor in administration-view and why isnt it documented???

BTW: I require the web-resources for the editor via PageBuilderService

pageBuilderService.assembler().resources().requireWebResource(
            "com.atlassian.jira.plugins.jira-editor-plugin:init");

Regards.

Greetings dude, you ever found a solution?

I’m having the same problem; doing more or less the same thing as you are, tryna get the text editor in the admin config page of my plugin.

I think I know what I’m missing (some JS or CSS) but don’t know where to get it. I’m including the jira-edit-plugin dependency in atlassian-plugin xml for my admin-config page context, I see the stuff being loaded, but nothing is being initialized. Maybe I need to call some sort of init() function from JS on the textarea?

Does somebody found any solution for that problem?
I had similar problem on Jira 7 and could solve it using information from this thread

But now for Jira 8 I have again this problem (on Jira 7 it works just fine), like it is mentioned in the topic. Seems that some dependency is not injected.
Any hint would be helpful.
Thanks

Hey, you may try these (we are putting this in the velocity template for the config page)
${webResourceManager.requireResourcesForContext(“com.atlassian.jira.plugins.jira-wiki-editor:wiki-editor-resources-init”)}
${webResourceManager.requireResourcesForContext(“com.atlassian.jira.plugins.jira-editor-plugin:init”)}

2 Likes

thank you very much, this fixed the problem with wiki style visual editor!

@M.Abdel-Mola I am a couple of steps behind you for my project, how did you even get any RTE to render under your plugin? Do you have any resources that I can read up on? The docs regarding the RTEs did not help tbh.
Are you able to share your code with me?

New Thread for my question: How to initialize the WiKi-Renderer for an Admin Plugin?