editor: fix embeds in readonly mode are not visible

This commit is contained in:
Abdullah Atta
2023-08-04 19:33:57 +05:00
parent 7edd45419e
commit 405a8aaad0
2 changed files with 2 additions and 2 deletions

View File

@@ -47,7 +47,7 @@ export function Resizer(props: PropsWithChildren<ResizerProps>) {
} = props;
if (!editor.isEditable)
return <Flex sx={{ position: "relative" }}>{children}</Flex>;
return <Flex sx={{ position: "relative", width }}>{children}</Flex>;
return (
<Resizable

View File

@@ -35,7 +35,7 @@ export function EmbedComponent(
const { editor, updateAttributes, selected, node } = props;
const [isLoading, setIsLoading] = useState(true);
const embedRef = useRef<HTMLIFrameElement>(null);
const { src, width, height, textDirection } = node.attrs;
const { src, width, textDirection } = node.attrs;
let align = node.attrs.align;
if (!align) align = textDirection ? "right" : "left";