pom-text-editor 0.0.1 → 0.0.2
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.
- package/README.md +9 -100
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -1,40 +1,4 @@
|
|
|
1
1
|
|
|
2
|
-
# PomTextEditor
|
|
3
|
-
|
|
4
|
-
**PomTextEditor** is a Vue 3 component library that provides a customizable text editor for your Vue applications.
|
|
5
|
-
|
|
6
|
-
## Installation
|
|
7
|
-
|
|
8
|
-
To use **PomTextEditor** in your project, install it via npm or yarn.
|
|
9
|
-
|
|
10
|
-
### Using npm
|
|
11
|
-
|
|
12
|
-
```bash
|
|
13
|
-
npm install pom-text-editor
|
|
14
|
-
yarn add pom-text-editor
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
### Usage
|
|
19
|
-
Global Registration
|
|
20
|
-
To use the Editor component globally in your Vue 3 application, register it in your main application file (e.g., main.js or main.ts).
|
|
21
|
-
|
|
22
|
-
main.js
|
|
23
|
-
|
|
24
|
-
js
|
|
25
|
-
Copy code
|
|
26
|
-
import { createApp } from 'vue';
|
|
27
|
-
import App from './App.vue';
|
|
28
|
-
import { Editor } from 'pom-text-editor'; // Correct import path
|
|
29
|
-
|
|
30
|
-
const app = createApp(App);
|
|
31
|
-
app.component('Editor', Editor); // Register the component globally
|
|
32
|
-
app.mount('#app');
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
Certainly! Here's an improved version of your README.md, with a cleaner structure and corrected details:
|
|
37
|
-
|
|
38
2
|
markdown
|
|
39
3
|
Copy code
|
|
40
4
|
# PomTextEditor
|
|
@@ -45,61 +9,7 @@ Copy code
|
|
|
45
9
|
|
|
46
10
|
To use **PomTextEditor** in your project, install it via npm or yarn.
|
|
47
11
|
|
|
48
|
-
### Using
|
|
49
|
-
|
|
50
|
-
```bash
|
|
51
|
-
npm install pom-text-editor
|
|
52
|
-
Using yarn
|
|
53
|
-
bash
|
|
54
|
-
Copy code
|
|
55
|
-
yarn add pom-text-editor
|
|
56
|
-
Usage
|
|
57
|
-
Global Registration
|
|
58
|
-
To use the Editor component globally in your Vue 3 application, register it in your main application file (e.g., main.js or main.ts).
|
|
59
|
-
|
|
60
|
-
main.js
|
|
61
|
-
|
|
62
|
-
js
|
|
63
|
-
Copy code
|
|
64
|
-
import { createApp } from 'vue';
|
|
65
|
-
import App from './App.vue';
|
|
66
|
-
import { Editor } from 'pom-text-editor'; // Correct import path
|
|
67
|
-
|
|
68
|
-
const app = createApp(App);
|
|
69
|
-
app.component('Editor', Editor); // Register the component globally
|
|
70
|
-
app.mount('#app');
|
|
71
|
-
Using in a Component
|
|
72
|
-
Once registered, you can use the Editor component in any of your Vue components.
|
|
73
|
-
|
|
74
|
-
OtherComponent.vue
|
|
75
|
-
|
|
76
|
-
vue
|
|
77
|
-
Copy code
|
|
78
|
-
<template>
|
|
79
|
-
<Editor @change="resultData" />
|
|
80
|
-
</template>
|
|
81
|
-
|
|
82
|
-
<script setup>
|
|
83
|
-
function resultData(val) {
|
|
84
|
-
console.log(val, 'Your HTML content');
|
|
85
|
-
}
|
|
86
|
-
</script>
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
Certainly! Here's an improved version of your README.md, with a cleaner structure and corrected details:
|
|
91
|
-
|
|
92
|
-
markdown
|
|
93
|
-
Copy code
|
|
94
|
-
# PomTextEditor
|
|
95
|
-
|
|
96
|
-
**PomTextEditor** is a Vue 3 component library that provides a customizable text editor for your Vue applications.
|
|
97
|
-
|
|
98
|
-
## Installation
|
|
99
|
-
|
|
100
|
-
To use **PomTextEditor** in your project, install it via npm or yarn.
|
|
101
|
-
|
|
102
|
-
### Using npm
|
|
12
|
+
### Using np
|
|
103
13
|
|
|
104
14
|
```bash
|
|
105
15
|
npm install pom-text-editor
|
|
@@ -127,9 +37,9 @@ app.mount('#app');
|
|
|
127
37
|
Using in a Component
|
|
128
38
|
Once registered, you can use the Editor component in any of your Vue components.
|
|
129
39
|
|
|
130
|
-
OtherComponent.vue
|
|
131
|
-
```
|
|
132
40
|
|
|
41
|
+
```
|
|
42
|
+
OtherComponent.vue
|
|
133
43
|
vue
|
|
134
44
|
Copy code
|
|
135
45
|
<template>
|
|
@@ -142,19 +52,21 @@ function resultData(val) {
|
|
|
142
52
|
}
|
|
143
53
|
</script>
|
|
144
54
|
```
|
|
145
|
-
|
|
146
55
|
CSS
|
|
147
|
-
The CSS for PomTextEditor is included directly within the JavaScript bundle.
|
|
56
|
+
The CSS for PomTextEditor is included directly within the JavaScript bundle.
|
|
57
|
+
You don’t need to import a separate CSS file for the component to work. However,
|
|
58
|
+
if you want to customize the styles, you can include additional styles in your main
|
|
59
|
+
application stylesheet or scoped styles in your components.
|
|
148
60
|
```
|
|
149
61
|
|
|
150
62
|
Documentation
|
|
151
63
|
For more detailed information and customization options, please refer to the documentation (Coming soon).
|
|
152
|
-
```
|
|
153
64
|
|
|
65
|
+
```
|
|
154
66
|
Contributing
|
|
155
67
|
We welcome contributions! If you would like to contribute, please follow these steps:
|
|
156
|
-
```
|
|
157
68
|
|
|
69
|
+
```
|
|
158
70
|
Fork the repository.
|
|
159
71
|
Create a feature branch (git checkout -b feature/your-feature).
|
|
160
72
|
Commit your changes (git commit -am 'Add new feature').
|
|
@@ -170,9 +82,6 @@ If you have any questions or need support, please reach out to us at ssengendona
|
|
|
170
82
|
|
|
171
83
|
Thank you for using PomTextEditor! We hope it enhances your Vue applications.
|
|
172
84
|
|
|
173
|
-
markdown
|
|
174
|
-
Copy code
|
|
175
|
-
|
|
176
85
|
```
|
|
177
86
|
|
|
178
87
|
Please Feel free To Help with bugs
|