WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce Custom Product Tabs Lite
[resolved] TinyMCE in Custom Product Tabs Lite (4 posts)

  1. tamerch
    Member
    Posted 1 year ago #

    First, thanks for you plugin,
    Then why didn't you use TinyMCE ?

    I tried to do so in woocommerce_wp_textarea_input

    private function woocommerce_wp_textarea_input( $field ) {
    		global $thepostid, $post;
    
    		if (!$thepostid) $thepostid = $post->ID;
    		if (!isset($field['placeholder'])) $field['placeholder'] = '';
    		if (!isset($field['class'])) $field['class'] = 'short';
    		if (!isset($field['value'])) $field['value'] = get_post_meta($thepostid, $field['id'], true);
    
    		//echo '<p class="form-field '.$field['id'].'_field"><label for="'.$field['id'].'">'.$field['label'].'</label><textarea class="'.$field['class'].'" name="'.$field['id'].'" id="'.$field['id'].'" placeholder="'.$field['placeholder'].'" rows="2" cols="20"'.(isset($field['style']) ? ' style="'.$field['style'].'"' : '').'">'.esc_textarea( $field['value'] ).'</textarea> ';
    		//if (isset($field['description']) && $field['description']) echo '<span class="description">' .$field['description'] . '</span>';
    		//echo '</p>';
    		/* correction for wp .quicktags-toolbar input : do not print correctly for unknwon reason*/
    		echo '<style type="text/css">';
    		echo '.quicktags-toolbar input {width: auto;}';
    		echo '#wp-'.$field['id'].'-editor-container {background-color: white;}';
    		echo '</style>';
    		echo '<p> Content </p>';
    		/* TinyMCE */
    		the_editor( $field['value'],$field['id']);
    
    	}

    I can't figure out why I have to use this style coding to avoid problems ...

    http://wordpress.org/extend/plugins/woocommerce-custom-product-tabs-lite/

  2. FoxRunSoftware
    Member
    Posted 1 year ago #

    Hey thanks for using my plugin and for the question. I'm afraid there is no plan to add the TinyMCE editor to this plugin I'm afraid; it's really meant to be the 'lite' version of the paid Tab Manager plugin now available on WooThemes http://www.woothemes.com/products/woocommerce-tab-manager/ which allows for multiple tabs, rearranging tabs, global shared tabs, content editing using the rich editor, improved support, and more.

    Sorry about this, I try to provide some free plugins as a service to those who don't need the full functionality that the paid ones provides, but I only have so much time to allocate for the freebies as the paid plugins I release are actually the main way I pay the bills around here. Thanks!

  3. advancedstyle
    Member
    Posted 1 year ago #

    Thanks for the code tamerch. Note that if you want the custom tab output to be formatted correctly you also need to modify this line in the plugin:

    echo apply_filters( 'woocommerce_custom_product_tabs_lite_content', $tab['content'], $tab );

    to this:

    echo apply_filters( 'woocommerce_custom_product_tabs_lite_content', apply_filters('the_content',$tab['content']), $tab );

  4. FoxRunSoftware
    Member
    Posted 11 months ago #

    closing this

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic