fresh-web-editor 0.0.0-stage → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,18 @@
1
+ {
2
+ "name": "fresh-editor-react-example",
3
+ "private": true,
4
+ "type": "module",
5
+ "scripts": {
6
+ "predev": "npm --prefix ../.. run build",
7
+ "dev": "vite"
8
+ },
9
+ "dependencies": {
10
+ "fresh-web-editor": "file:../..",
11
+ "react": "^19.0.0",
12
+ "react-dom": "^19.0.0"
13
+ },
14
+ "devDependencies": {
15
+ "@vitejs/plugin-react": "^4.0.0",
16
+ "vite": "^5.0.0"
17
+ }
18
+ }
@@ -0,0 +1,7 @@
1
+ import { defineConfig } from 'vite';
2
+ import react from '@vitejs/plugin-react';
3
+
4
+ export default defineConfig({
5
+ plugins: [react()],
6
+ resolve: { preserveSymlinks: true },
7
+ });
@@ -0,0 +1,20 @@
1
+ <script setup>
2
+ import { ref } from 'vue';
3
+ import { Editor } from 'fresh-web-editor/vue';
4
+
5
+ const html = ref('<p>문서를 편집해 보세요.</p>');
6
+ const savedHtml = ref(null);
7
+
8
+ function saveDocument() {
9
+ savedHtml.value = html.value;
10
+ }
11
+ </script>
12
+
13
+ <template>
14
+ <section>
15
+ <Editor v-model="html" />
16
+ <button type="button" @click="saveDocument">저장하기</button>
17
+ <h2>저장한 HTML</h2>
18
+ <pre style="white-space: pre-wrap; overflow-wrap: anywhere"><code>{{ savedHtml ?? '저장하면 HTML 코드가 표시됩니다.' }}</code></pre>
19
+ </section>
20
+ </template>
@@ -0,0 +1,12 @@
1
+ <!doctype html>
2
+ <html lang="ko">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
6
+ <title>Fresh Web Editor · Vue 예제</title>
7
+ </head>
8
+ <body>
9
+ <div id="app"></div>
10
+ <script type="module" src="/main.js"></script>
11
+ </body>
12
+ </html>
@@ -0,0 +1,4 @@
1
+ import { createApp } from 'vue';
2
+ import DocumentForm from './DocumentForm.vue';
3
+
4
+ createApp(DocumentForm).mount('#app');