This question has been asked before I see and no one has replied and there does not seem to be a resolution anywhere in the documentation or forum. Can someone from CK please address this issue? It is not CSS, not browser related. When pressing enter in CK it will give two lines and places the cursor at the second line, and you can arrow-up to get to the first line.
Fri, 10/17/2014 - 15:24
#1
I don't have the issu
Difficult to answer for those who don't have the issue.
Have you read the options for the Enterkey plugin? Perhaps it could solve your case.
How is the source, <br><br> ?
Many other people have this same error
Here is what it looks like
<p>This line would have been here already</p><!-- cursor would have started here before enter was pressed -->
<p></p>
<p><!-- this is where the cursor lands after pressing enter, and even shift + enter--></p>
There seems to be many people who get this error. Does not seem to be a css problem. I see some fixits when searching but non seem to work. I will look into the enter key plugin. Sounds like it could be a solution.
tried it, no effect
Ahh too bad. It did not work. I added the plugin, implemented the default config setting that calls for a new P tag to be created when you hit the enter key and wouldnt you know it, it created two of them again like usual. I am going to try to add some salt to the wound and see if that helps. Just kidding. So what do you think, how can this issue be solved? CK is adding 2 lines every time you press the enter key.
Here is some food for thought... When I press ctrl+m I only get 1 line. you would think that is what would happen when I press shirt+enter but I still get 2 lines in that case. So again this is a CK issue and I just need someone to tell me how to control this from happening
Settings of the Enterkey
But I would not let it default <p>, but as follows:
Yes I tried that too. Did not
Yes I tried that too. Did not work. I added the plugin to the plugin folder, then added it's name in the "add extra plugins" line in the config file, then after that I put the config.enterMode = CKEDITOR.ENTER_BR; code. all of that seems like it would do something but it does not. Still just gives two lines and cursor is at the second line. FCKeditor did not have this problem. I have it installed with FCK with the same setup and it works fine there
found something
So I am using a custom config file. When I go back to the ck config file the error goes away, but when I go back to my custom config file the error returns. How could that be what is causing it if the files are the same? Makes no sense. there must be a glitch that is caused when the custom config file command is called. Possibly there is a fix that can be called in the custom config file similar to the enterMode mentioned above, except one that works when used. any thoughts?
a little deeper
Seems to be when I add a custom plugin. when I take away the custom plugin there is no extra line. when I put it back it happens again. So I am able to use a custom config file as long as I dont use a custom plugin, even if its the plugin that is an example on the site. Looks like this is either a glitch when adding external plugins, or there is a setting that is set to default that causes this which we can over ride with a line in the config file. Anyone from CK know of this problem or should I just submit it as a bug?
figured it out
It is a glitch indeed. Seems you cannot put functions in your plugin.js file for your custom plugin. the function must live in an external file. I moved my function outside of the plugin file and it corrected the extra line issue. For anyone who encounters this issue hopefully they will read this and can fix their ckeditor glitch as well