You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In our current project, we want to validate our rich text editor value on both, front-end and back-end.
As a rich text editor, we use UUI component which uses slate.js under the hood.
But the problem I am telling can appear in any rich text editor (including editor.js)
If I find the solution with editor.js, I'll convince my team to use editor.js instead of slate.js based editor.
On front, we can set max character count (for example 5000 characters) and it's easy to validate text content.
The problem is, on backend, we can't rely on any reasonable number, because the size of generated JSON by Slate is highly depends on the number of formattings. At the same time, we don't want to save an unlimited amount of rich text on our DB.
Any ideas of how we can sync validation between front and backend?
Maybe editor.js has a solution for this kind of problem?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
In our current project, we want to validate our rich text editor value on both, front-end and back-end.
As a rich text editor, we use UUI component which uses slate.js under the hood.
But the problem I am telling can appear in any rich text editor (including editor.js)
If I find the solution with editor.js, I'll convince my team to use editor.js instead of slate.js based editor.
On front, we can set max character count (for example 5000 characters) and it's easy to validate text content.
The problem is, on backend, we can't rely on any reasonable number, because the size of generated JSON by Slate is highly depends on the number of formattings. At the same time, we don't want to save an unlimited amount of rich text on our DB.
Any ideas of how we can sync validation between front and backend?
Maybe editor.js has a solution for this kind of problem?
Beta Was this translation helpful? Give feedback.
All reactions