import { ContentRenderer } from '@/components/content/ContentRenderer'; import { Section } from '@/components/content/Section'; import { Container } from '@/components/ui/Container'; // Test content with various WordPress shortcodes and images const testContent = `

WordPress Shortcode Test

This page demonstrates the enhanced ContentRenderer handling various WordPress shortcodes and image formats.

Left Column

This column uses vc_col-md-6 shortcode converted to Tailwind classes.

Contact Button

Right Column

Content in the right column with proper spacing and styling.

Medium Voltage Cable

Background Image Section

This section has a background image from WordPress media library.

Image Gallery

Multiple images with different alignments:

Low Voltage Cable NA2XSF2X Cable

Images should display correctly with proper Next.js Image optimization and alignment.

Dark Section with Buttons

Various button styles should work correctly:

Primary Button Secondary Button Outline Button Large Button

Typography Test

Regular paragraph text with bold text, italic text, and external links.

  • List item 1
  • List item 2
  • List item 3

This is a blockquote with proper styling.

Column 1

One-third width column.

Column 2

One-third width column.

Column 3

One-third width column.

Direct Image References

Images referenced by ID should be converted to Next.js Image components:

Medium Voltage Cables
`; const testContentWithShortcodes = ` [vc_row bg_color="#f8f9fa" top_padding="4%" bottom_padding="4%"] [vc_column width="12"] [vc_column_text]

Raw Shortcode Test

This content uses raw WordPress shortcodes that should be processed by html-compat.ts

[/vc_column_text] [/vc_column] [/vc_row] [vc_row] [vc_column width="6"] [vc_column_text]

Left Side

Content with [vc_btn color="primary" title="Click Here" link="#"] embedded.

[/vc_column_text] [/vc_column] [vc_column width="6"] [vc_column_text]

Right Side

Another column with [vc_single_image src="6521" align="right"] embedded.

[/vc_column_text] [/vc_column] [/vc_row] [vc_row bg_image="45528" top_padding="15%" bottom_padding="15%" color_overlay="#000000" overlay_strength="0.7"] [vc_column] [vc_column_text text_color="light" text_align="center"]

Background Image with Overlay

This should show an image with dark overlay and white text.

[/vc_column_text] [/vc_column] [/vc_row] [vc_row enable_gradient="true" gradient_direction="left_to_right"] [vc_column] [vc_column_text text_align="center"]

Gradient Background

This row should have a gradient background.

[/vc_column_text] [/vc_column] [/vc_row] `; export default function ComponentsDemoPage() { return (

ContentRenderer Test Page

Testing WordPress shortcode conversion and image handling

Processed HTML Content

Raw Shortcode Content

What This Tests:

  • ✅ [vc_row] → flex containers with background support
  • ✅ [vc_column] → responsive width classes
  • ✅ [vc_column_text] → prose styling
  • ✅ [vc_btn] → styled buttons
  • ✅ [vc_single_image] → Next.js Image components
  • ✅ Background images from WordPress IDs
  • ✅ Color overlays and gradients
  • ✅ Image alignment and sizing
  • ✅ URL replacement from data layer
  • ✅ Inline styles and attributes
); }