Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

fix: prompt editor linebreak (#3036)

zxhlyh218f591a5df8
diff --git a/web/app/components/base/prompt-editor/index.tsx b/web/app/components/base/prompt-editor/index.tsx
index c0ff99e4d89..90bc35ac9ea 100644
--- a/web/app/components/base/prompt-editor/index.tsx
+++ b/web/app/components/base/prompt-editor/index.tsx
@@ -9,6 +9,7 @@ import {
$getRoot,
TextNode,
} from 'lexical'
+import { CodeNode } from '@lexical/code'
import { LexicalComposer } from '@lexical/react/LexicalComposer'
import { RichTextPlugin } from '@lexical/react/LexicalRichTextPlugin'
import { ContentEditable } from '@lexical/react/LexicalContentEditable'
@@ -118,6 +119,7 @@ const PromptEditor: FC<PromptEditorProps> = ({
const initialConfig = {
namespace: 'prompt-editor',
nodes: [
+ CodeNode,
CustomTextNode,
{
replace: TextNode,