Opened 11 years ago

Closed 10 years ago

Last modified 10 years ago

#10094 closed Bug (wontfix)

Unable to dynamically/lazily load a CKBuilder-generated ckeditor.js

Reported by: Chris Ingham Owned by:
Priority: Normal Milestone:
Component: General Version: 4.0 Beta
Keywords: IBM Cc: chris.ingham@…, irinauru@…

Description

I would like to load CKEditor dynamically/lazily as part of a single page web application.

Google turns up some information about "bootstrapping" using ckeditor_basic.js (e.g. alfonsoml's 2009 blog entry), but the build/download produced by CKBuilder does not include ckeditor_basic.js.

The inline version CKEditor 4.0.1 looks and demos wonderfully, but my attempts to dynamically load ckeditor.js on demand have resulted in a number of timing-related JavaScript exceptions, and have been a major barrier to integrating CKEditor into my application.

I'm submitting this as a "Bug" hoping that in fact this use case is supported but undocumented. Otherwise this would seem to be an important feature to enable integration into modern web applications.

Change History (5)

comment:1 Changed 11 years ago by Jakub Ś

Status: newconfirmed
Version: 4.0.14.0 Beta
  1. Currently ckeditor_basic is missing so yes this is a bug.
  2. Blogpost @inghamc is talking about is http://alfonsoml.blogspot.com/2009/09/delayed-loading-of-ckeditor.html.
  3. I was trying to workaround this problem with script tag insertion but event after commenting our the editorScriptLoaded method I was getting:

Message: "CKEDITOR.skin is undefined"
Line: 351
URI: /ckeditor4/core/editor.js

function createEditor(){
	var myHeader = document.getElementsByTagName("head")[0];         
	var myScript = document.createElement('script');
	myScript.type = 'text/javascript';
	myScript.src = '../ckeditor.js';
	//myScript.onload=editorScriptLoaded;
	myHeader.appendChild(myScript);
}
		
function editorScriptLoaded(){
	// We need to turn off the automatic editor creation first.
	//if ( CKEDITOR.loadFullCore ){		
		//CKEDITOR.loadFullCore();
		
		CKEDITOR.disableAutoInline = true;
		var editor = CKEDITOR.inline( 'editable' );
		editor.on('instanceReady', function(evt){
			evt.editor.focus();
		});			
	//}
}

comment:2 Changed 11 years ago by Piotr Jasiun

Related ticket: jQuery Adapter does not work with ckeditor_basic.js #7778. Adapter should be fixed when lazy loading (ckeditor_basic.js) will be recreated.

comment:3 Changed 10 years ago by Irina

Cc: irinauru@… added
Keywords: IBM added

comment:4 Changed 10 years ago by Frederico Caldeira Knabben

Resolution: wontfix
Status: confirmedclosed

We’ve been making our consideration about this feature here. Our conclusion is that nowadays it is not any more much advantage to have a custom and non-standard way to lazy load scripts considering the amount of script-loading solutions available. Therefore we recommend using any of the available (or even custom) solutions out there.

comment:5 Changed 10 years ago by Piotrek Koszuliński

cc

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy