Enhance HTMLContentRenderer and ToggleTableRow for improved content handling and metadata display

- Updated HTMLContentRenderer to directly utilize HTML from content objects.
- Modified ToggleTableRow to extract and display content metadata, including primary and secondary keywords, tags, categories, and meta descriptions.
- Refactored badge rendering logic for better organization and clarity in the UI.
- Improved content fallback mechanisms in the Content page for better user experience.
This commit is contained in:
IGNY8 VPS (Salman)
2025-11-10 14:10:01 +00:00
parent 8b6e18649c
commit 926ac150fd
3 changed files with 187 additions and 9 deletions

View File

@@ -17,7 +17,15 @@ interface HTMLContentRendererProps {
*/
function formatContentOutline(content: any): string {
if (!content) return '';
// If object contains a `content` field with HTML, use that directly
if (typeof content === 'object' && content !== null && 'content' in content) {
const mainContent = (content as any).content;
if (typeof mainContent === 'string' && mainContent.trim().length > 0) {
return sanitizeHTML(mainContent);
}
}
let html = '<div class="content-outline">';
// Handle introduction section - can be object or string