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

When repeated style value is present, getFormat() returns empty object #3336

Closed
Dora1604 opened this issue Apr 14, 2021 · 0 comments
Closed

Comments

@Dora1604
Copy link
Contributor

Dora1604 commented Apr 14, 2021

Hi!
Firstly, thanks for the great editor. It helped me a lot in my current project.
I have noticed an unexpected behavior when detecting style format. When repeated style value is present, getFormat() returns an empty object.

For example, having html like this:

<span style="font-size:12px">Lo</span>
<span style="font-size:16px">re</span>
<span style="font-size:12px">m</span>

produces getFormat (with selected all html above) output :

Actual behavior

 {} 

Expected behavior

 {"fontSize": ["12px", "16px"] }

while html like this:

<span style="font-size:12px">Lo</span>
<span style="font-size:16px">re</span>

produces getFormat (with selected all html above) output:

{"fontSize": ["12px", "16px"]}

I think repeated style format should either be added multiple times or just once, but should not produce empty object output.

Platform

Windows 10, Edge version 89.0.774.75

Quill version

1.3.7.

Dora1604 pushed a commit to Dora1604/quill that referenced this issue Apr 14, 2021
Dora1604 pushed a commit to Dora1604/quill that referenced this issue Apr 14, 2021
@Dora1604 Dora1604 changed the title When repeated style value is present, getFormat() returns empty array When repeated style value is present, getFormat() returns empty object Apr 15, 2021
woochi added a commit to smartlyio/quill that referenced this issue Jun 3, 2022
woochi added a commit to smartlyio/quill that referenced this issue Jun 3, 2022
@jhchen jhchen closed this as completed in 2e138a0 Jun 10, 2022
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