I have error Uncaught TypeError: Object #

has no method 'addButton'
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

agalitsyn’s picture

Version: 7.x-1.9 » 7.x-1.12
Status: Active » Needs review
FileSize
3.09 KB

Here is a patch

wwalc’s picture

Status: Needs review » Closed (works as designed)

The problem is slightly different. The "source" version of CKEditor contains its own version of config.js, with the list of plugins to be loaded (along with the button plugin), which is critical in order to have all important plugins loaded.

The attached patch removes the JS error, but CKEditor will not load anyway.

The real fix if one wants to use the source version is to copy the relevant lines from config.js provided with CKEditor, e.g.:

	// %REMOVE_START%
	// The configuration options below are needed when running CKEditor from source files.
	config.plugins = 'dialogui,dialog,about,a11yhelp,dialogadvtab,basicstyles,bidi,blockquote,clipboard,button,panelbutton,panel,floatpanel,colorbutton,colordialog,templates,menu,contextmenu,div,resize,toolbar,elementspath,list,indent,enterkey,entities,popup,filebrowser,find,fakeobjects,flash,floatingspace,listblock,richcombo,font,forms,format,htmlwriter,horizontalrule,iframe,wysiwygarea,image,smiley,justify,link,liststyle,magicline,maximize,newpage,pagebreak,pastetext,pastefromword,preview,print,removeformat,save,selectall,showblocks,showborders,sourcearea,specialchar,menubutton,scayt,stylescombo,tab,table,tabletools,undo,wsc';
	config.skin = 'moono';
	// %REMOVE_END%

and paste them into ckeditor.config.js in CKEditor module. Alternatively, set config.plugins in advanced options of CKEditor profile.

heddn’s picture

Issue summary: View changes

For posterities sake, you also have to add the version so libraries will load everything. Grab the version string i.e. version:"4.4.2" and copy into the first few lines of the uncompressed js. Putting it into the comments out @license section seems to be fine.