pom-text-editor 0.0.1
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 +189 -0
- package/dist/pom-text-editor.cjs.js +159 -0
- package/dist/pom-text-editor.es.js +1181 -0
- package/dist/pom-text-editor.umd.js +159 -0
- package/dist/vite.svg +1 -0
- package/package.json +32 -0
package/README.md
ADDED
|
@@ -0,0 +1,189 @@
|
|
|
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
|
+
markdown
|
|
39
|
+
Copy code
|
|
40
|
+
# PomTextEditor
|
|
41
|
+
|
|
42
|
+
**PomTextEditor** is a Vue 3 component library that provides a customizable text editor for your Vue applications.
|
|
43
|
+
|
|
44
|
+
## Installation
|
|
45
|
+
|
|
46
|
+
To use **PomTextEditor** in your project, install it via npm or yarn.
|
|
47
|
+
|
|
48
|
+
### Using npm
|
|
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
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
npm install pom-text-editor
|
|
106
|
+
Using yarn
|
|
107
|
+
bash
|
|
108
|
+
Copy code
|
|
109
|
+
yarn add pom-text-editor
|
|
110
|
+
Usage
|
|
111
|
+
Global Registration
|
|
112
|
+
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).
|
|
113
|
+
|
|
114
|
+
main.js
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
js
|
|
118
|
+
Copy code
|
|
119
|
+
import { createApp } from 'vue';
|
|
120
|
+
import App from './App.vue';
|
|
121
|
+
import { Editor } from 'pom-text-editor'; // Correct import path
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
const app = createApp(App);
|
|
125
|
+
app.component('Editor', Editor); // Register the component globally
|
|
126
|
+
app.mount('#app');
|
|
127
|
+
Using in a Component
|
|
128
|
+
Once registered, you can use the Editor component in any of your Vue components.
|
|
129
|
+
|
|
130
|
+
OtherComponent.vue
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
vue
|
|
134
|
+
Copy code
|
|
135
|
+
<template>
|
|
136
|
+
<Editor @change="resultData" />
|
|
137
|
+
</template>
|
|
138
|
+
|
|
139
|
+
<script setup>
|
|
140
|
+
function resultData(val) {
|
|
141
|
+
console.log(val, 'Your HTML content');
|
|
142
|
+
}
|
|
143
|
+
</script>
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
CSS
|
|
147
|
+
The CSS for PomTextEditor is included directly within the JavaScript bundle. You don’t need to import a separate CSS file for the component to work. However, if you want to customize the styles, you can include additional styles in your main application stylesheet or scoped styles in your components.
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
Documentation
|
|
151
|
+
For more detailed information and customization options, please refer to the documentation (Coming soon).
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
Contributing
|
|
155
|
+
We welcome contributions! If you would like to contribute, please follow these steps:
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
Fork the repository.
|
|
159
|
+
Create a feature branch (git checkout -b feature/your-feature).
|
|
160
|
+
Commit your changes (git commit -am 'Add new feature').
|
|
161
|
+
Push to the branch (git push origin feature/your-feature).
|
|
162
|
+
Create a Pull Request.
|
|
163
|
+
License
|
|
164
|
+
This project is licensed under the MIT License - see the LICENSE file for details.
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
Contact
|
|
168
|
+
If you have any questions or need support, please reach out to us at ssengendonazil@gmail.com.
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
Thank you for using PomTextEditor! We hope it enhances your Vue applications.
|
|
172
|
+
|
|
173
|
+
markdown
|
|
174
|
+
Copy code
|
|
175
|
+
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
Please Feel free To Help with bugs
|
|
179
|
+
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
|