tiptap: disable edit mind if is not editable

This commit is contained in:
fantasticit 2022-04-26 19:34:39 +08:00
parent c5462efcb4
commit d7a7527a8f
1 changed files with 4 additions and 0 deletions

View File

@ -111,6 +111,10 @@ export const MindWrapper = ({ editor, node, updateAttributes }) => {
minder.execCommand('theme', theme);
minder.execCommand('zoom', parseInt(zoom));
if (!isEditable) {
minder.disable();
}
$mind.current = minder;
minder.on('contentChange', onChange);
toggleLoading(false);