pceditor / pce-php
Render Page Composer editor JSON to HTML using PHP/HTML templates, with CSS media-query compilation and caching.
v1.0.0
2026-08-23 06:41 UTC
Requires
- php: >=8.1
Requires (Dev)
- phpunit/phpunit: ^10.5
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-10-20 12:14:38 UTC
README
Render Page Composer editor JSON to HTML with your own PHP/HTML templates, plus CSS media-query compilation and caching. Framework-agnostic, PSR-4, no runtime dependencies.
use PCEditor\Editor; $editor = new Editor([ 'templates_dir' => __DIR__ . '/templates', 'breakpoints' => ['desktop' => null, 'tablet' => '(max-width: 1024px)', 'mobile' => '(max-width: 640px)'], 'cache' => true, ]); echo '<style>' . $editor->renderCssMediaQuery($json) . '</style>'; echo $editor->render($json);
Full documentation: docs/index.md.
Development
composer install composer test # PHPUnit