Files
FastGPT/packages/web/components/common/Textarea/PromptEditor/plugins/EditablePlugin.tsx
T
Archer 88ed97bc9d fix: workflow batch repeat run (#6186)
* stop design doc

* remove invalid doc

* perf: auto fit

* fix: icon

* perf: icon

* perf: icon

* perf: icon

* perf: icon

* perf: variable disabled input ui

* fix: workflow batch run

* fix: tsc
2026-01-05 12:05:13 +08:00

13 lines
353 B
TypeScript

import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';
import { useEffect } from 'react';
export default function EditablePlugin({ isDisabled }: { isDisabled: boolean }) {
const [editor] = useLexicalComposerContext();
useEffect(() => {
editor.setEditable(!isDisabled);
}, [editor, isDisabled]);
return null;
}