mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-07-24 09:26:48 +08:00
Feat: Enable the wiki's Markdown editor to navigate to a new Markdown file when a link is clicked. (#17019)
This commit is contained in:
@@ -7,12 +7,14 @@ interface MarkdownEditorProps {
|
||||
content: string;
|
||||
onChange?: (content: string) => void;
|
||||
readOnly?: boolean;
|
||||
onWikiLinkClick?: (pageType: 'concept' | 'entity', slug: string) => void;
|
||||
}
|
||||
|
||||
export default function MarkdownEditor({
|
||||
content,
|
||||
onChange,
|
||||
readOnly = false,
|
||||
onWikiLinkClick,
|
||||
}: MarkdownEditorProps) {
|
||||
const [showSource, setShowSource] = useState(false);
|
||||
const [rawContent, setRawContent] = useState(content);
|
||||
@@ -61,6 +63,7 @@ export default function MarkdownEditor({
|
||||
placeholder={readOnly ? '' : 'Start writing...'}
|
||||
onToggleSource={toggleSource}
|
||||
showSource={showSource}
|
||||
onWikiLinkClick={onWikiLinkClick}
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
|
||||
Reference in New Issue
Block a user