mirror of
https://gitee.com/dify_ai/dify.git
synced 2024-12-01 18:57:51 +08:00
feat: prompt-editor support undo (#3242)
This commit is contained in:
parent
5c98260cec
commit
39d3fc4742
@ -15,6 +15,7 @@ import { RichTextPlugin } from '@lexical/react/LexicalRichTextPlugin'
|
|||||||
import { ContentEditable } from '@lexical/react/LexicalContentEditable'
|
import { ContentEditable } from '@lexical/react/LexicalContentEditable'
|
||||||
import LexicalErrorBoundary from '@lexical/react/LexicalErrorBoundary'
|
import LexicalErrorBoundary from '@lexical/react/LexicalErrorBoundary'
|
||||||
import { OnChangePlugin } from '@lexical/react/LexicalOnChangePlugin'
|
import { OnChangePlugin } from '@lexical/react/LexicalOnChangePlugin'
|
||||||
|
import { HistoryPlugin } from '@lexical/react/LexicalHistoryPlugin'
|
||||||
// import TreeView from './plugins/tree-view'
|
// import TreeView from './plugins/tree-view'
|
||||||
import Placeholder from './plugins/placeholder'
|
import Placeholder from './plugins/placeholder'
|
||||||
import ComponentPickerBlock from './plugins/component-picker-block'
|
import ComponentPickerBlock from './plugins/component-picker-block'
|
||||||
@ -208,6 +209,7 @@ const PromptEditor: FC<PromptEditorProps> = ({
|
|||||||
<OnChangePlugin onChange={handleEditorChange} />
|
<OnChangePlugin onChange={handleEditorChange} />
|
||||||
<OnBlurBlock onBlur={onBlur} onFocus={onFocus} />
|
<OnBlurBlock onBlur={onBlur} onFocus={onFocus} />
|
||||||
<UpdateBlock instanceId={instanceId} />
|
<UpdateBlock instanceId={instanceId} />
|
||||||
|
<HistoryPlugin />
|
||||||
{/* <TreeView /> */}
|
{/* <TreeView /> */}
|
||||||
</div>
|
</div>
|
||||||
</LexicalComposer>
|
</LexicalComposer>
|
||||||
|
Loading…
Reference in New Issue
Block a user