Jump to content

CMS can't add picture


Recommended Posts

Hello all, I am trying to make a new CMS page everything goes fine until I try to edit the page, I want to put a picture. I tried entering through the insert top menu, insert picture button and directly via the source code button, I know it should look like this "<img src="mysite/img/cms/Actual.jpg" alt="" width="1024" height="683" />" the problem is that when I hit save and preview it won't display when I check the source code it has been changed to "<p><img src="http://infill3d.com/img/cms/Actual.jpg" alt="" width="1024" height="683" /></p>" 

Why Prestashop keeps changing it to a paragraph? Does not matter how I try to add the picture after I save it always changes to a paragraph.

Thank you for help in advance.

Link to comment
Share on other sites

Hello Nemo1, thank for the help. I did try editing directly with the source editor and yes Prestashop keeps adding the <p> I can't find a way around it.

I am confused when you say "add the same size attributes to that tag as well" could you please elaborate? Thank you very much.

 

JD

Link to comment
Share on other sites

Tried it and it won't budge :( is very frustrating, so basically you can't add pictures to CMS since tinyMCE keeps adding the <p> every time right? Is this something that should get fixed in the future?

Thank you once more Nemo1.

Link to comment
Share on other sites

Hello Vekia, is this the file /js/tinymce.inc.js? I check it but I do not see this lines "force_br_newlines : true, force_p_newlines false" I did add them to the file,  I can't attach the file to this post I get an error  "tinymce.inc.js You aren't permitted to upload this kind of file" I will paste it bellow.

Unfortunately it did not work it still adds the <p> :( Thank you for all your help. 

 

 

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 : "colorpicker link image paste pagebreak table contextmenu filemanager table code media autoresize textcolor",
toolbar1 : "code,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,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 : false,
convert_urls: false,
 
//New lines
force_br_newlines : true,
        force_p_newlines : false,
 
extended_valid_elements : "em[class|name|id]",
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);
 
};
Link to comment
Share on other sites

×
×
  • Create New...