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

Exception: An unknown alignment "left" has been detected. #84

Closed
jayeshindianic opened this issue Mar 12, 2024 · 4 comments
Closed

Exception: An unknown alignment "left" has been detected. #84

jayeshindianic opened this issue Mar 12, 2024 · 4 comments

Comments

@jayeshindianic
Copy link

jayeshindianic commented Mar 12, 2024

Bug Description
When i try to convert quill delta to html its throw Exception

Exception: An unknown alignment "left" has been detected.

Bug reproduce
its happening only when data is empty with left alignment ex:
[{"insert":"\n", "attributes":{"align": "left"}},{"insert":" \n"}]

@nadar
Copy link
Owner

nadar commented Mar 12, 2024

hi @jayeshindianic it seems that left is not valid, it must be: ['center', 'right', 'justify'];

https://github.com/nadar/quill-delta-parser/blob/master/src/listener/Align.php#L21

left is like "no alignment", so i would say we should accept this value?

@nadar
Copy link
Owner

nadar commented Mar 12, 2024

You have closed the issue, so i won't change anything, right? :-)

@jayeshindianic
Copy link
Author

You have closed the issue, so i won't change anything, right? :-)

I have removed left align button from my editor, but its best if you also allows left alignment in future so it not failed.

@nadar
Copy link
Owner

nadar commented Mar 13, 2024

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

2 participants