Jump to content

tinyMCE rich text editor doesn't show up


Recommended Posts

Hello,

 

I have added the tinyMCE rich text editor to my prestashop store but I can not use it. 

prestashop version: 1.6.1.3

I have deleted browser and shop cache.

I also changed the validate file. 

This is the only thing I see when I open every cms or product page. 

 

Here is my code, can someone please help me solving this problem?

function tinySetup(config)
{
    if(!config)
        config = {};
  
    var editor_selector = 'rte';
    //if (typeof config['editor_selector'] !== 'undefined')
    //var editor_selector = config['editor_selector'];
    if (typeof config['editor_selector'] != 'undefined')
        config['selector'] = '.'+config['editor_selector'];
  
        //safari,pagebreak,style,table,advimage,advlink,inlinepopups,media,contextmenu,paste,fullscreen,xhtmlxtras,preview
        default_config = {
        selector: ".rte" ,
        plugins : "visualblocks, preview searchreplace print insertdatetime, hr charmap colorpicker anchor code link image paste pagebreak table contextmenu filemanager table code media autoresize textcolor emoticons",
        toolbar2 : "newdocument,print,|,bold,italic,underline,|,strikethrough,superscript,subscript,|,forecolor,colorpicker,backcolor,|,bullist,numlist,outdent,indent",
        toolbar1 : "styleselect,|,formatselect,|,fontselect,|,fontsizeselect,", 
        toolbar3 : "code,|,table,|,cut,copy,paste,searchreplace,|,blockquote,|,undo,redo,|,link,unlink,anchor,|,image,emoticons,media,|,inserttime,|,preview ",
        toolbar4 : "visualblocks,|,charmap,|,hr,",
             
        external_filemanager_path: ad+"/filemanager/",
        filemanager_title: "File manager" ,
        external_plugins: { "filemanager" : ad+"/filemanager/plugin.min.js"},
        extended_valid_elements: 'pre[*],script[*],style[*]', 
        valid_children: "+body[style|script|iframe|section],pre[iframe|section|script|div|p|br|span|img|style|h1|h2|h3|h4|h5],*[*]",
        valid_elements : '*[*]', 
        force_p_newlines : false, 
        cleanup: false,
        forced_root_block : false, 
        force_br_newlines : true,  
        convert_urls:true,
        relative_urls:false,
        remove_script_host:false,
           
        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);
  
}
  
$().ready(function() {
   tinySetup(); 
});

post-1154852-0-84086000-1481031044_thumb.png

Link to comment
Share on other sites

Hi!

 

I have yet to understand the problem, so here are my questions :

You have added something that is already here no? Are you talking about frontend or Backend? Backend should already have a TinyMCE editor...

 

Do you have any error in JS console?

 

Any URL for your website?

 

Martin.

Link to comment
Share on other sites

Hello Martin,

 

Thank you for your response, I have added a extended tinyMCE text editor to the backend of the store. I have done it with this tutorial: https://www.prestashop.com/forums/topic/318425-tutorial-tinymce-rich-text-editor-extended-version/ 

 

If you look at my attached picture in the first post you see that I am not able to edit my text anymore.

 

Bas

Link to comment
Share on other sites

Hello Martin,

 

This is the code I see when I open dh42.js it is from prestashop theme extender module.

$(document).ready(function() {



	// Change it to yours

	var affiliate_url = '002';

	var licontent  = '<li class="maintab" id="maintab-Dh42" data-submenu="99">';

			licontent += '<a style="background-color:#ff5450; color: white" href="javascript:void(0)" class="title">';

				licontent += '<i class="icon-question-sign" style="color:white; padding-left: 7px"></i><span>Get Prestashop Support</span>';

			licontent += '</a>';

		licontent += '</li>';



	$('#nav-sidebar .menu').append(licontent);



	$('#maintab-Dh42 a').click(function(e) {

		e.preventDefault();

		if($('#dh42-support-container').length == 0)
			$('body').append('<div id="dh42-support-container" class="modal fade"><div class="modal-dialog" style="height:75%;width:75%""><iframe src="https://dh42.com/support/aff.php?aff='+affiliate_url+'&support=true&iframe=yes" width=100% height=100%></iframe><style>#main-header {display:none}</style></div></div>');

		$('#dh42-support-container').modal('show');



	});

});
Link to comment
Share on other sites

  • 1 year later...

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