Control exposed macros in the CKEditor Insert menu


Using XWiki 14.10.19.

I’ve been looking for a way to define which macros are available when clicking on the Insert button.

The closest I have found was this page: but this is to add them directly at the top-level, I’m just looking at customizing what the available options in this menu are, particularly because we’ve had more luck with the “display” macro, while the “include” macro is causing problems with images for the way we use it.

1 Like


We have the Pro Macros now and want to highlight/recommend specific ones to our users. That and the ‘Other macros’ list is quite extensive (not a bad thing at all!) and I think most of our users will probably not know which ones to use.

While you wait for better, more complete replies, I was once pointed to this page for several information about the plugin:


I don’t know if it’s possible right now (cc @mflorea who should know) but it would indeed be an interesting feature to add if it’s not already possible.



The insert button drop-down is controlled by two configuration properties:

  • toolbarMenuItems: you first need to define a “toolbar menu item” for the macros you want to expose. Check the examples:

    infoBox: {
      command: 'xwiki-macro-insert',
      data: {
        name: 'info',
        content: 'Type your information message here.',
        parameters: {...}

    As you can see you can specify both the macro content and parameters (preset the values). For the command you have two options:

    • xwiki-macro-insert: insert the macro directly
    • xwiki-macro: open the macro wizard
  • toolbarMenus: you need to modify the “insert” menu

Both of these can be modified from the CKEditor administration section, but I think you need to set the entire value, i.e. you need to copy the current value and modify it (you can’t just add a new menu item).

Hope this helps,

1 Like

@mflorea I don’t know if it’s ok for you, but I’ve added this section in the doc:

Feel free to improve it.

Thanks for your answer.

1 Like