@dennismetz/light-editor 0.1.0

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.
Files changed (3) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +44 -0
  3. package/package.json +60 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2022 Hannan Miah
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,44 @@
1
+ # A Light Vue 3 rich text editor
2
+
3
+ @dennismetz/light-editor is built on top of tiptap (a popular rich text editor).
4
+
5
+ ## Project Setup
6
+
7
+ ```sh
8
+ npm install @dennismetz/light-editor
9
+ ```
10
+
11
+ ### Using as a plugin or Component
12
+
13
+ ```
14
+ //main.js
15
+ import { createApp } from "vue";
16
+ import { LightEditor, LightEditorPlugin } from "@dennismetz/light-editor"
17
+
18
+ import App from "./App.vue";
19
+ //styles
20
+ import "@dennismetz/light-editor/dist/style.css"
21
+
22
+ const app = createApp(App);
23
+ //use as a plugin
24
+ app.use(LightEditorPlugin);
25
+ //or use as a global component
26
+ app.component(LightEditor)
27
+ app.mount("#app");
28
+ ```
29
+
30
+
31
+ ```
32
+ //App.vue
33
+ <script setup lang="ts">
34
+ import { ref } from "vue";
35
+ const content = ref("");
36
+ </script>
37
+ <template>
38
+ <div class="about">
39
+ <light-editor v-model="content" />
40
+ <div class="prose lg:prose-xl" v-html="content"></div>
41
+ </div>
42
+ </template>
43
+
44
+ ```
package/package.json ADDED
@@ -0,0 +1,60 @@
1
+ {
2
+ "name": "@dennismetz/light-editor",
3
+ "files": [
4
+ "dist",
5
+ "dist/style.css"
6
+ ],
7
+ "main": "./dist/light-editor.umd.js",
8
+ "module": "./dist/light-editor.es.js",
9
+ "exports": {
10
+ ".": {
11
+ "import": "./dist/light-editor.es.js",
12
+ "require": "./dist/light-editor.umd.js"
13
+ },
14
+ "./dist/style.css": "./dist/style.css"
15
+ },
16
+ "version": "0.1.0",
17
+ "license": "MIT",
18
+ "scripts": {
19
+ "dev": "vite dev --port 3333",
20
+ "build": "vite build",
21
+ "rollup": "rollup -c",
22
+ "preview": "vite preview --port 4173",
23
+ "build-only": "vite build",
24
+ "type-check": "vue-tsc --noEmit",
25
+ "lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore"
26
+ },
27
+ "dependencies": {
28
+ "@tiptap/extension-color": "^2.1.0",
29
+ "@tiptap/extension-image": "^2.1.0",
30
+ "@tiptap/extension-link": "^2.1.0",
31
+ "@tiptap/extension-text-style": "^2.1.0",
32
+ "@tiptap/extension-underline": "^2.1.0",
33
+ "@tiptap/starter-kit": "^2.1.0",
34
+ "@tiptap/vue-3": "^2.1.0",
35
+ "@vueuse/core": "^10.5.0",
36
+ "vue": "^3.2",
37
+ "vue-router": "^4.2.5"
38
+ },
39
+ "devDependencies": {
40
+ "@tailwindcss/forms": "^0.5.7",
41
+ "@tailwindcss/typography": "^0.5.10",
42
+ "@types/node": "^20.10.0",
43
+ "@vitejs/plugin-vue": "^5.2",
44
+ "@vue/eslint-config-prettier": "^8.0.0",
45
+ "@vue/eslint-config-typescript": "^12.0.0",
46
+ "@vue/tsconfig": "^0.4.0",
47
+ "autoprefixer": "^10.4.16",
48
+ "eslint": "^8.57.0",
49
+ "eslint-plugin-vue": "^9.18.0",
50
+ "postcss": "^8.4.31",
51
+ "rollup-plugin-peer-deps-external": "^2.2.4",
52
+ "rollup-plugin-vue": "^6.0.0",
53
+ "tailwindcss": "^3.3",
54
+ "typescript": "^5.8",
55
+ "vite": "^6.0"
56
+ },
57
+ "peerDependencies": {
58
+ "vue": "^3.2"
59
+ }
60
+ }