elegantthemes / create-divi-extension

MIT License
185 stars 58 forks source link

multiple tiny_mce control content problem #47

Open SatishKumarPrajapati opened 6 years ago

SatishKumarPrajapati commented 6 years ago

Hello,

How can i use background control and tiny_mce multiple times ? What i have done :

  1. i have put tiny_mce control in two toggle, when i try to get content of tiny_mce by using it's name but it shows blank and value shows in [content] variable. So how can i get value of both tiny_mce control.

  2. I am trying to use background control multiple times like border controls but i am not able to do that. I am using this code and fonts are working properly but i am not able to use background multiple times ? $advanced_fields['fonts']['content'] = array( 'label' => esc_html__( 'Content', 'mydivi-mydivi' ), 'css' => array( 'main' => "%%order_class%% .flipbox-content p", ), 'toggle_slug' => 'fboxstyle', );

    $advanced_fields['fonts']['bbox'] = array(
        'label'    => esc_html__( 'Title', 'mydivi-mydivi' ),
        'css'      => array(
            'main' => "%%order_class%% .front-icon-title",
        ),
        'toggle_slug' => 'bboxstyle',
    );

    $advanced_fields['background'] = array( 'css' => array( 'main' => "%%order_class%% .mycontent", ), 'options' => array( 'background_color' => array( 'default' => et_builder_accent_color(), ), ), 'settings' => array( 'tab_slug' => 'advanced', 'toggle_slug' => 'fboxstyle' ) ); $advanced_fields['background']['bbox'] = array( 'css' => array( 'main' => "%%order_class%% .mycontent1", ), 'options' => array( 'background_color' => array( 'default' => et_builder_accent_color(), ), ), 'settings' => array( 'tab_slug' => 'advanced', 'toggle_slug' => 'fboxstyle' ) );

xxtesaxx commented 6 years ago

I know that each Divi module is basically a shortcode and in the past the content of the tiny_mce editor was stored between the opening and closing tag of the shortcode. That is why you can currently only have one tiny_mce per module. The only way to have multiple tiny_mce controls is in a parent-child module where you can have on in the parent and one in each child item but that is probably not what you want. I heard that soon we'll get support for custom controls and current controls will get overhauled as well. Maybe ET will remove this restriction during the overhaul. It would be a very welcome change :)

SatishKumarPrajapati commented 6 years ago

Thanks for your reply... we will look for update and i mention one more point but i did not get reply about this so i just created new issue for your attention https://github.com/elegantthemes/create-divi-extension/issues/50