CKEditor m.lang.contextmenu is undefined

I got the error "m.lang.contextmenu is undefined" while I was installing CKEditor on an ASP .Net website and trying to use a minimum setup.

I supposed the "ckeditor/lang/en.js" is enough, but, as pointed here, the editor doesn't download en.js by default, so it needs to be set on config.js

CKEDITOR.editorConfig = function (config) {
config.language = "en.js";
};

If this is not set, the editor is trying to load "the language that best fit the user language" using browser detection, so this can by any language (for sure, supported by CKEditor). That's why the editor could work with a browser, but not work with other browser, on the same machine.

Comments

  1. the problem seems to be from the detectio mechanism

    try to alert(CKEDITOR.lang.detect( 'en' ));

    on my machine I got 'en-gb'..

    if (CKEDITOR.lang.detect( 'en' ) == 'en-gb') {
    config.language = 'en';
    }

    a more general thing would be to put 'en' instead of 'en-gb' or 'en-us' or other it there are..

    ReplyDelete

Post a Comment

Popular posts from this blog

IIS 7.5, HTTPS Bindings and ERR_CONNECTION_RESET

Verify ILogger calls with Moq.ILogger

Table Per Hierarchy Inheritance with Column Discriminator and Associations used in Derived Entity Types