break two - two

This commit is contained in:
ogerly 2019-09-30 11:38:29 +02:00
parent c69d263039
commit 63d5140420
2 changed files with 7 additions and 2 deletions

View File

@ -19,7 +19,7 @@ const template = `
</ds-text>
<input type="checkbox" v-model="currentUser.allowEmbedIframes" @click.prevent="check($event)">
</ds-section>
<p v-if="!showEmbed" style="cursor: pointer" >
<p v-if="!showEmbed || linkOnly" style="cursor: pointer" >
<img :src="embedImage" alt="dataEmbedUrl" @click.prevent="clickPreview" height="270" width="auto" />
<div v-else v-html="embedHtml" />
<p style="color:black">
@ -91,6 +91,7 @@ export default class Embed extends Node {
embedData: {},
showEmbed: true,
showOverlay: false,
linkOnly: false,
}),
async created() {
if (!this.options) return {}
@ -103,6 +104,11 @@ export default class Embed extends Node {
}),
embedHtml() {
const { html = '' } = this.embedData
if (html === '') {
this.linkOnly = true
} else {
this.linkOnly = false
}
return html
},
embedImage() {

View File

@ -153,4 +153,3 @@ export const checkSlugAvailableQuery = gql`
}
}
`