Jump to content

TinyMCE inserts weird code


presta-ming

Recommended Posts

Hi there, I am experiencing a strange behavior of TinyMCE. Whenever I am saving an article, TinyMCE is always adding this gigantic code at the bottom:

 

Code attached as a picture!

 

Deleting it, is not working because when saving my article the code will be inserted again.

I am using TinyMCE with PrestaShop 1.6.1.6
Does anyone know how to solve that issue? So, how to get rid if this code?

Thanks for your help.
Best regards

post-1337261-0-87240800-1479144995_thumb.jpg

Link to comment
Share on other sites

That is strange, maybe some 3rd party module adding that.

 

Could you explain is it only on product descriptions or also on CMS pages that you see that.

So is it just TinyMCE  problem in general or just product page ?

 

Also do you have link to some product with that displayed ?

Link to comment
Share on other sites

It is appearing on both: CMS and product pages.

 

I guess it is due to the tinyMCE configuration but I do not know why exactly.
My page is still in dev-mode. This is the tinyMCE configuration I am using at the moment:

function tinySetup(config)
{
    
	if(!config)
		config = {};
	if (typeof config['editor_selector'] != 'undefined')
		config['selector'] = '.'+config['editor_selector'];
		default_config = {
		selector: ".rte" ,
		plugins : "colorpicker link image paste pagebreak table contextmenu filemanager table code media autoresize textcolor",
		toolbar1 : "code,|,bold,italic,underline,strikethrough,|,alignleft,aligncenter,alignright,alignfull,formatselect,|,blockquote,colorpicker,pasteword,|,bullist,numlist,|,outdent,indent,|,link,unlink,|,cleanup,|,media,image",
		toolbar2: "",
		external_filemanager_path: ad+"/filemanager/",
		filemanager_title: "File manager" ,
		external_plugins: { "filemanager" : ad+"/filemanager/plugin.min.js"},
		language: iso,
		skin: "prestashop",
		statusbar: false,
		relative_urls: true,
		convert_urls: false,
		forced_root_block: '',
		force_p_newlines: false,
		remove_linebreaks: false,
		force_br_newlines: true,
		remove_trailing_nbsp: false,
		verify_html: false,
		extended_valid_elements : "em[class|name|id],span[*],i[*],br[*],script[src|type|language]",
		menu: {
			edit: {title: 'Edit', items: 'undo redo | cut copy paste | selectall'},
			insert: {title: 'Insert', items: 'media image link | pagebreak'},
			view: {title: 'View', items: 'visualaid'},
			format: {title: 'Format', items: 'bold italic underline strikethrough superscript subscript | formats | removeformat'},
			table: {title: 'Table', items: 'inserttable tableprops deletetable | cell row column'},
			tools: {title: 'Tools', items: 'code'}
		}
	}
	$.each(default_config, function(index, el)
	{
		if (config[index] === undefined )
			config[index] = el;
	});
	tinyMCE.init(config);
};

Thanks for tips :)

Link to comment
Share on other sites

  • 2 months later...

Hello,

Can anybody help me please?

I'm using Prestashop 1.6.14 + Firefox

and I want to disable the AUTOFOCUS (go to tinymce editor) when I turn on the Multishop Slide.

I want this because every time when I want to edit for example a title or reference and I turn ON the Multishop Slide the page goes down to the tinymce description.

Best regards

Marius

 

PS: I'm looking in tinymce.inc.js but I cant see where I can do this

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