Comments (17)
I wonder if there is any way to exclude ckeditor files from being "compiled".
from ckeditor.
I think not, it's all or nothing
from ckeditor.
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.
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.
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.
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.
@houen Does it take a long time to compile the whole CKEditor lib? Seems to be a big thing.
from ckeditor.
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.
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.
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.
I get this problem after installing it in rails 3.2 and used as part of rails_admin
from ckeditor.
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.
+1
from ckeditor.
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.
Same problem here
from ckeditor.
Sorry it was already solved. I've updated to latest version (3.7.3) and it's fixed now...
from ckeditor.
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:in
expected!'
/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:in
parse'
/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:in
value!'
/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:in
block 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:in
rethrow'
/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:in
block_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:in
block'
/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:in
block_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:in
stylesheet'
/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:in
render'
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)
- Error "undefined method `size' for nil:NilClass" HOT 1
- Can't install additional plugins HOT 8
- ckeditor version security vulnerabilities HOT 1
- Setting image size with default image uploader
- ckeditor not rendering in heroku HOT 2
- Wrong asset path being requested HOT 9
- How can I save width and height of images uploaded with CarrieWave? HOT 1
- ActiveStorageValidations gem not working on Ckeditor assets
- delete
- It may be that this problem is in the gem ckeditor ? Images saved using ActiveStorage are different in environments. HOT 2
- undefined method `assets_languages=' for Ckeditor:Module (NoMethodError) Did you mean? asset_path= HOT 1
- image didn't show on staging [ rails4.2 + paperclip5.0.0+ ckeditor(5.1.1)]
- How to use with ActiveStorage+AWS?
- Trying to add 'lineheight' pluggin HOT 1
- Alternative for ckeditor_before_create_asset
- CKEditor4 reached its End-of-Life in June 2023 HOT 8
- Shrine templates are missing
- In gem ckeditor v5.1.2: app/assets/config/manifest.js overrides main manifest.js application configuration (Rails 7.1.3.4) HOT 3
- Getting warning this CKEditor 4.11.3 version is not secure HOT 3
- Any plans to support ruby 3+? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ckeditor.