PDA

View Full Version : Can't integreate Ext.ux.TinyMCE int my application (o is not a constructor)



Zanisimo
23 Feb 2011, 6:13 AM
I am using Ext extension TinyMCE which i got from here : http://blogs.byte-force.com/xor/tinymce/

I have included all necessary files and have come across to this error: "o is not a constructor" which is shown in console when i try to add tinymce editor to my window object in items.



var tinymceSettings = {
theme : "advanced",
plugins: "pagebreak,style,layer,table,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,noneditable,visualchars,nonbreaking,xhtmlxtras,template",
theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,fontselect,fontsizeselect",
theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|",
theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "bottom",
theme_advanced_resizing : false,
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]",
template_external_list_url : "example_template_list.js"
};

if(!this.win){
this.win = desktop.createWindow({
title: "Lower editor",
id: 'post-word',
x: 100,
y: 100,
width: 400,
height: 300,
layout: "fit",
modal: false,
resizable: true,
maximizable: true,
closeAction: "close",
hideMode: "offsets",
items: [
{
xtype: "tinymce",
tinymceSettings: tinymceSettings,
value: ""
}]
});
}
this.win.show();



Please help me. I have tried miserably to add tinymce without ext extension but it didn't work.

Any help appreciated.

Condor
23 Feb 2011, 6:24 AM
Did you include the TinyMCE Ext user extension code (that registers xtype:'tinymce')?