Hi everyone.
Is there any way to add something like this to the .md files created in Netlify CMS?
import Button from 'react-bootstrap/Button';
The goal is to let editors create MDX files that will be used later in a NextJS static site generator.
I’ll add Editor components—e.g. a button component that outputs something like <Button variant="primary">Hello world</Button>{' '}
.
To make things easier for the site generator, I was hoping to import Bootstrap into the MDX files themselves.
But I would like the import statement to be hidden so editors don’t get confused by it or accidentally delete it in the Rich text view. (Obviously they can do so in markdown view.)
Is there any way to inject the statement by default and in a way that keeps it hidden within the editor?
Open to other approaches if this one doesn’t make sense.