Thanks.
I feel like there is a better way to do this.
Any tips?
function lengthLimit(tr: Transaction): boolean {
return (tr.startState?.doc?.length + tr.changes?.inserted?.length) < MAX_LENGTH;
}
Thanks.
I feel like there is a better way to do this.
Any tips?
function lengthLimit(tr: Transaction): boolean {
return (tr.startState?.doc?.length + tr.changes?.inserted?.length) < MAX_LENGTH;
}