Ckeditor5: spacebar not recording

Created on 4 May 2019  路  15Comments  路  Source: ckeditor/ckeditor5

ClassicEditor 12.1.0

Chrome OSX latest build

Editor opens fine and I can type every key except the space bar. Even tried to cut / paste a single space into a line of text.

invalid

Most helpful comment

@Mgsy found out the issue (not sure if it also might be a solution for others).

When copy & pasting the code from this URL https://cdn.ckeditor.com/ckeditor5/12.3.1/classic/ckeditor.js into your local project the space bar (why ever) won't work - but when loading it as scrip-tag using <script src="https://cdn.ckeditor.com/ckeditor5/12.3.1/classic/ckeditor.js"></script> it'll work fine.

All 15 comments

const self = this;       
ClassicEditor.create(node[0])
            .then(editor => {
                self.editor = editor;
                self.editor.keystrokes.set('space', (key, stop) => {
                    self.editor.execute('input', {
                        text: ' '
                    });
                    stop();
                });
            })
            .catch(error => {
                console.error(error);
            });

Resolves the error

I have exactly the same problem with 12.2.0 - space doesn't get recorded.

Any solution yet?

Any solution yet?

I'm not able to reproduce the mentioned issue. Can you open a new issue with a detailed description of the problem and steps to reproduce?

Got the same issue now tho when pressing space it appends a p-tag into the "ck-content"-div tag.
I was able to insert a space when a char was before my selector.

Not sure but I guess it might be third-party which might manipulating elements CKEditor needs (?)
I'm using:

  • CKEditor 5 - 4.12.1 (Standard)
  • MDBootstrap (I think it might cause the issue - will try it out)
  • Custom CSS/JS stuff

I will try a clean test with CKEditor only and will post it here later.

@Mgsy found out the issue (not sure if it also might be a solution for others).

When copy & pasting the code from this URL https://cdn.ckeditor.com/ckeditor5/12.3.1/classic/ckeditor.js into your local project the space bar (why ever) won't work - but when loading it as scrip-tag using <script src="https://cdn.ckeditor.com/ckeditor5/12.3.1/classic/ckeditor.js"></script> it'll work fine.

@Mgsy found out the issue (not sure if it also might be a solution for others).

When copy & pasting the code from this URL https://cdn.ckeditor.com/ckeditor5/12.3.1/classic/ckeditor.js into your local project the space bar (why ever) won't work - but when loading it as scrip-tag using <script src="https://cdn.ckeditor.com/ckeditor5/12.3.1/classic/ckeditor.js"></script> it'll work fine.

Yep, I had a local copy to my project. Same problem, space bar not registering.

Used a CDN link instead, and works like a charm. Any reason why?

Anyone got to the bottom of this issue?

It's hard to investigate it as we're not able to reproduce the problem. Could you provide exact steps to reproduce (including information about your environment and the way you implement the editor)?

I am seeing the issue when using with RequireJS. Have created a demo app here -> https://ckeditor-spacebar.appspot.com. You can see that the "local" page demo's the bug.

Just had the same issue. Using a local copy of the cdn's file, the spacebar didn't record. However, using the CDN works perfectly.

Hi, guys, thanks for sharing the information about the issue. However, I'd like to ask you for more details - could you please prepare a step-by-step instruction explaining how to set up the project and reproduce the mentioned issue (code examples will be much appreciated)? Unfortunately, as I said before, I 'm not able to reproduce it.

@Mgsy Here is what I did:

  1. Go to the linked page on the CDN
  2. Press ctrl+a
  3. Press ctrl+c
  4. Make a new file in your preferred text editor and paste.
  5. Include the new file in a script tag
  6. The spacebar no longer works

did anyone get any solution for this?

@mishu1999 try this as it worked also for others:

When copy & pasting the code from this URL https://cdn.ckeditor.com/ckeditor5/12.3.1/classic/ckeditor.js into your local project the space bar (why ever) won't work - but when loading it as scrip-tag using it'll work fine.

Hope it helps - you might want to change the version since I'm not aware of the latest ckeditor-version.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Reinmar picture Reinmar  路  3Comments

metalelf0 picture metalelf0  路  3Comments

Reinmar picture Reinmar  路  3Comments

MansoorJafari picture MansoorJafari  路  3Comments

devaptas picture devaptas  路  3Comments