Config the ckeditor instances from javascript

This public forum is for user-to-user discussions of ASP.NET Maker. Note that this is not support forum.
Post Reply
Andros
User
Posts: 111

Config the ckeditor instances from javascript

Post by Andros »

Hello, I need to config the CKEditor instances at runtime.
For example I want to setup the "mode" to "source" and not to the default "wysiwyg",
but I want to do it at runtime on specific ckeditor instances, so I don't want to modify the config.js file.
I tried to put in "Code/Clients scripts/Global/Startup script" the following code (my field name is Text):
the first row (alert) is ok, but the second one (CKEDITOR.instances...setMode) is not executed.
Instead, If I run this command on Chrom Developer console, it runs perfectly and the editor instance go to "source" mode.
Any idea?

//$(document).ready(function(){
// alert(CKEDITOR.instances.fcustomtextstemplatesedit$x_Text$.name);
// CKEDITOR.instances.fcustomtextstemplatesedit$x_Text$.setMode('source', function() { alert( 'source mode loaded!' ); });
//});


Andros
User
Posts: 111

Post by Andros »

Any idea?


Post Reply