Jump to content

DisplayAdminProductsExtra how to load tinymc


Recommended Posts

this is my code:

public function hookDisplayAdminProductsExtra()
    {
        if (Validate::isLoadedObject($product = new Product((int)Tools::getValue('id_product')))) {
            $this->context->smarty->assign(array(
                'custom_field'     => '',
                'languages'        => Language::getLanguages(true),
                'default_language' => (int)Configuration::get('PS_LANG_DEFAULT'),
            ));
            return $this->display(__FILE__, 'displayAdminProductsExtra.tpl');
        }
    }

this is my displayAdminProductsExtra.tpl

<div class="panel product-tab">
    <h3 class="tab"><i class="icon-info"></i>{l s='Content'}</h3>
    <div class="form-group">
        <label></label>
        {include file="controllers/products/textarea_lang.tpl"
        languages=$languages
        input_value=$custom_field
        input_name="etmust_paid_product_content"
        class="rte autoload_rte etmust_paid_product_content mce-tinymce mce-container"
        }
    </div>
    {literal}
    <script type="text/javascript">
        $(document).ready(function () {
                hideOtherLanguage({/literal}{$default_language}{literal});
            }
        );
    </script>
    {/literal}
</div>

this is display

 

post-620354-0-12060500-1504320733_thumb.png

 

 

why the textarea not load tinymc? how code it?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...