mirror of
https://github.com/lordmathis/lemma.git
synced 2025-11-07 08:24:27 +00:00
Fix some props issues
This commit is contained in:
@@ -7,11 +7,13 @@ import { defaultKeymap } from '@codemirror/commands';
|
||||
import { oneDark } from '@codemirror/theme-one-dark';
|
||||
import { useSettings } from '../contexts/SettingsContext';
|
||||
|
||||
const Editor = (content, handleContentChange, handleSave, selectedFile) => {
|
||||
const Editor = ({ content, handleContentChange, handleSave, selectedFile }) => {
|
||||
const { settings } = useSettings();
|
||||
const editorRef = useRef();
|
||||
const viewRef = useRef();
|
||||
|
||||
console.log('Editor content:', content);
|
||||
|
||||
useEffect(() => {
|
||||
const handleEditorSave = (view) => {
|
||||
handleSave(selectedFile, view.state.doc.toString());
|
||||
|
||||
Reference in New Issue
Block a user