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

Add align text in Quill Editor #125

Merged
merged 1 commit into from
Sep 27, 2023
Merged

Conversation

laurajaime
Copy link
Contributor

Captura de pantalla de 2023-09-21 17-27-09

Copy link
Contributor

@tramuntanal tramuntanal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I imagine it is not possible to simply set quill.formats= quillFormats; after this file.

Overriding the createQuillEditor(container) function. Something like:

import createQuillEditor from `decidim_awersom/editors`
const quillFormats = ["bold", "italic", "link", "underline", "header", "list", "video", "image", "alt", "break", "width", "style", "code", "blockquote", "indent",
  // START DIBA CUSTOMIZATION
  "align"
  // END DIBA CUSTOMIZATION
];
const quill= createQuillEditor(container);
quill.formats= quillFormats;

But now I think it won't be possible. So LGTM

@laurajaime
Copy link
Contributor Author

laurajaime commented Sep 27, 2023

I imagine it is not possible to simply set quill.formats= quillFormats; after this file.

Overriding the createQuillEditor(container) function. Something like:

import createQuillEditor from `decidim_awersom/editors`
const quillFormats = ["bold", "italic", "link", "underline", "header", "list", "video", "image", "alt", "break", "width", "style", "code", "blockquote", "indent",
  // START DIBA CUSTOMIZATION
  "align"
  // END DIBA CUSTOMIZATION
];
const quill= createQuillEditor(container);
quill.formats= quillFormats;

But now I think it won't be possible. So LGTM

There are more customization than this line and is more complex than override the formats. I try but logic in JS is crazy....and not works

@tramuntanal tramuntanal merged commit 0364ccd into master Sep 27, 2023
5 checks passed
@tramuntanal tramuntanal deleted the feat/newsletter/justify_text branch September 27, 2023 12:51
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

Successfully merging this pull request may close these issues.

2 participants