fix small issue

This commit is contained in:
Víctor Losada Hernández
2026-08-23 21:43:46 +02:00
parent 94ec0f15f6
commit fbf406dccd
+15 -6
View File
@@ -355,14 +355,23 @@ const Editor = forwardRef(
);
}
};
const redo = ()=>codeEditor.current?.redo();
const historySize = ()=>codeEditor.current?.historySize();
const undo = ()=>codeEditor.current?.undo();
const foldCode = ()=>codeEditor.current?.foldAll();
const unfoldCode = ()=>codeEditor.current?.unfoldAll();
const update = ()=>{};
useImperativeHandle(ref, ()=>({
update : ()=>{},
undo : ()=>codeEditor.current?.undo(),
redo : ()=>codeEditor.current?.redo(),
foldCode : ()=>codeEditor.current?.foldAll(),
unfoldCode : ()=>codeEditor.current?.unfoldAll(),
historySize : ()=>codeEditor.current?.historySize(),
update,
undo,
redo,
foldCode,
unfoldCode,
historySize,
}));
return (
<div className='editor' ref={editor}>
<SnippetBar