OptionaladditionalThemes?: Ref<Record<string, string>, Record<string, string>>Optionalclasses?: stringAdditional class to wrap the loaded css in.
OptionaldarkLightBgs?: Ref<{ dark: string; light: string }, { dark: string; light: string }>Optionaldebug?: booleanOptionaldefaultTheme?: string
Dynamically loads and creates the css for a given theme.
It's result, themeCss should be added as a head tag (e.g. using useHead or teleporting a
<component :is="'style'">to the head).By default it's an array of one item so you can more easily pass it to unhead https://unhead.unjs.io/'s useHead.
By default, it will only apply the theme to the code blocks in the prosemirror editor. This is done via css nesting so might not work in older browsers.
While additionalThemes can be provided, it is dangerous to inject them from user input.
Instead, you can create a theme that only uses css variables, then allow the user to customize the css variables instead.
Dark theme detection is just done by checking if the theme name contains "dark".
You can provide different background colors for dark and light themes by providing a
darkLightBgsand it will automatically apply them.