Skip to content

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

fix: disable resizer for readonly editor

thecodrr85228115b1e1
diff --git a/packages/editor/src/components/resizer/index.tsx b/packages/editor/src/components/resizer/index.tsx
index 7e1f17bd4..e156f70ad 100644
--- a/packages/editor/src/components/resizer/index.tsx
+++ b/packages/editor/src/components/resizer/index.tsx
@@ -13,6 +13,8 @@ type ResizerProps = {
export function Resizer(props: PropsWithChildren<ResizerProps>) {
const { editor, selected, onResize, width, height, children } = props;
+ if (!editor.isEditable) return <>{children}</>;
+
return (
<Resizable
enable={{
@@ -21,7 +23,7 @@ export function Resizer(props: PropsWithChildren<ResizerProps>) {
right: false,
top: false,
bottomLeft: false,
- bottomRight: editor.isEditable && selected,
+ bottomRight: selected,
topLeft: false,
topRight: false,
}}