目前我使用CKeditor来允许用户写好看的帖子。现在,当我尝试集成图像选项时,我只希望用户上传图像,当我点击图像符号时,它显示:ImageInfo(让用户从服务器文件夹中选择图像(,Link用于网络图像,upload打开文件浏览器,让用户选择自己的图像,以及Advanced,我对此一无所知。
我只希望用户能够从他的电脑上传图像。如何停用其他属性?这是我在settings.py:中的配置
CKEDITOR_CONFIGS = {
'default': {
'width': '150%',
'toolbar': 'Custom',
# Specify Custom Shit - GPL License -
'toolbar_Custom': [
['Bold', 'Italic', 'Underline', '-', 'Image', 'Link', 'CodeSnippet', '-', 'NumberedList', 'BulletedList', 'HorizontalRule', '-', 'Undo', 'Redo'],
], 'extraPlugins': 'codesnippet'
}
}
您可以使用removeDialogTabs删除选项卡,如下所述:
https://stackoverflow.com/a/47260647/14507752
CKEDITOR_CONFIGS = {
'default': {
'width': '150%',
'toolbar': 'Custom',
# Specify Custom Shit - GPL License -
'toolbar_Custom': [
['Bold', 'Italic', 'Underline', '-', 'Image', 'Link', 'CodeSnippet', '-', 'NumberedList', 'BulletedList', 'HorizontalRule', '-', 'Undo', 'Redo'],
], 'extraPlugins': 'codesnippet'
# Remove Dialog Tabs
'removeDialogTabs': 'image:advanced;image:Link',
}
}