tag:blogger.com,1999:blog-1000471101186335353.post6609523808531281630..comments2023-10-26T23:44:01.108+02:00Comments on The New Territory: CKEditor is Fast!Alfonsohttp://www.blogger.com/profile/18445103211507263059noreply@blogger.comBlogger6125tag:blogger.com,1999:blog-1000471101186335353.post-32268058155528711412009-12-11T13:24:48.236+01:002009-12-11T13:24:48.236+01:00The incorrect error message has been fixed: ticket...The incorrect error message has been fixed: <a href="http://dev.fckeditor.net/ticket/4764" rel="nofollow">ticket 4764</a><br /><br />Thanks to Garry and Fred for the quick response.Alfonsohttps://www.blogger.com/profile/18445103211507263059noreply@blogger.comtag:blogger.com,1999:blog-1000471101186335353.post-64072002948241877282009-12-10T15:20:33.489+01:002009-12-10T15:20:33.489+01:00Ah, it was obvious and I should have noticed it ri...Ah, it was obvious and I should have noticed it right off myself.<br /><br />The editor instance was 'editor1' not simply 'editor'.<br /><br />Apologies for my newbie blunder.<br /><br />Great tips and articles by the way.Unknownhttps://www.blogger.com/profile/11316706944223237803noreply@blogger.comtag:blogger.com,1999:blog-1000471101186335353.post-7972557176755455212009-12-10T13:42:45.478+01:002009-12-10T13:42:45.478+01:00Does your page work with just
editor = CKEDITOR.a...Does your page work with just <br />editor = CKEDITOR.appendTo( 'editor')<br /><br />If it fails, then you have a more basic problem (and it seems that the exception code doesn't provide the correct data)Alfonsohttps://www.blogger.com/profile/18445103211507263059noreply@blogger.comtag:blogger.com,1999:blog-1000471101186335353.post-70590733823616311912009-12-09T21:36:09.271+01:002009-12-09T21:36:09.271+01:00When I try this snippit:
editor = CKEDITOR.appendT...When I try this snippit:<br />editor = CKEDITOR.appendTo( 'editor' , <br /> {<br /> on:<br /> {<br /> 'pluginsLoaded': function(e) <br /> { <br /> console.log("event " + e.name + ' fired for the editor ' + e.editor.name)<br /> } <br /> } <br /> });<br /><br />I get this in FireBug:<br />uncaught exception: [CKEDITOR.editor.appendTo] The element with id "null" was not found.Unknownhttps://www.blogger.com/profile/11316706944223237803noreply@blogger.comtag:blogger.com,1999:blog-1000471101186335353.post-48837988272630009512009-11-29T22:03:59.342+01:002009-11-29T22:03:59.342+01:00Yes, obviously the event is fired before the assig...Yes, obviously the event is fired before the assignment to the global "editor" variable is made in the example, so you can't use that inside the code.<br /><br />But instead of "this", I would use the editor passed as part of the event data:<br /><br /> editor = CKEDITOR.appendTo( 'editor' , {<br />on:{'pluginsLoaded': function(e) { console.log("event " + e.name + ' fired for the editor ' + e.editor.name)} } });<br /><br />That way seems far more generic and easier to me. You can use as the listener the method of another object, you don't have to care about global variables, the data is there for you to use it!Alfonsohttps://www.blogger.com/profile/18445103211507263059noreply@blogger.comtag:blogger.com,1999:blog-1000471101186335353.post-50316462902867074672009-11-29T19:21:34.357+01:002009-11-29T19:21:34.357+01:00Brilliant tip although worth to explicitly mention...Brilliant tip although worth to explicitly mention that second time "pluginsLoaded" is loaded before editor is initialized (so for example any global variable holding editor instance is not available). Just use "this" inside method to access editor reliably.sebbiehttps://www.blogger.com/profile/10690924569588290610noreply@blogger.com