Open hert22 opened 3 years ago
The QUILL_CONFIG should be formatted like this...
QUILL_CONFIGS = { 'default': { 'theme': 'snow', 'modules': {
'imageResize': True,
'toolbar': [
[
{'font': []},
{'header': []},
{'align': []},
'bold', 'italic', 'underline', 'strike', 'blockquote',
{'color': []},
{'background': []},
],
['code-block', 'link'],
['clean'],
['link', 'image'],
['imageResize'],
],
}
}
}
I don't know why it changed
Hey, so I need to be able to adjust the size of images in the quill editor. I can successfully achieve this by having the following code in a script tag in my HTML and then calling it...
``
However, I'm using the QuillForm and QuillFieldForm so I can save them to a database which means in order to customize my toolbar I need to write the following code in my settings.py under the title QUILL_CONFIGS...
QUILL_CONFIGS = { 'default': { 'theme': 'snow', 'modules': { 'syntax': True, 'imageResize': { }, 'toolbar': [ [ {'font': []}, {'header': []}, {'align': []}, 'bold', 'italic', 'underline', 'strike', 'blockquote', {'color': []}, {'background': []}, ], ['code-block', 'link'], ['clean'], ['link', 'image'], ], } } }
The problem is that the resizing no longer works in the QUILL_CONFIGS.
I need help seeing if there is a way I can still use QuillForm and QuillFieldForm AND have the ability to resize images. Is this even the best way? Any help is much apreciated.