Support

Account

Home Forums Gutenberg Load JS in editor with block.json Reply To: Load JS in editor with block.json

  • Also in my-block.php file, is there a way to get
    <script type="module" src="https://unpkg.com/@splinetool/viewer/build/spline-viewer.js"></script> to process in the editor?

    This doesn’t seem to process in the editor; only on the front end:

    <div <?php echo $anchor; ?>class="<?php echo esc_attr( $class_name ); ?>">
    <script type="module" src="https://unpkg.com/@splinetool/viewer/build/spline-viewer.js"></script>
    <spline-viewer url="<?php echo $text; ?>"></spline-viewer>
    </div>