mirror of
https://github.com/langgenius/dify.git
synced 2026-05-04 17:38:04 +08:00
feat: prompt editor support line num
This commit is contained in:
@ -1,23 +1,21 @@
|
||||
import type { FC } from 'react'
|
||||
import * as React from 'react'
|
||||
import PromptEditor from '@/app/components/workflow/nodes/_base/components/prompt/editor'
|
||||
import PromptEditor from '@/app/components/base/prompt-editor'
|
||||
|
||||
type MarkdownFileEditorProps = {
|
||||
title: string
|
||||
value: string
|
||||
onChange: (value: string) => void
|
||||
}
|
||||
|
||||
const MarkdownFileEditor: FC<MarkdownFileEditorProps> = ({ title, value, onChange }) => {
|
||||
const MarkdownFileEditor: FC<MarkdownFileEditorProps> = ({ value, onChange }) => {
|
||||
return (
|
||||
<div className="h-full w-full">
|
||||
<div className="h-full w-full bg-components-panel-bg">
|
||||
<PromptEditor
|
||||
title={title}
|
||||
value={value}
|
||||
onChange={onChange}
|
||||
showLineNumbers
|
||||
className="h-full"
|
||||
editorContainerClassName="h-full"
|
||||
containerBackgroundClassName="bg-components-panel-bg"
|
||||
wrapperClassName="h-full"
|
||||
/>
|
||||
</div>
|
||||
)
|
||||
|
||||
@ -211,7 +211,6 @@ const SkillDocEditor: FC = () => {
|
||||
<div className="h-full w-full overflow-hidden bg-components-panel-bg">
|
||||
{isMarkdown && (
|
||||
<MarkdownFileEditor
|
||||
title={fileName}
|
||||
value={currentContent}
|
||||
onChange={handleEditorChange}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user