Jump to content

Use Tinymce on product combination page


Recommended Posts

Hi everyone,

Hope I'm in the right place, as it's my first post here :)

I'm trying to use Tinymce to edit custom fields linked to products combinations but without success.

Here's what I do:

public function hookDisplayAdminProductsCombinationBottom($params)
    {
		....
		return $this->context->smarty->fetch(
            $this->getLocalPath() . 'views/templates/admin/fields_combinations.tpl'
        );
    }

Then in the tpl:

{foreach Language::getLanguages(true) as $lang}
<div data-local="{$lang['iso_code']}" class="translationsFields-form_step3_attribute_strong_points_{$id_product_attribute}_{$lang['id_lang']} translation-label-{$lang['iso_code']}">
                    <textarea id="form_step3_attribute_strong_points_{$id_product_attribute}_{$lang['id_lang']}"
                              name="attribute_strong_points_{$id_product_attribute}[{$lang['id_lang']}]"
                              class="form-control rte"
                              rows="3">{$extraFieldsCombination->strong_points[{$lang['id_lang']}]}</textarea>
</div>
{/foreach}

At the end of the tpl, I also added a $(function() {tinySetup(); });

The iframe head and body tags are filled in correctly, I can put some text in the editor but when I click on a toolbar btn, nothing happens except the error shown on the image attached to the post (also the value set in the textarea is not visible with tinymce, but I can see it if I just use the standard textarea).

Any help would be greatly appreciated as I'm looking all over the internet for a few hours now😕

Thanks,

Renaud

error.png

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...