Remaining character count is not correct when editing, causing a confusing error message #909
Labels
area: html/css/js
Changes to front-end code
area: ruby
Changes to server-side code
complexity: unassessed
Needs further developer investigation before complexity/feasibility can be determined.
priority: medium
type: bug
Something isn't working
https://meta.codidact.com/posts/287292
A user edited a post and got the "max post length is 30,000 characters" error message, but according to the character count shown at the bottom of the post edit box, the count was below that limit. An answer there suspects that the length that triggers the error is the rendered HTML, while what the editor's stat is based on is the markdown source.
This is confusing. Are we able to unify these? I don't know the performance considerations, but if the editor is rendering the preview anyway, can we get its HTML's size and show that in the counter? Or, alternatively, can we base the limit on the size of the markdown source, and if we're storing the HTML in the database too, pad that field some to account for HTML bloat?
Related: if we do the check against the rendered HTML, it would also address https://meta.codidact.com/posts/290859 .
The text was updated successfully, but these errors were encountered: