Add preview mode

This commit is contained in:
2024-09-26 21:47:23 +02:00
parent 79bd172f70
commit 27be41ba62
10 changed files with 2115 additions and 112 deletions

View File

@@ -20,6 +20,7 @@ const Editor = ({ content, onChange, onSave, filePath }) => {
extensions: [
basicSetup,
markdown(),
EditorView.lineWrapping,
keymap.of(defaultKeymap),
keymap.of([{
key: "Ctrl-s",
@@ -54,7 +55,7 @@ const Editor = ({ content, onChange, onSave, filePath }) => {
}
}, [content]);
return <div ref={editorRef} />;
return <div ref={editorRef} className="editor-container" />;
};
export default Editor;