Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

editor: fix embeds in readonly mode are not visible

Abdullah Atta405a8aaad066
diff --git a/packages/editor/src/components/resizer/index.tsx b/packages/editor/src/components/resizer/index.tsx
index 2e562e4d8..007e2df79 100644
--- a/packages/editor/src/components/resizer/index.tsx
+++ b/packages/editor/src/components/resizer/index.tsx
@@ -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
diff --git a/packages/editor/src/extensions/embed/component.tsx b/packages/editor/src/extensions/embed/component.tsx
index 4301916e1..ced770817 100644
--- a/packages/editor/src/extensions/embed/component.tsx
+++ b/packages/editor/src/extensions/embed/component.tsx
@@ -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";