Joomla! 5 editor plugin with modal popup to select data from list

i’d like to make an editor-xtd plugin to select a value from a formated list from a popup window. Similar to the build-in article or menu buttons but without rendering an iframe.

public function onDisplay($name) {
        // [...]
        $button          = new CMSObject();
        $button->action  = 'modal';
        $button->text    = $app->getLanguage()->_('My Button');
        $button->name    = $this->_type . '_' . $this->_name;
        $button->icon    = 'list'; // TODO
        // TODO svg not used?
        $button->iconSVG = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="24" height="24"> ...</svg>';
        return $button;
}

I’d need to pre-render the popup’s content from within the editor plugin. It will look somethinglike this:

Name | Date       | Size
-----+------------+------------
Foo  | 2024-01-01 | 12345
Bar  | 2024-02-02 | 234

When the user clicks on a row the row’s id is inserted into the editor as {row ###}

What would I need to add to my $button object? Is there an API doc somehwere? And I suppose there’s a javascript to add to handle the “click in table” row and insert something into tinymce.

Thanks in advance!