fix: Fixes issue where pasting in a new Super note would not save it
This commit is contained in:
@@ -58,9 +58,7 @@ export const BlocksEditor: FunctionComponent<BlocksEditorProps> = ({
|
|||||||
handleEditorChange(editorState, previewLength, onChange)
|
handleEditorChange(editorState, previewLength, onChange)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// Ignoring 'ignoreFirstChange' and 'previewLength'
|
[ignoreFirstChange, didIgnoreFirstChange, previewLength, onChange],
|
||||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
||||||
[onChange, didIgnoreFirstChange],
|
|
||||||
)
|
)
|
||||||
|
|
||||||
const [floatingAnchorElem, setFloatingAnchorElem] = useState<HTMLDivElement | null>(null)
|
const [floatingAnchorElem, setFloatingAnchorElem] = useState<HTMLDivElement | null>(null)
|
||||||
|
|||||||
@@ -177,7 +177,6 @@ export const SuperEditor: FunctionComponent<Props> = ({
|
|||||||
>
|
>
|
||||||
<BlocksEditor
|
<BlocksEditor
|
||||||
onChange={handleChange}
|
onChange={handleChange}
|
||||||
ignoreFirstChange={controller.isTemplateNote}
|
|
||||||
className={classNames(
|
className={classNames(
|
||||||
'blocks-editor relative h-full resize-none px-4 py-4 focus:shadow-none focus:outline-none',
|
'blocks-editor relative h-full resize-none px-4 py-4 focus:shadow-none focus:outline-none',
|
||||||
lineHeight && `leading-${lineHeight.toLowerCase()}`,
|
lineHeight && `leading-${lineHeight.toLowerCase()}`,
|
||||||
|
|||||||
Reference in New Issue
Block a user