Hi Appian Developers (and Community of course),
I hope that somebody from the Apprian Dev Team could answer / provide info.
I'm using the Styled Text Editor Component component (a!styledTextEditorField) to display content stored as HTML (display only, no edit required).
I'm wondering that is the exact maximum allowable value for the Size limit parameter?
When I set 100K, it prompts "You reached the maximum character limit. Remove characters to continue." (it is an email conversation stored as html and it is expected to be large in size).
When I reduce it to 99K (set value for Size limit parameter to 99K), the error is gone.
Obviously, it lays somewhere between 99K and 100K but I would like to know what is the maximum allowed, to be able to display as much as possible of the text.
Or does it maybe depend on the encoding - single-byte/multi-byte?
However, the documentation states "... The parameter value is about equal to the number of characters allowed, including HTML formatting." - no mention of encoding.
In any case, I need info what is the maximum allowed, either in characters or bytes.
Thank You in advance for your time.
Regards,
Discussion posts and replies are publicly visible
100K is the limit including tags
Thank You all for your answers.
Even the maximum value for sizeLimit is 100K, the component in read-only mode will not accept text size greater then 99906 characters (or bytes, not sure - the text I tested is Latin1). As Mike suggested, I tested it by reducing the maximum size limit until I get to 99906.
I see now that my question was misleading and that it should be "What is the maximum text size a Styled Text Editor Component will accept without error".
I suppose, the component wraps the source text into an additional layer that is also counted into this 100K. This is probably what Mr. Soma suggested by "including the HTML tags" - as my text was already HTML, I didn't realize it immediately.
This is my code (that works) - when I increase the text size by 1, I get the error "You reached the maximum character limit...".
a!styledTextEditorField( readOnly: true, value: left(fv!item.HtmlBody, 99906) )
To be clear - there is no difference if I put a value for parameter sizeLimit - 100K seems as the default value when not explicitly set.
Habibija Safet said:Even the maximum value for sizeLimit is 100K, the component in read-only mode will not accept text size greater then 99906 characters
This is very easy to test and see why:
Habibija Safet said:100K seems as the default value when not explicitly set.
Lots of things have an "Extreme Cases" default, otherwise Appian would have never-ending support cases of people who accidentally crash their enviornments by pasting the contents of an entire book in the field then wondering why their server is suddenly on fire.
To be clear it is easily shown to hold exactly 100,000 characters with no complaints. With no linebreaks / paragraph breaks, the limit is affected only by the leading <p> tag and trailing </p> tag. Meaning if you really tried, you could squeeze 99,993 of your own characters into the field (but it'd be cramped with no whitespacing).
h/t "Blind Text Generator" for spitting out 100k characters of Lorem Ipsum text for me with no linebreaks and without crashing, lol.
I really tried and the maximum I was able to "squeze out" without the warning is 99906 characters (I didn't make the number up). As I already explained, I use the component for display only (read-only = true). I can only imagine that there is some difference how the component behaves in edit and read-only mode
OK
NOT OK
You might need to try with "leftb()" instead of "left()", to handle any characters that are more than 1 byte (unicode, certain other special characters perhaps, etc). In my examples above I started out with freshly-generated Lorum Ipsum text totalling exactly 100K characters and the total worked out to exactly the character count + the 7 characters required for "<p>" and "</p>". I of course have no way of knowing what's getting passed in from your html body input.
Already tried that - no difference