【发布时间】:2021-10-15 16:08:48
【问题描述】:
我正在使用 Django-CKEditor 作为我的一个应用程序的富文本编辑器。
问题在于 Heroku 上的 Media Embed 插件。
当我在媒体嵌入选项中插入任何 URL 时,它在我的本地环境中运行良好。但是当我在部署的应用程序(在 Heroku 上)中插入 URL 时,它显示了一个 - “无法获取给定 url 的内容。” 错误。
有人知道为什么会这样吗?
这是我在 settings.py 文件中的 CKEDITOR 配置。
CKEDITOR_CONFIGS = {
'default': {
'toolbar': 'Custom',
'width': 'auto',
'toolbar_Custom': [
["Format", "Bold", "Italic", "Underline", "Strike", "SpellChecker"],
['NumberedList', 'BulletedList', "Indent", "Outdent", 'JustifyLeft', 'JustifyCenter',
'JustifyRight', 'JustifyBlock'],
["Image", "Table", "Link", "Unlink", "Anchor",
"SectionLink", "Embed"], ['Undo', 'Redo'], ["CodeSnippet"],
["Maximize"]
],
# Remove these dialog tabs (semicolon separated dialog:tab)
'removeDialogTabs': ';'.join([
'image:advanced',
'image:Link',
'link:upload',
'table:advanced',
#'tableProperties:advanced',
]),
# Extra plugins to be used in the editor
'extraPlugins': ','.join([
'mathjax', # Used to render mathematical formulae
'codesnippet', # Used to add code snippets
'image2', # Loads new and better image dialog
'embed', # Used for embedding media (YouTube/Slideshare etc)
'tableresize', # Used to allow resizing of columns in tables
]),
}
}
【问题讨论】:
标签: django heroku ckeditor django-ckeditor