Joshua Foxworth
Joshua Foxworth

Reputation: 1397

CKEditor updates not working and bug fixes

I have a number of questions.

Problem 1:

So I was trying to fix a bug in CKEditor. It is a known issue in which the cursor jumps when you try to do a backspace. See here. http://dev.ckeditor.com/changeset/7393

What am I looking at in this view? If this is telling me how to fix this bug, what are the names of the codes - as _source/plugins/selection/plugin.js isn't part of the CKEditor download.

If this is a known bug, why wasn't it fixed in the latest download?

Problem 2:

I installed the latest version of CKEditor hoping to fix this problem and it crashed to where my previous working code no longer works. I get this error.

Uncaught TypeError: Cannot read property 'ltr' of undefined ckeditor.js:539
CKEDITOR.plugins.add.init ckeditor.js:539
(anonymous function) ckeditor.js:221
n ckeditor.js:202
CKEDITOR.scriptLoader.load ckeditor.js:202
(anonymous function) ckeditor.js:220
(anonymous function) ckeditor.js:209
(anonymous function) ckeditor.js:207
n ckeditor.js:202
r ckeditor.js:202
p ckeditor.js:202
(anonymous function)

Problem 3:

I thought that the problem may be in the fact that I am trying to do multiple instances that share the same toolbar - despite the fact that this worked prior to the new version. So in an effort to address this, I looked at the documentation and found that this page again. OK, so the sample pointed to isn't part of the downloads that I looked at - and I looked at them all.

Problem 4:

In the end, I am trying to simply use the CKEditor on multiple instances with one toolbar. I load the items to be made into CKEditors and then run this code, which produces the error above:

var config =
{
    extraPlugins : 'autogrow',
    removePlugins : 'elementspath',
    toolbarCanCollapse : false,
    width:'825',
    resize_enabled: false,
    sharedSpaces :  {  top : 'cktoolbar' 
                },
            toolbar : [ [ 'Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Bold', 'Italic', 'Underline', 'Strike', '-', 'RemoveFormat', 'NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'Blockquote', 'Link', 'Unlink', 'Image', 'Table', 'HorizontalRule', 'ShowBlocks', 'TextColor', 'BGColor', 'Format', 'FontSize' ] ]
        } 

        $(this).attr('contenteditable','true');
        $(this).ckeditor(config);

Upvotes: 0

Views: 4790

Answers (2)

Kevin Yan
Kevin Yan

Reputation: 1236

I can answer the problem number 2, I encountered the same problem recently and basically it was caused by miss language file in lang directory(in customization do not select all languages).

So you need add one rule in you configuration

config.language = 'zh-cn' (file name in your lang directory);

and clear the browser cache as well.

Upvotes: 1

Reinmar
Reinmar

Reputation: 22023

  1. This http://dev.ckeditor.com/changeset/7393 means that fix was included in CKEditor long time ago (19 months) so it's part of a CKEditor source since then. Also note that since CKEditor 4.0 the structure of source code has changed and it's now hosted on https://github.com/cksource/ckeditor-dev

  2. No details, no idea. Maybe except one - make sure you cleared cache. It's tricky sometimes.

  3. Since CKEditor 4 the sharedspace plugin is not part of any of standard CKEditor packages. You need to add it to your own build using the online CKBuilder.

  4. The code looks good, but without details it's impossible to guess what's wrong.

Upvotes: 2

Related Questions