Skip to content

Commit

Permalink
fix: Make iframes blocks resizable
Browse files Browse the repository at this point in the history
  • Loading branch information
surajshetty3416 committed Mar 23, 2024
1 parent c4122f4 commit 95493c5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/src/components/BlockEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ const showResizer = computed(() => {
!props.editable &&
isBlockSelected.value &&
!blockController.multipleBlocksSelected() &&
!(props.block.isHTML() && !props.block.isSVG())
!(props.block.isHTML() && !props.block.isSVG() && !props.block.isIframe())
);
});
Expand Down
3 changes: 3 additions & 0 deletions frontend/src/utils/block.ts
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,9 @@ class Block implements BlockOptions {
isHTML() {
return this.originalElement === "__raw_html__";
}
isIframe() {
return this.innerHTML?.startsWith("<iframe");
}
makeBlockEditable() {
const store = useStore();
this.selectBlock();
Expand Down

0 comments on commit 95493c5

Please sign in to comment.