@kvass/rich-text 1.4.16 → 1.4.17
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 +1 -1
- package/src/Component.vue +6 -6
package/package.json
CHANGED
package/src/Component.vue
CHANGED
|
@@ -258,6 +258,7 @@ export default {
|
|
|
258
258
|
.filter(Boolean)
|
|
259
259
|
.filter(cmd => !appearance || cmd.appearance[appearance])
|
|
260
260
|
},
|
|
261
|
+
|
|
261
262
|
setLink(value) {
|
|
262
263
|
let editor = this.editor.chain().focus()
|
|
263
264
|
switch (this.bubbleState) {
|
|
@@ -267,8 +268,6 @@ export default {
|
|
|
267
268
|
.setLink({
|
|
268
269
|
href: value,
|
|
269
270
|
target: this.isInternalUrl(value) ? '_self' : '_blank',
|
|
270
|
-
//reset rel to prevent nofollow to be set
|
|
271
|
-
rel: '',
|
|
272
271
|
})
|
|
273
272
|
.run()
|
|
274
273
|
else editor.unsetLink().run()
|
|
@@ -280,8 +279,6 @@ export default {
|
|
|
280
279
|
href: value,
|
|
281
280
|
'data-cta': this.bubbleOptions.theme,
|
|
282
281
|
target: this.isInternalUrl(value) ? '_self' : '_blank',
|
|
283
|
-
//reset rel to prevent nofollow to be set
|
|
284
|
-
rel: '',
|
|
285
282
|
})
|
|
286
283
|
.run()
|
|
287
284
|
else editor.unsetCta().run()
|
|
@@ -315,9 +312,12 @@ export default {
|
|
|
315
312
|
],
|
|
316
313
|
content: this.value,
|
|
317
314
|
onUpdate: () => {
|
|
318
|
-
let html = this.editor
|
|
315
|
+
let html = this.editor
|
|
316
|
+
.getHTML()
|
|
317
|
+
.replace(/^<p>\s*<\/p>$/, '')
|
|
318
|
+
//remove rel="nofollow ..."
|
|
319
|
+
.replace(/\s*rel="[^"]*"/g, '')
|
|
319
320
|
|
|
320
|
-
console.log(html)
|
|
321
321
|
this.$emit('input', html)
|
|
322
322
|
},
|
|
323
323
|
onSelectionUpdate: ({ editor }) => {
|