Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

WYSIWYG size Topic is solved

Questions related to using nuBuilder Forte.
Post Reply
yvesf
Posts: 315
Joined: Sun Mar 14, 2021 8:48 am
Location: Geneva
Has thanked: 87 times
Been thanked: 11 times

WYSIWYG size

Unread post 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
You do not have the required permissions to view the files attached to this post.
kev1n
nuBuilder Team
Posts: 4294
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 444 times
Contact:

Re: WYSIWYG size

Unread post 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.
yvesf
Posts: 315
Joined: Sun Mar 14, 2021 8:48 am
Location: Geneva
Has thanked: 87 times
Been thanked: 11 times

Re: WYSIWYG size

Unread post 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
kev1n
nuBuilder Team
Posts: 4294
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 444 times
Contact:

Re: WYSIWYG size

Unread post by kev1n »

By setting the data type as "text," the maximum limit for character input is 65535, and exceeding this limit is not possible.
yvesf
Posts: 315
Joined: Sun Mar 14, 2021 8:48 am
Location: Geneva
Has thanked: 87 times
Been thanked: 11 times

Re: WYSIWYG size

Unread post 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 ?
kev1n
nuBuilder Team
Posts: 4294
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 444 times
Contact:

Re: WYSIWYG size

Unread post 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.
yvesf
Posts: 315
Joined: Sun Mar 14, 2021 8:48 am
Location: Geneva
Has thanked: 87 times
Been thanked: 11 times

Re: WYSIWYG size

Unread post by yvesf »

Thx, quite complex to put in place but ok. Ideally this should be configurés like this from scratch.
kev1n
nuBuilder Team
Posts: 4294
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 444 times
Contact:

Re: WYSIWYG size

Unread post 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.
Post Reply