Follow us on

Codestar Support Forum » WordPress Plugins » Codestar Framework

wp_editor scripts not loading in another places

  1. Hello. I am trying to use wp_editor field inside WooCommerce product tabs. But wp_editor scripts not loading. Where i am wrong? I am using insie csf-onloaded classed div.

    CSF::field(
    	array(
    		'id'    => 'pi_content',
    		'type'  => 'wp_editor',
    		'title' => esc_html__( 'Content', 'text-domain' ),
    	),
    	$pi_content
    );CopyCopied!
    Posted 11 months ago #
  2. Also used these lines:

    CSF::$enqueue = true;
    CSF::add_admin_enqueue_scripts();CopyCopied!
    Posted 11 months ago #
  3. Hello
    I am answering you instead of the framework designer, I hope it will be useful.
    put your code in div tag with csf-onload class.

    <div class="csf-onload">
    <?php
     CSF::field(
    	array(
    		'id'    => 'pi_content',
    		'type'  => 'wp_editor',
    		'title' => esc_html__( 'Content', 'text-domain' ),
    	),
    	$pi_content
    );
    ?>
    </div>CopyCopied!

    I hope it is useful

    Posted 11 months ago #
  4. I already used in csf-onlad div thanks @behi76

    Posted 11 months ago #

  5. Codestar
    Admin

    Hi,

    There is no guarantee to use all fields in the front-end. Some fields has only works in backend because depends backend styles/scripts. for eg (color-picker)

    But there is a luck for usage wp_editor. Try like this:

    CSF::$fields = array( array( 'type' => 'wp_editor' ) ); // <-- add this.
    CSF::$enqueue = true;
    CSF::add_admin_enqueue_scripts();CopyCopied!

    Regards, Codestar

    Posted 11 months ago #