Hi Guys,
I've encountered another question regarding line breaks used in FCKeditor. appearently it allows enter and shift+enter pressed in their editor box.
How do I re-config the editor so it function like a 'textbox' instead of 'textarea'. ie. one line only and no line breaks allowed?
after digging into the forum and google i can sort of figured that FCKeditor doesn't allow such feature, but I'm currently digging the source code and hopefully someone who found it before can hint me on where do I find the javascript code to disable EnterMode and ShiftEnterMode config setting for a start?
Thanks.
I've encountered another question regarding line breaks used in FCKeditor. appearently it allows enter and shift+enter pressed in their editor box.
How do I re-config the editor so it function like a 'textbox' instead of 'textarea'. ie. one line only and no line breaks allowed?
after digging into the forum and google i can sort of figured that FCKeditor doesn't allow such feature, but I'm currently digging the source code and hopefully someone who found it before can hint me on where do I find the javascript code to disable EnterMode and ShiftEnterMode config setting for a start?
Thanks.
Re: How do I turn FCKeditor into a 'textbox' single line input?
I'm new to FCK but as I've found so little help here so far
( none of my questions were answered so I deleted them after I figured out how to do things myself )
maybe I can suggest that if textfield can't solve your problem, I just made my oFCKeditor.Height = 105; and, though it doesn't prevent them adding more than one line, it looks like it only allows one line of data to be entered.
You could then add an HTML line below the editor stating "please enter only one line of text".
Hope this helps,
Nick. . .
Re: How do I turn FCKeditor into a 'textbox' single line input?
Hi Nick,
thanks for the reply however I think your method will not work for my case as people will be pasting stuff into it as well as typing in. and there's no way I can dis-allow pasting at this stage with FCKeditor.
That's why i'm digging in the source code atm to try to block any line break from the source processing code.
Cheers
AF35
Re: How do I turn FCKeditor into a 'textbox' single line input?
Hi AF35, (sound like a fellow Brit)
Good luck with that...
Have you found any other forums on FCKeditor, as this one is very sparse and I see no help from the programmer.
I'm wasting a lot of time trying to get things working so I may have to abandon FCK and pay for one that works easier.
Maybe we have to pay the thousand or so dollars sponsor fee to get that sort of help here
Cheers,
Nick. . .
Re: How do I turn FCKeditor into a 'textbox' single line input?
Re: How do I turn FCKeditor into a 'textbox' single line input?
I'm watching too... Though I don't need a one line (my project is the opposite - loading a whole Website to edit), I'm curious as to 'how to' do it..
If I find anything related, I'll post it here...
Nick. . .
Re: How do I turn FCKeditor into a 'textbox' single line input?
Re: How do I turn FCKeditor into a 'textbox' single line input?
I would be "worse than the rest" if I posted 'off' topic..
I didn't have any questions relating to textbox so have no Q&A to post.
I also got no help here whatsoever, so abandoned using FCK and purchased
a programme elsewhere.
I 'did' however say I'd post "if I find anything related".
Nick. . .
EOD
Re: How do I turn FCKeditor into a 'textbox' single line input?
Re: How do I turn FCKeditor into a 'textbox' single line input?
Modify your keystrokes config so that you have another entry, one for bare 13 (enter), e.g.:
Replace "bold" with some sort of "do nothing" action, which you may have to create (I tried nbsp, but it doesn't seem to exist in CKE). Then you can force the height of the editor to approximately one line, remove the toolbar plug-in or edit its config to whatever you want it to be, and you should have a nice, short editor.
You'll probably have trouble with pasting and the like, though, so you might have to investigate how to catch that event and deal with it - the pastefromword plug-in should help here.
Finally, don't forget to validate user input - if you want it to be one line, remember to force it to be one line, i.e. remove tags such as br, p, and attributes like styles (line-break-after...).
CKeditor is just html.
CKeditor is just html.
To transform it into a single line add this css to the element used by CKeditor
white-space: nowrap;
overflow-x: auto;