Hey guys!
I'm working on a project that works with ckeditor. Basically I have my editor with a defined height, and I want to prevent the user to type more than the editor can contain, with this defined height.
So in other words, let's say that I don't want to have a scrollbar on my editor, ever, and I don't want my editor to grow and go further than the height I have defined.
The final purpose is to block the editor to an A4 page format.
To reach this purpose I was thinking to try detecting if a scrollbar appeared (because when I will write a lot of contents, and reach the bottom of my editor, the scrollbar will appear to let me continue my writing), and delete last characters or whatever.
I'm a bit lost in all documentation of ckeditor, I tried many things, but as i'm not a javascript expert, I get overwhelmed pretty fast.
Thanks a lot by advance for your help.
Best,
Clément
Wouldn't it be easier to
Wouldn't it be easier to limit the amount of characters?
Customer and Community Manager, CKSource
Follow us on: Facebook, Twitter, LinkedIn
If you think you found a bug in CKEditor, read this!
It would be for sure.. but
It would be for sure.. but what if the user only press the Enter key, and get to the bottom with a tiny number of characters ?
It will be extremely hard to
It will be extremely hard to do this right. Or in other words - it will be impossible. You neither can prevent the user from inputting too much content, nor fix it easily for him (that would be a poor UX BTW).
The only solution in my opinion is to notify the user that (s)he inputted too much content and need to delete it.
Piotrek (Reinmar) Koszuliński
CKEditor JavaScript Developer
--
CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+
I agree with the poort UX...
I agree with the poort UX... my client has weird tastes, I already advice him against that option but.. nope
Anyway, thanks a lot for your inputs, I really appreciate it :)
Have a good coding day guys