Jump to content

Custom Product Tabs in 1.6


gabeshackle

Recommended Posts

Is there any way in the new 1.6 admin to be able to trigger the Bootstrap and TinyMCE activation scripts from a custom Tab on the Product edit page.  For example, in the past I've used:

	$(document).ready(function(){
		tinySetup();
		tabs_manager.onLoad('Informations', function(){
			tinyMCE.execCommand('mceAddControl', false, 'sidebar');
		});
	});

To ensure that the TinyMCE field in my custom tab would load.  This no longer appears to work after upgrading to 1.6.  Is there any PrestaShop-endorsed method for adding custom tabs to the product page and have all the initialization scripts applied to them?

 

The primary problem is that the custom tabs are not actually written to the Product page on the initial load but are loaded via Ajax on click.

Link to comment
Share on other sites

tinymce in prestashop 1.6 doesnt support mceAddControl command, this is why it doesnt work.

new tinymce is a bit limited, unfortunately.

 

there is possibility to change this, but in this case it will be necessary to change core js minified tinymce file.

Link to comment
Share on other sites

Actually, some digging around turned up that the commands were simply renamed in TinyMCE 4.0.  The new commands now are:

 

mceRemoveEditor/mceAddEditor

 

I'd still like to see if there's some way to reinitialize the Bootstrap components as well though.

Link to comment
Share on other sites

  • 1 month later...

tinymce in prestashop 1.6 doesnt support mceAddControl command, this is why it doesnt work.

new tinymce is a bit limited, unfortunately.

 

there is possibility to change this, but in this case it will be necessary to change core js minified tinymce file.

 

Vekia I tried to add a custom tab to my own site http://tapanda.gr ok it works.. BUT when I click on a tab all the others remain there.. What happened?

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