Foros de discusión

MaxLenth of TextBox in CK editor

thumbnail
Devang Patel, modificado hace 8 años.

MaxLenth of TextBox in CK editor

Regular Member Mensajes: 247 Fecha de incorporación: 19/01/15 Mensajes recientes
Hi All,

What is the maximum length of TextBox in Ck editor?
Can we put character limit in TextArea in CK editor?

Thank You,
Devang Patel
thumbnail
Himanshu Bhandari, modificado hace 8 años.

RE: MaxLenth of TextBox in CK editor

Regular Member Mensajes: 148 Fecha de incorporación: 9/05/14 Mensajes recientes
Hi
I don't think that CKEditor has any restriction on the number of characters you put into, or you can try by inserting too much junk text and test it. The thing is how much characters your column in the DB can store, if you exceed that then you will definitely face errors.
This app in the marketplace I found(not used) which explains and can be used in your scenario.
HTH!
Thanks.
thumbnail
Devang Patel, modificado hace 8 años.

RE: MaxLenth of TextBox in CK editor

Regular Member Mensajes: 247 Fecha de incorporación: 19/01/15 Mensajes recientes
Hi Himanshu,

I tried that apps but it isn't working.
I have inserted too much junk text and then all that lines went outside of the portlet.
So I want to restrict the input character.

Thank You,
Devang Patel
thumbnail
Himanshu Bhandari, modificado hace 8 años.

RE: MaxLenth of TextBox in CK editor

Regular Member Mensajes: 148 Fecha de incorporación: 9/05/14 Mensajes recientes
Hi
I tried that apps but it isn't working.

With which Liferay version? Have you checked the version with which the app is compatible?

Which portlet you are using, custom? Or are you using web content? I mean where exactly you are using CK Editor?
Well I tried to add a web content with lots of text and at the time of publish it I got error :
Please enter content with valid content size no larger than 256k.
so i guess character limit is restricted at least in case of webcontent.
Thanks.
thumbnail
Devang Patel, modificado hace 8 años.

RE: MaxLenth of TextBox in CK editor

Regular Member Mensajes: 247 Fecha de incorporación: 19/01/15 Mensajes recientes
Hi Himanshu,

I am using Liferay 6.2 GA3.
I am using web content display portlet (OOTB Portlet).

Thank You,
Devang Patel
thumbnail
Himanshu Bhandari, modificado hace 8 años.

RE: MaxLenth of TextBox in CK editor

Regular Member Mensajes: 148 Fecha de incorporación: 9/05/14 Mensajes recientes
Hi
As per the app's requirement it is compatible with Liferay Portal 6.1 CE GA2+ or Liferay Portal 6.1 EE GA2+ so may be your version of liferay doesn't support it.
I got the error while putting lots of text, haven't you got?
Thanks.
thumbnail
Devang Patel, modificado hace 8 años.

RE: MaxLenth of TextBox in CK editor

Regular Member Mensajes: 247 Fecha de incorporación: 19/01/15 Mensajes recientes
Hi Himanshu,

I know that. So I asked to help.
Anyway I will put help message to the field. So that user will know that how many character to be entered for that particular field.
If you find any solution please let me know.

Thank You,
Devang Patel
thumbnail
Thiago Henrique Carvalho Prudente, modificado hace 8 años.

RE: MaxLenth of TextBox in CK editor

New Member Mensajes: 21 Fecha de incorporación: 15/06/15 Mensajes recientes
I believe that you could override the original jsp from the root, creating a hook plugin.
thumbnail
Bangaru Raju Potnuru, modificado hace 4 años.

RE: MaxLenth of TextBox in CK editor

New Member Mensajes: 22 Fecha de incorporación: 22/11/14 Mensajes recientes
Hi Himashu,

I want to do the same thing for Web content portlet in Liferay-7 CE GA-2 Version. Could You Please assist me?

Thanks & Regards,

P.V.B.Raju
Jan Tošovský, modificado hace 8 años.

RE: MaxLenth of TextBox in CK editor

Liferay Master Mensajes: 566 Fecha de incorporación: 22/07/10 Mensajes recientes
> What is the maximum length of TextBox in Ck editor?

Doesn't seem to be any. But you can hit POST request limit when executing the action (trying to save data into database). Default value for tomcat is 2MB, see https://tomcat.apache.org/tomcat-8.0-doc/config/http.html

Can we put character limit in TextArea in CK editor?

Text can be formatted and you are storing HTML code at the end. Do you want to limit visible chars or that HTML source (the latter can be confusing to the end user). Anyway, you can either:
* integrate CKEditor plugin, e.g. http://ckeditor.com/addon/wordcount - via CKEditor config hook
* integrate custom validator (alerting the user on loosing the focus)

Both checks are client based and can be eliminated so backend check is recommended as well.

Not quite easy task...

Jan
thumbnail
Devang Patel, modificado hace 8 años.

RE: MaxLenth of TextBox in CK editor

Regular Member Mensajes: 247 Fecha de incorporación: 19/01/15 Mensajes recientes
Hi Jan,
Thanks for the valuable information.
I got your point.

Thanks & Regards,
Devang Patel