mirror of
https://github.com/streetwriters/notesnook.git
synced 2026-02-24 04:00:59 +01:00
editor: fix embeds in readonly mode are not visible
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user