CKEditor gem删除缓存的文件 [英] CKEditor gem delete cached files

查看:200
本文介绍了CKEditor gem删除缓存的文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用ckeditor gem已经有一段时间了,我只是注意到,如果我更改config.js,实际上并不会更改浏览器中的任何内容。我在那里做了很多更改,直到现在为止一切正常。突然之间,如果我进行任何更改,它将使用必须缓存在某处的旧文件。

I am using the ckeditor gem for quite a while now and I just noticed that if I change my config.js it doesn't actually change anything in the browser. I made a lot of changes in there and it worked fine until now. All of the sudden if I change anything it uses the old files that must be cached somewhere.

我尝试删除预编译的资产并重新进行预编译,删除浏览器中的缓存...

I tried deleting precompiled assets and re-precompile them, deleting cache on the browser...

是这是一个宝石问题,还是我只是缺少什么?

Is this a gem problem or am I just missing something?

我的config.js:

My config.js:

CKEDITOR.editorConfig = function( config )
{
config.extraPlugins = 'symbol,mathjax,widget,lineutils,mark_code,simpleuploads,help_me';

config.scayt_autoStartup = true;

config.extraCss += "body{font-family:'lato', Georgia;}";

config.width = 'auto';
config.height = '300';

config.language = 'en';

config.magicline_everywhere=true;

config.allowedContent = true;

config.coreStyles_superscript = {
    element: 'sup',
    attributes: { 'style': 'vertical-align: top; font-size: 0.8em;' },
    overrides: 'sup'
};

config.pasteFromWordPromptCleanup = true;
config.pasteFromWordRemoveFontStyles = true;
config.forcePasteAsPlainText = true;
config.ignoreEmptyParagraph = true;
config.removeFormatAttributes = true;

config.filebrowserImageUploadUrl = "/ckeditor/pictures";
config.filebrowserUploadUrl = "/ckeditor/attachment_files";
config.simpleuploads_maxFileSize = 6000000;

config.simpleuploads_acceptedExtensions = "jpe?g|png|gif|pdf|doc|docx|odt|ods|xls";
config.simpleuploads_imageExtensions = 'jpe?g|gif|png';

config.enterMode = CKEDITOR.ENTER_P;

config.format_tags = 'p';

config.toolbar =
    [
        { name: 'basicstyles', items : [ 'Bold','Italic','Strike','-','-','Subscript','Superscript' ] },
        { name: 'paragraph', items : [ 'NumberedList','BulletedList','-','Blockquote' ] },
        { name: 'insert', items : ['addImage','addFile','-','simple_links','simple_link_images','oembed','-','Symbol','Mathjax','mark_code'] },
        { name: 'other', items : ['help_me','Maximize'] }
    ];
};

CKEDITOR.on( 'dialogDefinition', function( ev )
{
ev.data.definition.resizable = CKEDITOR.DIALOG_RESIZE_NONE;
});


推荐答案

我遇到了同样的问题。放入

I had the same problem. Putting

<script type="text/javascript">
  CKEDITOR.timestamp = 'anything random';
</script>

在application.html.erb中,然后javascript包含标签为我解决了

in the application.html.erb before javascript include tags solved it for me

这篇关于CKEditor gem删除缓存的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