GithubHelp home page GithubHelp logo

Comments (6)

bricesanchez avatar bricesanchez commented on July 17, 2024

Did you install refinerycms-wymeditor after generating the app?

If yes, did you run this command ?

rails generate refinery:wymeditor

from refinerycms-wymeditor.

kreker92 avatar kreker92 commented on July 17, 2024

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

from refinerycms-wymeditor.

bricesanchez avatar bricesanchez commented on July 17, 2024

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?

from refinerycms-wymeditor.

kreker92 avatar kreker92 commented on July 17, 2024

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.

from refinerycms-wymeditor.

bricesanchez avatar bricesanchez commented on July 17, 2024

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

from refinerycms-wymeditor.

bricesanchez avatar bricesanchez commented on July 17, 2024

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

from refinerycms-wymeditor.

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.