Customize the Markdown theme with SCSS
masterTo create a custom markdown theme, define an SCSS file using the .markdown-theme-{name} class pattern. You can then import your custom styles instead of the default ones.
- Create a
.scssfile:
$value: 'my-custom-theme';
.vuetify-pro-tiptap-editor__content.markdown-theme-#{$value} {
.tiptap.ProseMirror, .content {
/* your custom styles */
}
}- Import the editor styles and your custom theme in your entry point:
import 'vuetify-pro-tiptap/styles/editor.css'
import './styles/markdown/my-custom-theme.scss'- Apply the theme to the components:
<VuetifyTiptap v-model="content" markdown-theme="my-custom-theme" /><template>
<VuetifyTiptap v-model="content" markdown-theme="github" />
<VuetifyViewer :value="content" markdown-theme="github" />
</template>