diff --git a/webapp/components/Editor/Editor.vue b/webapp/components/Editor/Editor.vue
index 6ab4a0db6..fa37c64dc 100644
--- a/webapp/components/Editor/Editor.vue
+++ b/webapp/components/Editor/Editor.vue
@@ -343,6 +343,12 @@ li > p {
}
}
+.ProseMirror[contenteditable='false'] {
+ .embed-close-button {
+ display: none;
+ }
+}
+
.embed-container {
position: relative;
padding: 0;
diff --git a/webapp/components/Editor/nodes/Embed.js b/webapp/components/Editor/nodes/Embed.js
index 88dd078b2..9f2c9573f 100644
--- a/webapp/components/Editor/nodes/Embed.js
+++ b/webapp/components/Editor/nodes/Embed.js
@@ -4,8 +4,13 @@ import { compileToFunctions } from 'vue-template-compiler'
import { mapGetters, mapMutations } from 'vuex'
import { allowEmbedIframesMutation } from '~/graphql/User.js'
-const template = `
- {{dataEmbedUrl}}
+const template = `
+ {{dataEmbedUrl}}
@@ -16,7 +21,7 @@ const template = `
{{embedTitle}}
{{embedDescription}}
{{dataEmbedUrl}}
-
+
-
+
`
const compiledTemplate = compileToFunctions(template)
@@ -93,7 +98,7 @@ export default class Embed extends Node {
checkedAlwaysAllowEmbeds: false,
showEmbed: false,
showOverlay: false,
- removeEmbeds: false,
+ showLinkOnly: false,
}),
async created() {
if (this.options) {
@@ -160,9 +165,7 @@ export default class Embed extends Node {
}
},
removeEmbed() {
- // TODO: replace the whole Embed with a proper Link node
- // console.log('I want to be a Link!')
- this.removeEmbeds = true
+ this.showLinkOnly = true
},
async updateEmbedSettings(allowEmbedIframes) {
try {
diff --git a/webapp/components/Editor/nodes/Link.js b/webapp/components/Editor/nodes/Link.js
index 6c015c030..4856566d6 100644
--- a/webapp/components/Editor/nodes/Link.js
+++ b/webapp/components/Editor/nodes/Link.js
@@ -27,6 +27,7 @@ export default class Link extends TipTapLink {
{
...node.attrs,
rel: 'noopener noreferrer nofollow',
+ target: '_blank',
},
0,
],