DjangoUeditor icon indicating copy to clipboard operation
DjangoUeditor copied to clipboard

楼主确定 images/%(basename)s_%(datetime)s.%(extname) 做imagePath可用 ?

Open quqiufeng opened this issue 11 years ago • 1 comments

注意:如果imagePath值只设置文件夹,则未尾要有"/" imagePath可以按python字符串格式化:如"images/%(basename)s_%(datetime)s.%(extname)"。这样如果上传test.png,则文件会 被保存为"{{MEDIA_ROOT}}/images/test_20140625122399.png"。

我这里报错 提示 incomplete format

检查后发现后面少了一个 s 应该是 images/%(basename)s_%(datetime)s.%(extname)s

quqiufeng avatar Oct 21 '14 09:10 quqiufeng

ueditor.html 中 形如 elementPathEnabled:false 被转换成了 elementPathEnabled:'false' 因而无效

只能写死了 {{UEditor.commands|safe}} var config ={{ UEditor.settings|safe }}; config.elementPathEnabled = false; #去掉元素路径 config.wordCount = false; #去掉字数统计 var {{ UEditor.id }} = UE.getEditor('{{ UEditor.id }}',config); {{ UEditor.id }}.ready(function(){ {{ UEditor.bindEvents|safe }} });

quqiufeng avatar Oct 21 '14 12:10 quqiufeng