I have created a textarea in WordPress Customizer in the following way.
$wp_customize->add_setting( "stylesheet_setting", array(
'default' => '',
'type' => 'theme_mod',
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
'sanitize_callback' => 'sanitize_textarea_field',
) );
$wp_customize->add_control( "stylesheet_setting", array(
'section' => "stylesheet_section",
'type' => 'textarea',
) );
Problem
The Problem I am having is that, when I write CSS code in this textarea, it does not update the preview pane in realtime, instead, if I use the refresh
method for transfer
, it updates after refreshing.
I want to update in real-time just like I enter CSS in WordPress Custom CSS Textbox.