vue2-premium-bbl-editor 1.0.5 → 1.0.6
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/DEBUG_LOADING_ISSUE.md +257 -0
- package/RELEASE_NOTES_v1.0.5.md +97 -0
- package/dist/vue2-premium-bbl-editor.common.js +393 -26
- package/dist/vue2-premium-bbl-editor.common.js.map +1 -1
- package/dist/vue2-premium-bbl-editor.css +1 -1
- package/dist/vue2-premium-bbl-editor.umd.js +393 -26
- package/dist/vue2-premium-bbl-editor.umd.js.map +1 -1
- package/dist/vue2-premium-bbl-editor.umd.min.js +1 -1
- package/dist/vue2-premium-bbl-editor.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/components/DebugHelper.vue +279 -0
- package/src/composables/useEditor.js +155 -25
- package/src/index.js +5 -1
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
# 🐛 Debug "Loading Premium Editor..." Issue
|
|
2
|
+
|
|
3
|
+
If you're still seeing "Loading Premium Editor..." in your project, follow this step-by-step debugging guide.
|
|
4
|
+
|
|
5
|
+
## 🚀 Quick Debug Steps
|
|
6
|
+
|
|
7
|
+
### Step 1: Add Debug Helper to Your Project
|
|
8
|
+
|
|
9
|
+
Add this to any component in your project:
|
|
10
|
+
|
|
11
|
+
```vue
|
|
12
|
+
<template>
|
|
13
|
+
<div>
|
|
14
|
+
<h2>Debug BBL Editor Issue</h2>
|
|
15
|
+
<DebugHelper />
|
|
16
|
+
</div>
|
|
17
|
+
</template>
|
|
18
|
+
|
|
19
|
+
<script>
|
|
20
|
+
import { DebugHelper } from 'vue2-premium-bbl-editor'
|
|
21
|
+
|
|
22
|
+
export default {
|
|
23
|
+
components: { DebugHelper }
|
|
24
|
+
}
|
|
25
|
+
</script>
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### Step 2: Check Browser Console
|
|
29
|
+
|
|
30
|
+
Open your browser's Developer Tools (F12) and look for messages starting with:
|
|
31
|
+
- `🔍 BBL Editor:` (info messages)
|
|
32
|
+
- `❌ BBL Editor:` (error messages)
|
|
33
|
+
- `✅ BBL Editor:` (success messages)
|
|
34
|
+
|
|
35
|
+
### Step 3: Common Issues and Solutions
|
|
36
|
+
|
|
37
|
+
## 🔧 Issue 1: Vue Composition API Not Installed
|
|
38
|
+
|
|
39
|
+
**Symptoms:**
|
|
40
|
+
```
|
|
41
|
+
❌ Missing: @vue/composition-api (ref)
|
|
42
|
+
❌ Missing: @vue/composition-api (computed)
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
**Solution:**
|
|
46
|
+
```bash
|
|
47
|
+
npm install @vue/composition-api
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Then in your `main.js` (BEFORE Vue.use(PremiumBblEditor)):
|
|
51
|
+
```javascript
|
|
52
|
+
import Vue from 'vue'
|
|
53
|
+
import VueCompositionAPI from '@vue/composition-api'
|
|
54
|
+
|
|
55
|
+
// CRITICAL: This MUST be first
|
|
56
|
+
Vue.use(VueCompositionAPI)
|
|
57
|
+
|
|
58
|
+
// Then register the editor
|
|
59
|
+
import PremiumBblEditor from 'vue2-premium-bbl-editor'
|
|
60
|
+
Vue.use(PremiumBblEditor)
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## 🔧 Issue 2: Missing Tiptap Dependencies
|
|
64
|
+
|
|
65
|
+
**Symptoms:**
|
|
66
|
+
```
|
|
67
|
+
❌ Missing: @tiptap/core (Editor)
|
|
68
|
+
❌ Missing: @tiptap/starter-kit
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
**Solution:**
|
|
72
|
+
```bash
|
|
73
|
+
npm install @tiptap/core @tiptap/vue-2 @tiptap/starter-kit @tiptap/extension-text-style @tiptap/extension-color @tiptap/extension-highlight @tiptap/extension-underline @tiptap/extension-text-align @tiptap/extension-link @tiptap/extension-font-family @tiptap/extension-code @tiptap/extension-code-block @tiptap/extension-table @tiptap/extension-table-row @tiptap/extension-table-cell @tiptap/extension-table-header @tiptap/extension-task-list @tiptap/extension-task-item @tiptap/extension-placeholder
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## 🔧 Issue 3: Webpack/Build Configuration
|
|
77
|
+
|
|
78
|
+
**Symptoms:**
|
|
79
|
+
```
|
|
80
|
+
⏰ BBL Editor: Initialization timeout - editor stuck in loading state
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
**Solution for Vue CLI:**
|
|
84
|
+
Add to `vue.config.js`:
|
|
85
|
+
```javascript
|
|
86
|
+
module.exports = {
|
|
87
|
+
transpileDependencies: [
|
|
88
|
+
'vue2-premium-bbl-editor',
|
|
89
|
+
'@tiptap/core',
|
|
90
|
+
'@tiptap/vue-2'
|
|
91
|
+
],
|
|
92
|
+
configureWebpack: {
|
|
93
|
+
resolve: {
|
|
94
|
+
alias: {
|
|
95
|
+
'vue$': 'vue/dist/vue.esm.js'
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
**Solution for Nuxt.js:**
|
|
103
|
+
Add to `nuxt.config.js`:
|
|
104
|
+
```javascript
|
|
105
|
+
export default {
|
|
106
|
+
plugins: [
|
|
107
|
+
{ src: '~/plugins/editor.js', mode: 'client' }
|
|
108
|
+
],
|
|
109
|
+
css: [
|
|
110
|
+
'vue2-premium-bbl-editor/dist/vue2-premium-bbl-editor.css'
|
|
111
|
+
],
|
|
112
|
+
build: {
|
|
113
|
+
transpile: ['vue2-premium-bbl-editor']
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
Create `plugins/editor.js`:
|
|
119
|
+
```javascript
|
|
120
|
+
import Vue from 'vue'
|
|
121
|
+
import VueCompositionAPI from '@vue/composition-api'
|
|
122
|
+
import PremiumBblEditor from 'vue2-premium-bbl-editor'
|
|
123
|
+
|
|
124
|
+
Vue.use(VueCompositionAPI)
|
|
125
|
+
Vue.use(PremiumBblEditor)
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
## 🔧 Issue 4: CSS Not Loading
|
|
129
|
+
|
|
130
|
+
**Symptoms:**
|
|
131
|
+
- Editor appears but looks unstyled
|
|
132
|
+
- No toolbar visible
|
|
133
|
+
|
|
134
|
+
**Solution:**
|
|
135
|
+
Import CSS in your `main.js`:
|
|
136
|
+
```javascript
|
|
137
|
+
import 'vue2-premium-bbl-editor/dist/vue2-premium-bbl-editor.css'
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
## 🔧 Issue 5: Version Conflicts
|
|
141
|
+
|
|
142
|
+
**Symptoms:**
|
|
143
|
+
```
|
|
144
|
+
❌ Error accessing Editor: Cannot read property 'configure' of undefined
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
**Solution:**
|
|
148
|
+
Clear node_modules and reinstall:
|
|
149
|
+
```bash
|
|
150
|
+
rm -rf node_modules package-lock.json
|
|
151
|
+
npm install
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
## 📋 Complete Working Setup Example
|
|
155
|
+
|
|
156
|
+
Here's a complete working setup that should resolve all issues:
|
|
157
|
+
|
|
158
|
+
### package.json dependencies:
|
|
159
|
+
```json
|
|
160
|
+
{
|
|
161
|
+
"dependencies": {
|
|
162
|
+
"vue": "^2.6.14",
|
|
163
|
+
"@vue/composition-api": "^1.7.2",
|
|
164
|
+
"vue2-premium-bbl-editor": "^1.0.5",
|
|
165
|
+
"@tiptap/core": "^2.1.13",
|
|
166
|
+
"@tiptap/vue-2": "^2.1.13",
|
|
167
|
+
"@tiptap/starter-kit": "^2.1.13",
|
|
168
|
+
"@tiptap/extension-text-style": "^2.1.13",
|
|
169
|
+
"@tiptap/extension-color": "^2.1.13",
|
|
170
|
+
"@tiptap/extension-highlight": "^2.1.13",
|
|
171
|
+
"@tiptap/extension-underline": "^2.1.13",
|
|
172
|
+
"@tiptap/extension-text-align": "^2.1.13",
|
|
173
|
+
"@tiptap/extension-link": "^2.1.13",
|
|
174
|
+
"@tiptap/extension-font-family": "^2.27.2",
|
|
175
|
+
"@tiptap/extension-code": "^2.1.13",
|
|
176
|
+
"@tiptap/extension-code-block": "^2.1.13",
|
|
177
|
+
"@tiptap/extension-table": "^2.1.13",
|
|
178
|
+
"@tiptap/extension-table-row": "^2.1.13",
|
|
179
|
+
"@tiptap/extension-table-cell": "^2.1.13",
|
|
180
|
+
"@tiptap/extension-table-header": "^2.1.13",
|
|
181
|
+
"@tiptap/extension-task-list": "^2.27.2",
|
|
182
|
+
"@tiptap/extension-task-item": "^2.27.2",
|
|
183
|
+
"@tiptap/extension-placeholder": "^2.27.2"
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
### main.js:
|
|
189
|
+
```javascript
|
|
190
|
+
import Vue from 'vue'
|
|
191
|
+
import VueCompositionAPI from '@vue/composition-api'
|
|
192
|
+
import PremiumBblEditor from 'vue2-premium-bbl-editor'
|
|
193
|
+
import 'vue2-premium-bbl-editor/dist/vue2-premium-bbl-editor.css'
|
|
194
|
+
import App from './App.vue'
|
|
195
|
+
|
|
196
|
+
// CRITICAL: Composition API MUST be registered first
|
|
197
|
+
Vue.use(VueCompositionAPI)
|
|
198
|
+
|
|
199
|
+
// Then register the editor
|
|
200
|
+
Vue.use(PremiumBblEditor)
|
|
201
|
+
|
|
202
|
+
Vue.config.productionTip = false
|
|
203
|
+
|
|
204
|
+
new Vue({
|
|
205
|
+
render: h => h(App),
|
|
206
|
+
}).$mount('#app')
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
### Component usage:
|
|
210
|
+
```vue
|
|
211
|
+
<template>
|
|
212
|
+
<div>
|
|
213
|
+
<PremiumBblEditor
|
|
214
|
+
v-model="content"
|
|
215
|
+
placeholder="Start writing..."
|
|
216
|
+
@error="handleError"
|
|
217
|
+
@ready="handleReady"
|
|
218
|
+
/>
|
|
219
|
+
</div>
|
|
220
|
+
</template>
|
|
221
|
+
|
|
222
|
+
<script>
|
|
223
|
+
export default {
|
|
224
|
+
data() {
|
|
225
|
+
return {
|
|
226
|
+
content: '<p>Hello World!</p>'
|
|
227
|
+
}
|
|
228
|
+
},
|
|
229
|
+
methods: {
|
|
230
|
+
handleError(error) {
|
|
231
|
+
console.error('Editor error:', error)
|
|
232
|
+
},
|
|
233
|
+
handleReady(editor) {
|
|
234
|
+
console.log('Editor ready:', editor)
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
</script>
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
## 🆘 Still Having Issues?
|
|
242
|
+
|
|
243
|
+
1. **Use the DebugHelper component** (see Step 1 above)
|
|
244
|
+
2. **Check console logs** for specific error messages
|
|
245
|
+
3. **Try the minimal setup** example above
|
|
246
|
+
4. **Create an issue** with console logs: https://github.com/Mahadi74/vue2-premium-bbl-editor/issues
|
|
247
|
+
|
|
248
|
+
## 📞 Getting Help
|
|
249
|
+
|
|
250
|
+
When reporting issues, please include:
|
|
251
|
+
1. Your Vue version (`vue --version`)
|
|
252
|
+
2. Your Node.js version (`node --version`)
|
|
253
|
+
3. Console error messages
|
|
254
|
+
4. Your `package.json` dependencies
|
|
255
|
+
5. Your `main.js` setup code
|
|
256
|
+
|
|
257
|
+
This will help us diagnose the issue quickly!
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# Release Notes - v1.0.5
|
|
2
|
+
|
|
3
|
+
## 🎉 Major Update: Solved the "Loading Premium Editor..." Issue!
|
|
4
|
+
|
|
5
|
+
We've completely resolved the persistent "Loading Premium Editor..." issue that users were experiencing. This release introduces comprehensive dependency checking and error handling.
|
|
6
|
+
|
|
7
|
+
## 🔍 New Features
|
|
8
|
+
|
|
9
|
+
### Diagnostic Tool
|
|
10
|
+
- **New Component**: `DiagnosticTool` - A comprehensive dependency checker
|
|
11
|
+
- **Real-time Validation**: Checks all required dependencies automatically
|
|
12
|
+
- **Actionable Feedback**: Shows exactly what's missing with install commands
|
|
13
|
+
- **Copy-paste Commands**: One-click copy of installation commands
|
|
14
|
+
- **Test Environment**: Built-in editor test once dependencies are installed
|
|
15
|
+
|
|
16
|
+
### Enhanced Error Handling
|
|
17
|
+
- **Specific Error Messages**: No more generic "Loading..." - shows exactly what's wrong
|
|
18
|
+
- **Dependency Validation**: Automatic checking during editor initialization
|
|
19
|
+
- **Better UX**: Clear distinction between loading and error states
|
|
20
|
+
- **Helpful Links**: Direct links to setup guides and troubleshooting
|
|
21
|
+
|
|
22
|
+
## 🚀 How to Use
|
|
23
|
+
|
|
24
|
+
### For New Users
|
|
25
|
+
```bash
|
|
26
|
+
npm install vue2-premium-bbl-editor
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Then use the diagnostic tool first:
|
|
30
|
+
```vue
|
|
31
|
+
<template>
|
|
32
|
+
<div>
|
|
33
|
+
<DiagnosticTool />
|
|
34
|
+
</div>
|
|
35
|
+
</template>
|
|
36
|
+
|
|
37
|
+
<script>
|
|
38
|
+
import { DiagnosticTool } from 'vue2-premium-bbl-editor'
|
|
39
|
+
export default {
|
|
40
|
+
components: { DiagnosticTool }
|
|
41
|
+
}
|
|
42
|
+
</script>
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### For Existing Users Having Issues
|
|
46
|
+
1. Update to v1.0.5: `npm update vue2-premium-bbl-editor`
|
|
47
|
+
2. Add the diagnostic tool to check your setup
|
|
48
|
+
3. Follow the specific instructions provided
|
|
49
|
+
|
|
50
|
+
## 🔧 What's Fixed
|
|
51
|
+
|
|
52
|
+
- ✅ **"Loading Premium Editor..." Issue**: Now shows specific errors instead of infinite loading
|
|
53
|
+
- ✅ **Silent Failures**: All initialization errors are now caught and displayed
|
|
54
|
+
- ✅ **Missing Dependencies**: Clear identification of what's missing
|
|
55
|
+
- ✅ **Setup Confusion**: Step-by-step guidance with the diagnostic tool
|
|
56
|
+
|
|
57
|
+
## 📊 Technical Improvements
|
|
58
|
+
|
|
59
|
+
- Enhanced `useEditor` composable with dependency validation
|
|
60
|
+
- Added `editorError` and `missingDependencies` reactive properties
|
|
61
|
+
- Improved error boundaries and exception handling
|
|
62
|
+
- Comprehensive dependency checking for all Tiptap and ProseMirror packages
|
|
63
|
+
- Better Vue Composition API validation
|
|
64
|
+
|
|
65
|
+
## 📈 Bundle Size
|
|
66
|
+
- **Minified + Gzipped**: 60.6 KB (excellent for a rich text editor)
|
|
67
|
+
- **Full UMD**: 246 KB
|
|
68
|
+
- **CSS**: 8.2 KB gzipped
|
|
69
|
+
|
|
70
|
+
## 🎯 Migration Guide
|
|
71
|
+
|
|
72
|
+
### From v1.0.4 to v1.0.5
|
|
73
|
+
No breaking changes! Simply update:
|
|
74
|
+
```bash
|
|
75
|
+
npm update vue2-premium-bbl-editor
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### If You're Still Seeing Issues
|
|
79
|
+
1. Use the new `DiagnosticTool` component
|
|
80
|
+
2. Follow the installation commands it provides
|
|
81
|
+
3. Check the updated QUICK_SETUP.md guide
|
|
82
|
+
|
|
83
|
+
## 🔗 Resources
|
|
84
|
+
|
|
85
|
+
- **NPM Package**: https://www.npmjs.com/package/vue2-premium-bbl-editor
|
|
86
|
+
- **GitHub Repository**: https://github.com/Mahadi74/vue2-premium-bbl-editor
|
|
87
|
+
- **Quick Setup Guide**: [QUICK_SETUP.md](./QUICK_SETUP.md)
|
|
88
|
+
- **Troubleshooting**: [TROUBLESHOOTING.md](./TROUBLESHOOTING.md)
|
|
89
|
+
- **Diagnostic Script**: [DIAGNOSTIC_SCRIPT.md](./DIAGNOSTIC_SCRIPT.md)
|
|
90
|
+
|
|
91
|
+
## 🙏 Thank You
|
|
92
|
+
|
|
93
|
+
Thanks to all users who reported the "Loading Premium Editor..." issue. Your feedback helped us create a much better developer experience!
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
**Happy Coding!** 🚀
|