@kvass/rich-text 1.4.2 → 1.4.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.
- package/package.json +9 -2
- package/src/Component.vue +12 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kvass/rich-text",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.4",
|
|
4
4
|
"description": "rich text component for kvass",
|
|
5
5
|
"main": "src/Component.vue",
|
|
6
6
|
"scripts": {
|
|
@@ -38,6 +38,13 @@
|
|
|
38
38
|
"@tiptap/extension-image": "^2.0.0-beta.14",
|
|
39
39
|
"@tiptap/extension-link": "^2.0.0-beta.18",
|
|
40
40
|
"@tiptap/starter-kit": "^2.0.0-beta.81",
|
|
41
|
-
"@tiptap/vue-2": "^2.0.0-beta.39"
|
|
41
|
+
"@tiptap/vue-2": "^2.0.0-beta.39",
|
|
42
|
+
"prosemirror-commands": "^1.5.0",
|
|
43
|
+
"prosemirror-keymap": "^1.2.0",
|
|
44
|
+
"prosemirror-model": "^1.18.3",
|
|
45
|
+
"prosemirror-schema-list": "^1.2.2",
|
|
46
|
+
"prosemirror-state": "^1.4.2",
|
|
47
|
+
"prosemirror-transform": "^1.7.0",
|
|
48
|
+
"prosemirror-view": "^1.29.1"
|
|
42
49
|
}
|
|
43
50
|
}
|
package/src/Component.vue
CHANGED
|
@@ -219,11 +219,21 @@ export default {
|
|
|
219
219
|
let editor = this.editor.chain().focus()
|
|
220
220
|
switch (this.bubbleState) {
|
|
221
221
|
case 'link':
|
|
222
|
-
if (value)
|
|
222
|
+
if (value)
|
|
223
|
+
editor
|
|
224
|
+
.setLink({ href: value, target: value.startsWith('/') ? '_self' : '_blank' })
|
|
225
|
+
.run()
|
|
223
226
|
else editor.unsetLink().run()
|
|
224
227
|
break
|
|
225
228
|
case 'cta':
|
|
226
|
-
if (value)
|
|
229
|
+
if (value)
|
|
230
|
+
editor
|
|
231
|
+
.setCta({
|
|
232
|
+
href: value,
|
|
233
|
+
'data-cta': this.bubbleOptions.theme,
|
|
234
|
+
target: value.startsWith('/') ? '_self' : '_blank',
|
|
235
|
+
})
|
|
236
|
+
.run()
|
|
227
237
|
else editor.unsetCta().run()
|
|
228
238
|
break
|
|
229
239
|
}
|