PDA

View Full Version : tinymce advimage plugin not work on IE 8



pielle
9 Dec 2009, 4:43 AM
first of all: sorry for my english!!
In a center region of a vieport I've placed a tabpanel (7 tabs) with an instance of tinymce for each one.
Call the insert image won't works under IE 8; it's ok in firefox, safari and opera.
the attached file contains an excerpt of the code.
Many thanks, pielle

//--------------------- DATA
function data_getPanel(){
return data_panel = new Ext.Container({
id: 'data_panel',
region: 'center',
//margins: '2 5 5 0',
border: false,
frame:true
});
}
///--------------------- VIEWPORT

function desk_getPanel(menu_panel, data_panel, info_panel, command_panel){
return desk = new Ext.Viewport({
id: 'desk',
layout: 'border',
items: [{
xtype: 'box',
region: 'north',
applyTo: 'header',
height: 45
},{
id: 'west_region',
region: 'west',
margins: '2 2 2 2',
width: 250,
items: [menu_panel]
},{
id: 'center_region',
region: 'center',
margins: '2 2 2 0',
items: [data_panel]
},{
id: 'south_region',
region: 'south',
margins: '1 2 2 2',
height:70,
items: [info_panel, command_panel]
}],
renderTo: Ext.getBody()
})
}
//--------------------- TABS
var mask = new Ext.TabPanel({
id: 'tab_cdl',
activeTab: 0,
labelAlign: 'top',
title: argument,
bodyStyle:'padding:5px',
renderTo: 'data_panel',
frame:false,
autoScroll:true,
cls: 'plain',
//floating:true,
autoDestroy: true,
monitorValid:true,
height: Math.round(Ext.lib.Dom.getViewportHeight()*.82),
width: Math.round(Ext.lib.Dom.getViewportWidth()*.72),
//x:10,
//y:10,
items:[{
id:'Consiglio_del_corso',
cls:'x-plain',
title:'Consiglio del corso',
layout:'fit',
items: editor_getPanel("1","")
},{
id:'Obiettivi_formativi',
cls:'x-plain',
title:'Obiettivi formativi',
layout:'fit',
items: editor_getPanel("2","")
},{
id:'Piano_degli_studi',
cls:'x-plain',
title:'Piano degli studi',
layout:'fit',
items: editor_getPanel("3","")
},{
id:'Prove_finale',
cls:'x-plain',
title:'Prove finale',
layout:'fit',
items: editor_getPanel("4","")
},{
id:'Modulistica',
cls:'x-plain',
title:'Modulistica',
layout:'fit',
items: editor_getPanel("5","")
},{
id:'Didattica',
cls:'x-plain',
title:'Didattica',
layout:'fit',
items: editor_getPanel("6","")
},{
title:'Soddisfazione_studenti',
cls:'x-plain',
title:'Soddisfazione studenti',
layout:'fit',
items: editor_getPanel("7","")
},{
title:'Dopo_la_laurea',
cls:'x-plain',
title:'Dopo la laurea',
layout:'fit',
items: editor_getPanel("8","")
}],
buttons: [{
id: 'btn_save',
formBind: true,
text: 'Registra'
},{
id: 'btn_print',
text: 'Stampa'
},{
id: 'btn_abort',
text: 'Annulla'
}]
});
return mask;
}

//--------------------- EDITOR
var editor = {
xtype: "tinymce",
id: 'editor_'+pnl_id,
name: 'arg_cdl__'+pnl_id,
//language : "it",
width: Math.round(Ext.lib.Dom.getViewportWidth()*.7),
height: Math.round(Ext.lib.Dom.getViewportHeight()*.7),
tinymceSettings: {
theme : "advanced",
/*
setup : function(ed) {
ed.onKeyUp.add(function(ed, l) {
btn_setSave();
});
},
*/
plugins: "safari,style,table,advimage,advlink,inlinepopups,preview,searchreplace,paste,visualchars,xhtmlxtras,template,visualchars",
theme_advanced_buttons1 : "undo,redo,|,bold,italic,underline,|,justifyleft,justifycenter,justifyright,justifyfull,|,bullist,numlist,|,pastetext,|,image,|,link,unlink,|,tablecontrols,|,charmap,|,code",
theme_advanced_buttons2 :"",
theme_advanced_buttons3 :"",
theme_advanced_buttons4 :"",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
//theme_advanced_statusbar_location : "bottom",
theme_advanced_resizing : false,

apply_source_formatting : false,
cleanup : true,
cleanup_on_startup: true,
content_css : '_css/tinyMCE.css',
convert_fonts_to_spans : false,
convert_newlines_to_brs : false,
element_format : "html",
entity_encoding : 'named',
fix_list_elements : true,
fix_nesting : true,
//fix_table_elements : true,
force_p_newlines : true,
force_br_newlines : false,
forced_root_block : 'p',
inline_styles : true,
remove_linebreaks : true,
remove_redundant_brs : true,
preformatted : true,
//verify_css_classes : true,

paste_auto_cleanup_on_paste : true,
paste_use_dialog : false,
relative_urls : true,

verify_html : true,
invalid_elements : "br",

//extended_valid_elements : "a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]"
extended_valid_elements : "a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name|style],hr[class|width|size|noshade],font[face|size|color|style]"
},
value: valueText
};

var editor_mask = new Ext.Panel({
id: 'mask_dati_'+pnl_id,
modal:true,
resizable: true,
border: false,
x:0,
y:0,
closable:false,
bodyStyle: 'background-color: #fff',
autoDestroy: true,
items: [editor]
});
editor_mask.show();

return editor_mask;