Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dont have config files #36

Closed
kreker92 opened this issue Jul 6, 2016 · 6 comments
Closed

dont have config files #36

kreker92 opened this issue Jul 6, 2016 · 6 comments

Comments

@kreker92
Copy link

kreker92 commented Jul 6, 2016

I dont have any wymeditor files for editing white list tags

Gemfile:

gem 'refinerycms', '~> 3.0'
gem 'refinerycms-i18n'
gem 'refinerycms-blocks', :git => 'https://site.com/git/refinerycms-blocks'

gem 'refinerycms-acts-as-indexed', ['~> 2.0', '>= 2.0.1']
gem 'refinerycms-wymeditor', ['~> 1.0', '>= 1.0.6']
gem 'refinerycms-authentication-devise', '~> 1.0'
gem 'refinerycms-blog', git: 'https://github.com/refinery/refinerycms-blog', branch: 'master'
gem 'refinerycms-search', github: 'refinery/refinerycms-search', branch: 'master'
gem 'refinerycms-page-images', '~> 3.0.0', github: "refinery/refinerycms-page-images", branch: "master"

In Gemfile.lock:

refinerycms-wymeditor (1.0.7)
      refinerycms-core (>= 3.0.0, < 5.0)

DEPENDENCIES
  refinerycms-wymeditor (~> 1.0, >= 1.0.6)
@bricesanchez
Copy link
Collaborator

Did you install refinerycms-wymeditor after generating the app?

If yes, did you run this command ?

rails generate refinery:wymeditor

@kreker92
Copy link
Author

kreker92 commented Jul 7, 2016

Yes, I've added this gem after generation the app.
I'm runing it but, I dont know why, nothing is heppening. Process is not finishing.
I've install clean refinery, then launch rails generate refinery:wymeditor wymeditor. It says that installing just creates file config/initializers/refinery/wymeditor.rb
I've copied it to my real project and insert:

# encoding: utf-8
Refinery::Wymeditor.configure do |config|
  # Add extra tags to the wymeditor whitelist e.g. = {'tag' => {'attributes' => {'1' => 'href'}}} or just {'tag' => {}}
  config.whitelist_tags = {"li"=>{"attributes"=>{"1"=>"data-slide-id"}}}
end

And it still doesnt work

@bricesanchez
Copy link
Collaborator

bricesanchez commented Jul 7, 2016

What is your version of refinerycms ?

3.0.4 (unreleased) whitelist all data attributes in frontend :
refinery/refinerycms#3187

So you can use the 3-0-stable branch :

gem 'refinerycms', git: 'https://github.com/refinery/refinerycms', branch: '3-0-stable'

Is this fix your problem?

@kreker92
Copy link
Author

kreker92 commented Jul 13, 2016

No, its not.
I've installed refinery on new clean rails project. Install wymeditor too.
Gemfile:

gem 'refinerycms', git: 'https://github.com/refinery/refinerycms', branch: '3-0-stable'
gem 'refinerycms-i18n'
gem 'refinerycms-blocks', :git => 'https://site.com/git/refinerycms-blocks'

# Optionally, specify additional Refinery CMS Extensions here:
gem 'refinerycms-acts-as-indexed', ['~> 2.0', '>= 2.0.1']
gem 'refinerycms-wymeditor', ['~> 1.0', '>= 1.0.6']
gem 'refinerycms-authentication-devise', '~> 1.0'
gem 'refinerycms-blog', git: 'https://github.com/refinery/refinerycms-blog', branch: 'master'
#  gem 'refinerycms-inquiries', ['~> 3.0', '>= 3.0.0']
gem 'refinerycms-search', github: 'refinery/refinerycms-search', branch: 'master'
gem 'refinerycms-page-images', '~> 3.0.0', github: "refinery/refinerycms-page-images", branch: "master"

I've installed wymeditor and else gems who need it. Now I have config file config/initializers/refinery/wymeditor.rb
It contents:

# encoding: utf-8
Refinery::Wymeditor.configure do |config|
  # Add extra tags to the wymeditor whitelist e.g. = {'tag' => {'attributes' => {'1' => 'href'}}} or just {'tag' => {}}
  config.whitelist_tags = {'li' => {'attributes' => {'1' => 'data-slide-id'}}}
end

And I have result:
<li data-slide-id="slide1">qwe</li>
But when I insert real content it has strange thing:

<ul>
  <li class="active"> slide1</li>
  <li data-slide-id="slide2">slide2 </li>
  <li data-slide-id="slide3">slide3 </li>
</ul>

Attribute class removes data-slide-id.

Trying to add class to white list doesn't helps.

@bricesanchez
Copy link
Collaborator

You are right, i can reproduce your, let me check why it does not whitelist data attributes.

@bricesanchez
Copy link
Collaborator

Could you temporary test this branch to see if it fixes your problem ?

gem 'refinerycms', github: 'refinery/refinerycms', branch: 'bugfix/allow-data-attr-3-0-rebase'

Please continue this discussion in the pull request: refinery/refinerycms#3217

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants