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


#1

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.


#2

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?