Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Text align center does not work #127

Open
YasineNifa opened this issue Mar 8, 2024 · 3 comments
Open

Text align center does not work #127

YasineNifa opened this issue Mar 8, 2024 · 3 comments

Comments

@YasineNifa
Copy link

The alignment settings function properly within the editor, but upon displaying the content of the QuillField, the styling does not carry over. Despite observing that the

tag has the class ".ql-align-center" when I inspect the page, the text still appears aligned to the left of the page.
Is it an issue with django-quill-editor or I am missing something ?

@ALEXDINO7
Copy link

Nothing is working Now its a garbage

@enzedonline
Copy link

Works fine. If you see ".ql-align-center" and it has no effect, it likely means you don't have the quill css loaded.

@plmrn
Copy link

plmrn commented Aug 13, 2024

Might be a bit late to the party but just in case this could help
The issue comes from the fact that the classes "ql-align-right" and equivalent are all contained within a .ql-editor mother class on the quill css file.
So from what I gather it's a Quill "issue" rather than a django-quill one.

Several ways to address that:

  • when displaying a quill field, add a "ql-editor" class to a div containing tag (cons: you have the full .ql-editor styling applied to it and maybe stuff you wouldn't want to apply)
  • you can also declare ql-align-right and the other pertinent ones in your own CSS, with the !important tag on the style instructions (cons: you might miss some ql classes in the process)

If anybody has a better idea let me know.

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

No branches or pull requests

4 participants