Dir sync filesystem watching

This commit is contained in:
Gregory Schier
2025-01-06 09:24:07 -08:00
parent c72180bb59
commit c2ea2a5fe5
35 changed files with 525 additions and 482 deletions

View File

@@ -11,7 +11,7 @@ import { SplitLayout } from './core/SplitLayout';
import { VStack } from './core/Stacks';
import { Prose } from './Prose';
interface Props extends Pick<EditorProps, 'heightMode' | 'stateKey'> {
interface Props extends Pick<EditorProps, 'heightMode' | 'stateKey' | 'forceUpdateKey'> {
placeholder: string;
className?: string;
defaultValue: string;
@@ -19,15 +19,7 @@ interface Props extends Pick<EditorProps, 'heightMode' | 'stateKey'> {
name: string;
}
export function MarkdownEditor({
className,
defaultValue,
onChange,
name,
placeholder,
heightMode,
stateKey,
}: Props) {
export function MarkdownEditor({ className, defaultValue, onChange, name, ...editorProps }: Props) {
const containerRef = useRef<HTMLDivElement>(null);
const [width] = useSize(containerRef.current);
@@ -54,9 +46,7 @@ export function MarkdownEditor({
language="markdown"
defaultValue={defaultValue}
onChange={onChange}
placeholder={placeholder}
heightMode={heightMode}
stateKey={stateKey}
{...editorProps}
/>
);