--- title: "Installing the Vue 3 Text Editor" description: "Install @erag/text-editor-vue with npm, pnpm or yarn, meet the Vue 3.5+ peer requirement, and load its stylesheet from main.ts or a script setup SFC." head: - - meta - name: robots content: 'index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1' - - meta - name: googlebot content: 'index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1' - - meta - name: bingbot content: 'index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1' --- # Installing @erag/text-editor-vue in Vue 3 Getting `@erag/text-editor-vue` into a Vue 3 project takes three steps: install the package, import its stylesheet, and import `Editor` into the single-file component where you bind content with `v-model`. New to the package? The [introduction](./introduction.html) covers how it works before you start. ## Install Package ::: code-group ```bash [npm] npm install @erag/text-editor-vue ``` ```bash [pnpm] pnpm add @erag/text-editor-vue ``` ```bash [yarn] yarn add @erag/text-editor-vue ``` ::: ### Peer Dependencies Ensure your project has Vue 3 installed: ```json { "peerDependencies": { "vue": ">=3.5.0 <4" } } ``` The package itself requires Node.js 24 or newer for local development, building, and publishing: ```bash node --version # v24.0.0 or newer ``` Node.js is not used by the editor at browser runtime. You need Node.js 24 only to work on the package source; see the [contributing guide](./contributing.html). --- ## Import Stylesheet The component requires its package stylesheet for toolbar layout, menus, dialogs, mentions, merge tags, image resize handles, and the built-in light/dark theme tokens. Import the CSS stylesheet once in your main application entry point (e.g., `main.ts`, `app.ts`, or layout file): ```ts import '@erag/text-editor-vue/style.css'; ``` The stylesheet follows `prefers-color-scheme: dark` by default with a black editor surface. To control the theme yourself, add `class="dark"`, `data-theme="dark"`, or `data-theme="light"` to the document's `` element. See [CSS customization](/css-customization.html#dark-mode) for palette overrides. Alternatively, you can import it directly inside your Vue component ` ``` A first component only needs a ref bound with `v-model`: ```vue ``` --- ## CSS reset compatibility If your application uses a CSS reset, list markers inside standard lists (`