Skip to content

[EuiMarkdownEditorUiPlugin] Type def does not support omitting the button, even though this is supported and documented #9557

Closed

Description

@Zacqary

Describe the bug
Documentation for the markdown editor's uiPlugins indicates that:

The button can be omitted if you wish the user to only utilize syntax to author the content.

This is, in fact, true. If you create a UI plugin with a button of {} (not undefined, this breaks), adding the uiPlugin will successfully add its helpText to the markdown syntax help popup without adding a button to the toolbar.

Here's a working example:

Help text is added Without adding a button to the toolbar
Image Image

However, the typedef for EuiMarkdownEditorUiPlugin defines button as an object that requires a label and an iconType.

The only way to successfully use this apparently documented and working feature without breaking Typescript is to typecast the UI plugin.

Impact and severity
Developer experience. Low impact, low severity, but annoying. Code should reflect the docs.

If it's no longer EUI's intention to support this use of UI plugins, it should be removed from the docs and UI plugins should throw when passed an empty button.

Environment and versions

  • EUI Version: 114

To Reproduce

// Typescript will error on this line
const myUiPlugin: EuiMarkdownEditorUiPlugin = {
   name: 'myUiPlugin',
   button: {},
   helpText: <p>This help text will be inserted to the markdown syntax popup</p>
}
const { uiPlugins } = getDefaultEuiMarkdownPlugins();
// If you omit the EuiMarkdownEditorUiPlugin definition above, typescript will error on this line
uiPlugins.push(myUiPlugin);

<EuiMarkdownEditor 
   uiPlugins={uiPlugins}  
  {...rest of required props}
/>

This code will run successfully, despite the typescript error.

Expected behavior
Typescript should allow an empty button. Or, alternatively, a more explicit schema for EuiMarkdownEditorUiPlugin should be defined allowing button to be undefined as long as editor and formatting are also undefined.

Activity

  1. added
    ⚠️ needs validation
    on Apr 2, 2026
  2. added theissue type on Apr 2, 2026
  3. SohamSurdas commented on Apr 4, 2026

    @SohamSurdas

    Hi , I'd like to work on this .
    Can you please assign this issue to me?
    @kimjoar @masci

  4. weronikaolejniczak commented on Apr 7, 2026

    @weronikaolejniczak
    Contributor

    @SohamSurdas we do not assign issues to external contributors. Also, we only expect community contributions on issues tagged "help wanted". We appreciate your interest and recommend to check out our contributing guidelines first!

  5. self-assigned this
    on Apr 21, 2026
  6. removed
    ⚠️ needs validation
    on Apr 21, 2026
  7. tkajtoch commented on Apr 21, 2026

    @tkajtoch
    Contributor

    Thank you for the bug report! I can confirm this is valid and will try to get to it this week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions