We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In applyDelta, if a block embed is inserted to the middle of a line, the implicitly added \n cause the deletion happens at a wrong position.
applyDelta
\n
Steps for Reproduction
The following test case fails:
it('deletes text and appends block embed', function() { const editor = this.initialize(Editor, `<p><br></p><p>abc</p>`); editor.applyDelta( new Delta() .retain(2) .insert({ video: '#' }) .delete(2), ); expect(this.container).toEqualHTML( '<p><br></p><p>a</p><iframe class="ql-video" frameborder="0" allowfullscreen="true" src="#"></iframe><p><br></p>', ); });
Expected behavior:
The result is <p><br></p><p>a</p><iframe class="ql-video" frameborder="0" allowfullscreen="true" src="#"></iframe><p><br></p>.
<p><br></p><p>a</p><iframe class="ql-video" frameborder="0" allowfullscreen="true" src="#"></iframe><p><br></p>
Actual behavior:
The result is <p><br></p><p>a</p><p>c</p>
<p><br></p><p>a</p><p>c</p>
Platforms:
Chrome v103.
Version:
2.0.0-dev.4
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
In
applyDelta
, if a block embed is inserted to the middle of a line, the implicitly added\n
cause the deletion happens at a wrong position.Steps for Reproduction
The following test case fails:
Expected behavior:
The result is
<p><br></p><p>a</p><iframe class="ql-video" frameborder="0" allowfullscreen="true" src="#"></iframe><p><br></p>
.Actual behavior:
The result is
<p><br></p><p>a</p><p>c</p>
Platforms:
Chrome v103.
Version:
2.0.0-dev.4
The text was updated successfully, but these errors were encountered: