Page 1 of 1
WYSIWYG size
Posted: Fri Jun 16, 2023 8:02 am
by yvesf
Hello,
When you create a new object WYSIWYG, by default the system create a corresponding varchar(100).
It sounds that it isn't enough reaching this limit quickly.
What is the recommended size ?
When you reach the size limit, the value isn't saved. Is it possible to inform the end user that the limit has been reach ideally in the WYSIWYG field or at least when saving ? How can you perform that.
wysiwygsize.PNG
Many thanks for your continuous help.
Yves
Re: WYSIWYG size
Posted: Fri Jun 16, 2023 8:19 am
by kev1n
In MySQL, there are several text data types available for storing textual data. The commonly used text data types are:
1. TINYTEXT: It can store up to 255 characters.
2. TEXT: It can store up to 65,535 characters.
3. MEDIUMTEXT: It can store up to 16,777,215 characters.
4. LONGTEXT: It can store up to 4,294,967,295 characters.
It's important to note that the character limits mentioned above represent the maximum storage capacity for each data type. However, the actual amount of data that can be stored may be limited by other factors such as database configuration, available memory, and the maximum packet size for network communication.
Re: WYSIWYG size
Posted: Fri Jun 16, 2023 8:40 am
by yvesf
Thanks Kev1n for this information.
Nubuilder proposes a VARCHAR(100) to store WYSIWYG field which is not the right thing to do. You recommend to use those 4 different text data types and change the SQL request accordingly.
If I chose TEXT type, my SQL request will then become :
Code: Select all
ALTER TABLE 'fact' ADD 'fac_notes1' TEXT NULL DEFAULT NULL
How can I test the limit if the size field is bigger that expected ?
Many thanks,
Yves
Re: WYSIWYG size
Posted: Fri Jun 16, 2023 8:49 am
by kev1n
By setting the data type as "text," the maximum limit for character input is 65535, and exceeding this limit is not possible.
Re: WYSIWYG size
Posted: Fri Jun 16, 2023 10:53 pm
by yvesf
You can put more in the field than its limit. In that case, when you save, the content isn't saved without more information and you lose the content put in it.
Bad user experience, I would like to mitigate this situation.
How can I prevent this situation ?
Re: WYSIWYG size
Posted: Sun Jun 18, 2023 7:06 pm
by kev1n
Either modify the WYSIWYG editor to set a character limit
https://www.tiny.cloud/blog/set-character-count-limit/
Or use a data type that is large enough.
Re: WYSIWYG size
Posted: Sun Jun 18, 2023 10:09 pm
by yvesf
Thx, quite complex to put in place but ok. Ideally this should be configurés like this from scratch.
Re: WYSIWYG size
Posted: Mon Jun 19, 2023 8:05 am
by kev1n
The implementation of the character limit for the WYSIWYG editor has been added to our to-do list for inclusion in a future version.