mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-17 09:05:55 +08:00
fix: prompt editor linebreak (#3036)
This commit is contained in:
parent
17af0de7b6
commit
218f591a5d
@ -9,6 +9,7 @@ import {
|
|||||||
$getRoot,
|
$getRoot,
|
||||||
TextNode,
|
TextNode,
|
||||||
} from 'lexical'
|
} from 'lexical'
|
||||||
|
import { CodeNode } from '@lexical/code'
|
||||||
import { LexicalComposer } from '@lexical/react/LexicalComposer'
|
import { LexicalComposer } from '@lexical/react/LexicalComposer'
|
||||||
import { RichTextPlugin } from '@lexical/react/LexicalRichTextPlugin'
|
import { RichTextPlugin } from '@lexical/react/LexicalRichTextPlugin'
|
||||||
import { ContentEditable } from '@lexical/react/LexicalContentEditable'
|
import { ContentEditable } from '@lexical/react/LexicalContentEditable'
|
||||||
@ -118,6 +119,7 @@ const PromptEditor: FC<PromptEditorProps> = ({
|
|||||||
const initialConfig = {
|
const initialConfig = {
|
||||||
namespace: 'prompt-editor',
|
namespace: 'prompt-editor',
|
||||||
nodes: [
|
nodes: [
|
||||||
|
CodeNode,
|
||||||
CustomTextNode,
|
CustomTextNode,
|
||||||
{
|
{
|
||||||
replace: TextNode,
|
replace: TextNode,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user