Spree editor relies on ckeditor gem, they added activestorage support only since last month, and it isn't within a release yet...
So I'd suggest to fork the spree_editor gem and update ckeditor dependency to
s.add_dependency 'ckeditor', '~> 5.0.0'
And then, in your Gemfile, use the version of ckeditor that adds Active Storage support:
gem 'ckeditor', github: 'galetahub/ckeditor', branch: 'master', ref: '4385f23b90f84c25f7b912bd75c233c8f27b5f58'
They removed the init.js.erb file... so that solution works if you use the CDN. And it will allow you to easily update ckeditor through your initializer file.
And that's should be it.
We can't do a pull request until ckeditor has released a new official version supporting active storage. But as soon as ckeditor gem will have a new official release supporting active support, creating a PR would be a good thing to do for this gem ^^
Spree editor relies on ckeditor gem, they added activestorage support only since last month, and it isn't within a release yet...
So I'd suggest to fork the spree_editor gem and update ckeditor dependency to
s.add_dependency 'ckeditor', '~> 5.0.0'
And then, in your Gemfile, use the version of ckeditor that adds Active Storage support:
gem 'ckeditor', github: 'galetahub/ckeditor', branch: 'master', ref: '4385f23b90f84c25f7b912bd75c233c8f27b5f58'
After bundle install, run the generator:
You will also have to update the following things in your own spree_editor version or in your spree app:
In
config/initializers/ckeditor.rb
, you have to add these lines:In
app/views/shared/editor_engine/_ck_editor.html.erb
replace:By:
And then in ckeditor/config.js:
They removed the init.js.erb file... so that solution works if you use the CDN. And it will allow you to easily update ckeditor through your initializer file.
And that's should be it.
We can't do a pull request until ckeditor has released a new official version supporting active storage. But as soon as ckeditor gem will have a new official release supporting active support, creating a PR would be a good thing to do for this gem ^^