Code Monkey home page Code Monkey logo

Comments (17)

iwinux avatar iwinux commented on August 25, 2024

I wonder if there is any way to exclude ckeditor files from being "compiled".

from ckeditor.

fusco avatar fusco commented on August 25, 2024

I think not, it's all or nothing

from ckeditor.

iwinux avatar iwinux commented on August 25, 2024

So I followed the author's suggestion instead: install it to public/assets

Then I can load it using javascript_include_tag "/assets/ckeditor/ckeditor.js"

One little problem: running rake assets:clean will delete the whole public/assets directory.

from ckeditor.

avitus avatar avitus commented on August 25, 2024

I am getting the same error message. I have ckeditor installed in /lib/assets/javascripts under Rails 3.1.1

Are you saying that it only works in /public ?

from ckeditor.

kostia avatar kostia commented on August 25, 2024

Hi there. I think the real problem is the broken CSS in appropriate file:

{filter:;}

As I know, it's not allowed to use colon directly followed by a semicolon.

A quick and dirty fix:

$ mkdir -p app/assets/ckeditor/skins/kama
$ cp editor.css.without_bad_filter_statement  app/assets/ckeditor/skins/kama/

Removing bad filter statements in VI: :%s/filter:;//g

from ckeditor.

houen avatar houen commented on August 25, 2024

Found an easier fix: Just swap the minified css files with the non-minified ones found in the _source directory. You just swap the entire directory:

cp -R app/assets/ckeditor/_source/skins/kama app/assets/ckeditor/skins/kama

Voila!

from ckeditor.

iwinux avatar iwinux commented on August 25, 2024

@houen Does it take a long time to compile the whole CKEditor lib? Seems to be a big thing.

from ckeditor.

 avatar commented on August 25, 2024

empty {filter:;} seems not to be valid. On TextMate open de gem folder, open editor.css and remove all filter:; using "Replace & Find"

@iwinux the compilation is made one time and is fast. Going to production you can make deployment by precompiling assets "rake assets:precompile"

from ckeditor.

brunomac avatar brunomac commented on August 25, 2024

same here:

Invalid CSS after "...h:60px;+margin:": expected pseudoclass or pseudoelement, was "2px 0;}.cke_ski..."
(in /home/vagrant/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/ckeditor-3.7.0.rc2/vendor/assets/javascripts/ckeditor/skins/kama/dialog.css)

:(

from ckeditor.

jperrine avatar jperrine commented on August 25, 2024

Is there a way to have this gem use local assets instead of the assets provided in the gem to work around this issue?

from ckeditor.

soulnafein avatar soulnafein commented on August 25, 2024

I get this problem after installing it in rails 3.2 and used as part of rails_admin

from ckeditor.

runlevel5 avatar runlevel5 commented on August 25, 2024

I find this more of sprockets issue. I think sprockets should take into consideration this filter syntax as it is still used by IE. Did I just say IE? (I know, please blame everything on IE ;) )

from ckeditor.

jbescoyez avatar jbescoyez commented on August 25, 2024

+1

from ckeditor.

keysen avatar keysen commented on August 25, 2024

I have the problem of @brunomac, I can't use my rails app in production mode :s, Anyone know how to fix it?

from ckeditor.

Rogerio avatar Rogerio commented on August 25, 2024

Same problem here

from ckeditor.

Rogerio avatar Rogerio commented on August 25, 2024

Sorry it was already solved. I've updated to latest version (3.7.3) and it's fixed now...

from ckeditor.

jomarquez avatar jomarquez commented on August 25, 2024

Hi, I am using ckeditor version 4.0.10 on ruby 2 and rails 4.
I am getting the folllowing error only when i precompile assets on production env. Am I missing something?

