【发布时间】:2019-08-03 23:52:38
【问题描述】:
我在设置和模型中做了以下操作:
settings.py
CKEDITOR_CONFIGS = {
'special': {
'toolbar': 'Special',
'toolbar_Special': [
['Styles', 'Format', 'Bold', 'Italic', 'Underline', 'Strike', 'SpellChecker', 'Undo'],
['Link', 'Unlink', 'Anchor'],
['Image', 'Flash', 'Table', 'HorizontalRule'],
['TextColor', 'BGColor'],
['Smiley', 'SpecialChar'], ['Source'],
],
'extraPlugins': 'youtube',
}
}
models.py
class Post(models.Model):
user = models.ForeignKey(settings.AUTH_USER_MODEL,on_delete=models.CASCADE,null=True,blank=True)
post = RichTextUploadingField(blank=True, null=True,
config_name='special',
external_plugin_resources=[(
'youtube',
'/static/ckeditor/ckeditor/plugins/youtube_2.1.13/youtube/',
'plugin.js',
)],
)
date = models.DateTimeField(auto_now_add=True)
我想在我的 ckeditor 中添加 youtube 插件。我已经从https://ckeditor.com/cke4/addon/youtube下载了。
谁能找出我代码中的问题?
谢谢
【问题讨论】: