@@ -621,22 +819,23 @@ const StructuredEditor = ({ onDataChange, initialData = {}, readOnly: readOnlyPr
) : (
{readOnly ? (
- typeof value === 'string' && detectNestedData(value) ? (
-
openNestedEditor(value, path)}
className="px-2 py-1 text-sm text-blue-600 dark:text-blue-400 font-mono break-all cursor-pointer hover:bg-blue-50 dark:hover:bg-blue-900/20 rounded transition-colors"
title={`Click to view nested ${detectNestedData(value).type} data`}
>
- {getDisplayValue(value)}
+ {renderHighlightedText(getDisplayValue(value))}
) : (
- {getDisplayValue(value)}
+ {renderHighlightedText(getDisplayValue(value))}
)
) : (
<>
- {(fieldTypes[path] === 'longtext' || (typeof value === 'string' && value.includes('\n'))) ? (
+ {fieldTypes[path] === "longtext" ||
+ (typeof value === "string" && value.includes("\n")) ? (
{Array.isArray(value) ? (
<>
- {value.map((item, index) =>
- renderValue(item, index.toString(), `${path}.${index}`, path)
+ {value.map((item, index) =>
+ renderValue(item, index.toString(), `${path}.${index}`, path),
)}
{!readOnly && (
) : (
<>
- {Object.entries(value).map(([k, v]) =>
- renderValue(v, k, `${path}.${k}`, path)
+ {Object.entries(value).map(([k, v]) =>
+ renderValue(v, k, `${path}.${k}`, path),
)}
{!readOnly && (