diff --git a/src/index.tsx b/src/index.tsx index f83a11db..1247a5e5 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -530,7 +530,7 @@ class ReactQuill extends React.Component { this.lastDeltaChangeSet = delta; this.value = nextContents; - this.props.onChange?.(value, delta, source, editor); + this.props.onChange?.(value?.replace(/(^([ ]*


<\/p>)*)|((


<\/p>)*[ ]*$)/gi, '').trim(), delta, source, editor); } }