django-quill-editor icon indicating copy to clipboard operation
django-quill-editor copied to clipboard

Text align center does not work

Open YasineNifa opened this issue 1 year ago • 3 comments

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 ?

YasineNifa avatar Mar 08 '24 15:03 YasineNifa

Nothing is working Now its a garbage

ALEXDINO7 avatar Jun 29 '24 12:06 ALEXDINO7

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

enzedonline avatar Jul 08 '24 00:07 enzedonline

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.

plmrn avatar Aug 13 '24 15:08 plmrn