feat: add srcdoc property to IFrameBlock element #454
This commit is contained in:
@@ -20,7 +20,11 @@ export class IFrameBlock {
|
||||
iframe.style.border = 'none'
|
||||
iframe.style.width = '100%'
|
||||
iframe.style.height = '100%'
|
||||
iframe.src = block.iframeBlock?.src || ''
|
||||
if (block.iframeBlock?.src) {
|
||||
iframe.src = block.iframeBlock.src
|
||||
} else if (block.iframeBlock?.srcdoc) {
|
||||
iframe.srcdoc = block.iframeBlock.srcdoc
|
||||
}
|
||||
blockItemContainer.append(iframe)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import { BlockType } from '../dataset/enum/Block'
|
||||
|
||||
export interface IIFrameBlock {
|
||||
src: string
|
||||
src?: string
|
||||
srcdoc?: string
|
||||
}
|
||||
|
||||
export interface IVideoBlock {
|
||||
|
||||
Reference in New Issue
Block a user