# windpress/3.2.89/src/Integration/LiveCanvas/Editor.php

WindPress – Tailwind CSS integration for WordPress, version 3.2.89. 41 lines.

- Page: https://pluginprobe.com/plugins/windpress/3.2.89/code/src/Integration/LiveCanvas/Editor.php
- Raw: https://pluginprobe.com/plugins/windpress/3.2.89/raw/src/Integration/LiveCanvas/Editor.php
- Modified: 2026-08-30T06:24:48+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/windpress/3.2.89/code/src/Integration/LiveCanvas/Editor.php#L10-L20`.

```php
<?php

/*
 * This file is part of the WindPress package.
 *
 * (c) Joshua Gugun Siagian <suabahasa@gmail.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
declare (strict_types=1);
namespace WindPress\WindPress\Integration\LiveCanvas;

use WIND_PRESS;
use WindPress\WindPress\Admin\AdminPage;
use WindPress\WindPress\Utils\Vite;
/**
 * @author Joshua Gugun Siagian <suabahasa@gmail.com>
 */
class Editor
{
    public function __construct()
    {
        add_action('lc_editor_before_body_closing', fn() => $this->register_livecanvas_autocomplete(), 1000001);
    }
    public function register_livecanvas_autocomplete()
    {
        $handle = WIND_PRESS::WP_OPTION . ':integration-livecanvas-editor';
        Vite::assets()->enqueue('resources/integration/livecanvas/main.js', ['handle' => $handle, 'in_footer' => \true, 'dependencies' => ['wp-hooks']]);
        wp_localize_script($handle, 'windpresslivecanvas', ['_version' => WIND_PRESS::VERSION, 'assets' => ['url' => Vite::base_url()], 'site_meta' => ['name' => get_bloginfo('name'), 'site_url' => get_site_url(), 'admin_url' => AdminPage::get_page_url()]]);
        $wp_scripts = wp_scripts();
        $queue = $wp_scripts->queue;
        foreach ($queue as $handle) {
            if (strpos($handle, WIND_PRESS::WP_OPTION . ':') !== 0) {
                continue;
            }
            $wp_scripts->do_items($handle);
        }
    }
}

```
