diff --git a/lightrag_webui/src/components/graph/PropertiesView.tsx b/lightrag_webui/src/components/graph/PropertiesView.tsx index 0eaad42e..f560c8fa 100644 --- a/lightrag_webui/src/components/graph/PropertiesView.tsx +++ b/lightrag_webui/src/components/graph/PropertiesView.tsx @@ -206,6 +206,18 @@ const PropertyRow = ({ return translation === translationKey ? name : translation } + // Utility function to convert to newlines + const formatValueWithSeparators = (value: any): string => { + if (typeof value === 'string') { + return value.replace(//g, ';\n') + } + return typeof value === 'string' ? value : JSON.stringify(value, null, 2) + } + + // Format the value to convert to newlines + const formattedValue = formatValueWithSeparators(value) + const formattedTooltip = tooltip || formatValueWithSeparators(value) + // Use EditablePropertyRow for editable fields (description, entity_id and keywords) if (isEditable && (name === 'description' || name === 'entity_id' || name === 'keywords')) { return ( @@ -233,8 +245,8 @@ const PropertyRow = ({