Getting Started with the Vue Markdown Editor Component in Vue
15 Jul 20264 minutes to read
The Syncfusion Vue Markdown Editor is a web-based editor that enables users to create, edit, and format Markdown content with features such as table support and structured content formatting. This article provides a step-by-step guide for setting up a Vite project with a TypeScript environment and integrating the Syncfusion Vue Markdown Editor component using the Composition API.
To get started quickly with the Vue Markdown Editor, refer to this video tutorial:
Prerequisites
This guide uses Vite as the bundler and development environment. Install Node.js 24.13.0 or higher before proceeding. For detailed information about Vite’s capabilities and configuration options, refer to the Vite documentation.
Create a Vue Application
Run the following commands to set up a Vue application:
npm create vite@latest my-app -- --template vue-tsThis command will prompt you to install the required packages and start the application. Select the options as shown below.

As Syncfusion packages are not installed yet, currently, the No option will be selected. Then, navigate to the project directory and install the dependencies using the following commands:
cd my-app
npm install
Add Syncfusion Markdown Editor packages
Syncfusion packages are available at npmjs.com. To use Vue components, install the required npm package.
npm install @syncfusion/ej2-vue-richtexteditorAdding CSS reference
Syncfusion provides multiple themes for the Rich Text Editor component. For a complete list of available themes, refer to the themes packages.
To apply the Tailwind 3 theme, install the corresponding theme package by using the following command:
npm install @syncfusion/ej2-tailwind3-themeThe installed theme package includes an index.css file that automatically imports all the required dependency styles. Import the following stylesheet into <style> section of src/App.vue.
@import '../node_modules/@syncfusion/ej2-tailwind3-theme/styles/rich-text-editor/index.css';IMPORTANT
To apply the application-specific styles correctly remove all the default styles from src/style.css.
Module injection
The following modules provide the basic features of the Markdown Editor.
-
Toolbar- Inject this module to use Toolbar feature. -
Link- Inject this module to use link feature in Markdown Editor. -
Image- Inject this module to use image feature in Markdown Editor. -
MarkdownEditor- Inject this module to use Rich Text Editor as markdown editor.
IMPORTANT
Additional feature modules are available here.
Adding Markdown Editor component
Now, you can start adding Vue Markdown Editor component in the application. For getting started, add the Markdown Editor component in src/App.vue file using following sample.
<template>
<ejs-richtexteditor editorMode="Markdown"></ejs-richtexteditor>
</template>
<script setup>
import { provide } from "vue";
import { RichTextEditorComponent as EjsRichtexteditor, Toolbar, Link, Table, Image, MarkdownEditor } from '@syncfusion/ej2-vue-richtexteditor';
provide('richtexteditor', [Toolbar, Link, Image, Table, MarkdownEditor]);
</script>
<style>
@import '../node_modules/@syncfusion/ej2-tailwind3-theme/styles/rich-text-editor/index.css';
</style><template>
<ejs-richtexteditor editorMode="Markdown"></ejs-richtexteditor>
</template>
<script>
import { RichTextEditorComponent, Toolbar, Link, Image, Table, MarkdownEditor } from '@syncfusion/ej2-vue-richtexteditor';
export default {
name: "App",
components: {
'ejs-richtexteditor': RichTextEditorComponent
},
data: function () {
return {
};
},
provide: {
richtexteditor: [Toolbar, Link, Image, Table, MarkdownEditor],
},
}
</script>
<style>
@import '../node_modules/@syncfusion/ej2-tailwind3-theme/styles/rich-text-editor/index.css';
</style>Run the project
To run the project, use the following command:
npm run dev