Skip to content
New issue

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

Using DIV as tagName does not trim trailing newline #4123

Open
janekh opened this issue Apr 18, 2024 · 0 comments
Open

Using DIV as tagName does not trim trailing newline #4123

janekh opened this issue Apr 18, 2024 · 0 comments

Comments

@janekh
Copy link

janekh commented Apr 18, 2024

Trailing newline is not removed when blots/block tagName is replaced with DIV.
This check was added in 1fab1bd
But when you replace the tagName all delta ops will have attribute {block: true} and this check is not correct.

Steps for Reproduction

var Block = Quill.import("blots/block");
Block.tagName = "DIV";
Quill.register(Block, true);

Use HTML

<div>This is a test</div>

Expected behavior:

<div>This is a test</div>

Actual behavior:

<div>This is a test</div>
<div><br></div>

Platforms:

Windows Chrome, Windows Firefox, Mac Firefox, Mac Chrome

Version:

2.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant