Option to set MarkdownEditor background color

Hi! We are using a MarkdownEditor() component to preview and edit a .svg string. This works great, except for white images. As the background color is also white the .svg cannot be seen. Is there a way to alter the background-color of the MarkdownEditor? I already tried something like this:

           MarkdownEditor::make('logo_white')
->extraAttributes(['style' => 'background-color: red'])
->toolbarButtons(['edit', 'preview']),


But that did not have the expected result...
Schermafbeelding_2023-08-03_om_10.08.46.png
Solution
Found a solution by overwriting the styling in filament.css:

.logo-markdown [x-html='preview'] {
    background-color: red !important;
}


And then adding the class as an extra attribute to the editor like this:

extraAttributes(['class' => 'logo-markdown'])
Was this page helpful?