mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-19 23:31:21 +02:00
Preserve Editor State (#151)
This commit is contained in:
@@ -11,7 +11,7 @@ import { SplitLayout } from './core/SplitLayout';
|
||||
import { VStack } from './core/Stacks';
|
||||
import { Prose } from './Prose';
|
||||
|
||||
interface Props extends Pick<EditorProps, 'heightMode'> {
|
||||
interface Props extends Pick<EditorProps, 'heightMode' | 'stateKey'> {
|
||||
placeholder: string;
|
||||
className?: string;
|
||||
defaultValue: string;
|
||||
@@ -26,6 +26,7 @@ export function MarkdownEditor({
|
||||
name,
|
||||
placeholder,
|
||||
heightMode,
|
||||
stateKey,
|
||||
}: Props) {
|
||||
const containerRef = useRef<HTMLDivElement>(null);
|
||||
|
||||
@@ -55,6 +56,7 @@ export function MarkdownEditor({
|
||||
onChange={onChange}
|
||||
placeholder={placeholder}
|
||||
heightMode={heightMode}
|
||||
stateKey={stateKey}
|
||||
/>
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user