STATIC_URL = "static/"
STATIC_ROOT = BASE_DIR / "static"
STATICFILES_DIRS = [BASE_DIR / "staticfiles"]
MEDIA_URL = "media/"
MEDIA_ROOT = BASE_DIR / "media"
ckeditor config:
CKEDITOR_5_CONFIGS = {
'extends': {
'toolbar': {
'items': [
'undo', 'redo', '|', 'selectAll', 'findAndReplace', '|', 'heading', '|', 'fontSize', 'fontColor',
'fontBackgroundColor', '|', 'bold', 'italic', 'underline', 'strikethrough', 'subscript', 'superscript',
'highlight', '|', 'link', 'insertImage', 'mediaEmbed', 'fileUpload', 'insertTable', '|',
'blockQuote', 'specialCharacters', 'horizontalLine', '|', 'alignment', 'bulletedList', 'numberedList',
'outdent', 'indent', 'removeFormat'
],
'shouldNotGroupWhenFull': True
},
'fontSize': {
'options': [10, 12, 14, 'default', 18, 20, 22],
'supportAllValues': True
},
'heading': {
'options': [
{
'model': 'paragraph',
'title': 'Paragraph',
'class': 'ck-heading_paragraph'
},
{
'model': 'heading1',
'view': 'h1',
'title': 'Heading 1',
'class': 'ck-heading_heading1'
},
{
'model': 'heading2',
'view': 'h2',
'title': 'Heading 2',
'class': 'ck-heading_heading2'
},
{
'model': 'heading3',
'view': 'h3',
'title': 'Heading 3',
'class': 'ck-heading_heading3'
},
{
'model': 'heading4',
'view': 'h4',
'title': 'Heading 4',
'class': 'ck-heading_heading4'
},
{
'model': 'heading5',
'view': 'h5',
'title': 'Heading 5',
'class': 'ck-heading_heading5'
},
{
'model': 'heading6',
'view': 'h6',
'title': 'Heading 6',
'class': 'ck-heading_heading6'
}
]
},
'htmlSupport': {
'allow': [
{
'name': '/^.*$/',
'styles': True,
'attributes': True,
'classes': True
}
]
},
'image': {
'toolbar': [
'toggleImageCaption', 'imageTextAlternative', '|', 'imageStyle:inline', 'imageStyle:wrapText',
'imageStyle:breakText', '|', 'resizeImage'
]
},
'link': {
'addTargetToExternalLinks': True,
'defaultProtocol': 'https://',
'decorators': {
'toggleDownloadable': {
'mode': 'manual',
'label': 'Downloadable',
'attributes': {
'download': 'file'
}
}
}
},
'list': {
'properties': {
'styles': True,
'startIndex': True,
'reversed': True
}
},
'placeholder': 'Type something',
'table': {
'contentToolbar': ['tableColumn', 'tableRow', 'mergeTableCells', 'tableProperties', 'tableCellProperties']
},
}
}
django-ckeditor-5 version: 0.2.13