rake assets:precompile RAILS_ENV=production --trace
** Invoke assets:precompile (first_time)
** Invoke assets:environment (first_time)
** Execute assets:environment
** Invoke environment (first_time)
** Execute environment
** Execute assets:precompile
rake aborted!
Invalid CSS after "...on_icon{filter:": expected expression (e.g. 1px, bold), was "}.cke_menusepar..."
(in /home/jjohnson/.rvm/gems/ruby-2.0.0-p353@myApp/gems/ckeditor-4.0.10/app/assets/javascripts/ckeditor/override.js.erb)
(sass):6
/home/jjohnson/.rvm/gems/ruby-2.0.0-p353@myApp/gems/sass-3.2.12/lib/sass/scss/parser.rb:1146:in expected' /home/jjohnson/.rvm/gems/ruby-2.0.0-p353@myApp/gems/sass-3.2.12/lib/sass/script/lexer.rb:199:inexpected!'
/home/jjohnson/.rvm/gems/ruby-2.0.0-p353@myApp/gems/sass-3.2.12/lib/sass/script/parser.rb:471:in assert_expr' /home/jjohnson/.rvm/gems/ruby-2.0.0-p353@myApp/gems/sass-3.2.12/lib/sass/script/parser.rb:49:inparse'
/home/jjohnson/.rvm/gems/ruby-2.0.0-p353@myApp/gems/sass-3.2.12/lib/sass/scss/parser.rb:1021:in sass_script' /home/jjohnson/.rvm/gems/ruby-2.0.0-p353@myApp/gems/sass-3.2.12/lib/sass/scss/parser.rb:881:invalue!'
/home/jjohnson/.rvm/gems/ruby-2.0.0-p353@myApp/gems/sass-3.2.12/lib/sass/scss/parser.rb:858:in declaration' /home/jjohnson/.rvm/gems/ruby-2.0.0-p353@myApp/gems/sass-3.2.12/lib/sass/scss/parser.rb:581:inblock in declaration_or_ruleset'
/home/jjohnson/.rvm/gems/ruby-2.0.0-p353@myApp/gems/sass-3.2.12/lib/sass/scss/parser.rb:1122:in call' /home/jjohnson/.rvm/gems/ruby-2.0.0-p353@myApp/gems/sass-3.2.12/lib/sass/scss/parser.rb:1122:inrethrow'
/home/jjohnson/.rvm/gems/ruby-2.0.0-p353@myApp/gems/sass-3.2.12/lib/sass/scss/parser.rb:591:in declaration_or_ruleset' /home/jjohnson/.rvm/gems/ruby-2.0.0-p353@myApp/gems/sass-3.2.12/lib/sass/scss/parser.rb:553:inblock_child'
/home/jjohnson/.rvm/gems/ruby-2.0.0-p353@myApp/gems/sass-3.2.12/lib/sass/scss/parser.rb:542:in block_contents' /home/jjohnson/.rvm/gems/ruby-2.0.0-p353@myApp/gems/sass-3.2.12/lib/sass/scss/parser.rb:534:inblock'
/home/jjohnson/.rvm/gems/ruby-2.0.0-p353@myApp/gems/sass-3.2.12/lib/sass/scss/parser.rb:528:in ruleset' /home/jjohnson/.rvm/gems/ruby-2.0.0-p353@myApp/gems/sass-3.2.12/lib/sass/scss/parser.rb:552:inblock_child'
/home/jjohnson/.rvm/gems/ruby-2.0.0-p353@myApp/gems/sass-3.2.12/lib/sass/scss/parser.rb:545:in block_contents' /home/jjohnson/.rvm/gems/ruby-2.0.0-p353@myApp/gems/sass-3.2.12/lib/sass/scss/parser.rb:82:instylesheet'
/home/jjohnson/.rvm/gems/ruby-2.0.0-p353@myApp/gems/sass-3.2.12/lib/sass/scss/parser.rb:27:in parse' /home/jjohnson/.rvm/gems/ruby-2.0.0-p353@myApp/gems/sass-3.2.12/lib/sass/engine.rb:342:in_to_tree'
/home/jjohnson/.rvm/gems/ruby-2.0.0-p353@myApp/gems/sass-3.2.12/lib/sass/engine.rb:315:in _render' /home/jjohnson/.rvm/gems/ruby-2.0.0-p353@myApp/gems/sass-3.2.12/lib/sass/engine.rb:262:inrender'

Here is my rake task:
namespace :ckeditor do
desc 'Create nondigest versions of some ckeditor assets (e.g. moono skin png)'
task :create_nondigest_assets do
fingerprint = /-[0-9a-f]{32}./
for file in Dir['public/assets/ckeditor/contents-.css', 'public/assets/ckeditor/skins/moono/.png']
next unless file =~ fingerprint
nondigest = file.sub fingerprint, '.' # contents-0d8ffa186a00f5063461bc0ba0d96087.css => contents.css
FileUtils.cp file, nondigest, verbose: true
end
end
end

#auto run ckeditor:create_nondigest_assets after assets:precompile
Rake::Task['assets:precompile'].enhance do
Rake::Task['ckeditor:create_nondigest_assets'].invoke
end

and my assets/javascripts/application.js file
//= require ckeditor/override
//= require ckeditor/init
//= require ckeditor/config.js

from ckeditor.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.