File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ Minimal examples for integrating SuperDoc into your project. Each example loads
66| ---------| -------------| ------|
77| [ react] ( ./react ) | React + TypeScript with Vite | [ Guide] ( https://docs.superdoc.dev/getting-started/frameworks/react ) |
88| [ vue] ( ./vue ) | Vue 3 + TypeScript with Vite | [ Guide] ( https://docs.superdoc.dev/getting-started/frameworks/vue ) |
9+ | [ nuxt] ( ./nuxt ) | Nuxt 4 + TypeScript with Vite | [ Guide] ( https://docs.superdoc.dev/getting-started/frameworks/nuxt ) |
910| [ vanilla] ( ./vanilla ) | Plain JavaScript with Vite | [ Guide] ( https://docs.superdoc.dev/getting-started/installation ) |
1011| [ cdn] ( ./cdn ) | Zero build tools — just an HTML file | [ Guide] ( https://docs.superdoc.dev/getting-started/installation ) |
1112
Original file line number Diff line number Diff line change 1+ # Nuxt dev/build outputs
2+ .output
3+ .data
4+ .nuxt
5+ .nitro
6+ .cache
7+ dist
8+
9+ # Node dependencies
10+ node_modules
11+
12+ # Logs
13+ logs
14+ * .log
15+
16+ # Misc
17+ .DS_Store
18+ .fleet
19+ .idea
20+
21+ # Local env files
22+ .env
23+ .env. *
24+ ! .env.example
Original file line number Diff line number Diff line change 1+ # SuperDoc — Nuxt
2+
3+ Minimal Nuxt 4 + TypeScript example.
4+
5+ ## Run
6+
7+ ``` bash
8+ npm install
9+ npm run dev
10+ ```
11+
12+ ## Learn more
13+
14+ - [ Nuxt Integration Guide] ( https://docs.superdoc.dev/getting-started/frameworks/nuxt )
15+ - [ Configuration Reference] ( https://docs.superdoc.dev/core/superdoc/configuration )
Original file line number Diff line number Diff line change 1+ <script setup lang="ts">
2+ import { SuperDoc } from ' superdoc'
3+
4+ const editor = ref <HTMLDivElement | null >(null );
5+ const file = ref <File | null >(null )
6+
7+ let superdoc: SuperDoc | null = null ;
8+
9+ const handleFile = (e : Event ) => {
10+ const input = e .target as HTMLInputElement
11+ if (input .files ?.[0 ]) file .value = input .files [0 ]
12+ }
13+
14+ const initEditor = () => {
15+ if (! editor .value || ! file .value ) return
16+ superdoc ?.destroy ()
17+ superdoc = new SuperDoc ({
18+ selector: editor .value ,
19+ documentMode: ' editing' ,
20+ document: file .value ,
21+ })
22+ }
23+
24+ watch (file , initEditor )
25+ onBeforeUnmount (() => superdoc ?.destroy ())
26+ </script >
27+
28+ <template >
29+ <div >
30+ <div style =" padding : 1rem ; background : #f5f5f5 " >
31+ <input type =" file" accept =" .docx" @change =" handleFile" />
32+ </div >
33+ <ClientOnly >
34+ <div ref =" editor" style =" height : calc (100vh - 60px ); overflow : auto ;" />
35+ </ClientOnly >
36+ </div >
37+ </template >
Original file line number Diff line number Diff line change 1+ // https://nuxt.com/docs/api/configuration/nuxt-config
2+ export default defineNuxtConfig ( {
3+ ssr : false ,
4+ css : [ 'superdoc/style.css' ] ,
5+ compatibilityDate : '2025-07-15' ,
6+ } )
Original file line number Diff line number Diff line change 1+ {
2+ "name" : " superdoc-nuxt-example" ,
3+ "type" : " module" ,
4+ "private" : true ,
5+ "scripts" : {
6+ "dev" : " nuxt dev" ,
7+ "postinstall" : " nuxt prepare"
8+ },
9+ "dependencies" : {
10+ "nuxt" : " ^4.3.1" ,
11+ "superdoc" : " latest" ,
12+ "vue" : " ^3.5.28"
13+ }
14+ }
Original file line number Diff line number Diff line change 1+ {
2+ // https://nuxt.com/docs/guide/concepts/typescript
3+ "files" : [],
4+ "references" : [
5+ {
6+ "path" : " ./.nuxt/tsconfig.app.json"
7+ },
8+ {
9+ "path" : " ./.nuxt/tsconfig.server.json"
10+ },
11+ {
12+ "path" : " ./.nuxt/tsconfig.shared.json"
13+ },
14+ {
15+ "path" : " ./.nuxt/tsconfig.node.json"
16+ }
17+ ]
18+ }
You can’t perform that action at this time.
0 commit comments