images in ckeditor
This commit is contained in:
SDE
2023-09-22 15:14:16 +03:00
parent 4ec85b85cb
commit 9f2ec3e79f

View File

@@ -211,6 +211,9 @@ DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
CKEDITOR_BASEPATH = "/static/ckeditor/ckeditor/" CKEDITOR_BASEPATH = "/static/ckeditor/ckeditor/"
CKEDITOR_UPLOAD_PATH = "uploads/" CKEDITOR_UPLOAD_PATH = "uploads/"
CKEDITOR_RESTRICT_BY_DATE = False
CKEDITOR_RESTRICT_BY_USER = True
CKEDITOR_BROWSE_SHOW_DIRS = True
CKEDITOR_IMAGE_BACKEND = "pillow" CKEDITOR_IMAGE_BACKEND = "pillow"
@@ -222,12 +225,12 @@ CKEDITOR_CONFIGS = {
'default': { 'default': {
'height': 291, 'height': 291,
'width': '70vw', 'width': '70vw',
# 'filebrowserWindowHeight': 600, 'filebrowserWindowHeight': 600,
# 'filebrowserWindowWidth': "100%", 'filebrowserWindowWidth': "100%",
'toolbar': 'Custom', 'toolbar': 'Custom',
'forcePasteAsPlainText': True, 'forcePasteAsPlainText': True,
# 'allowedContent': True, 'allowedContent': True,
'disallowedContent': 'img{width,height};img[width,height]', # 'disallowedContent': 'img{width,height};img[width,height]',
# 'extraPlugins': 'image2', # 'extraPlugins': 'image2',
'enterMode': 2, 'enterMode': 2,