Comments (6)
Did you install refinerycms-wymeditor
after generating the app?
If yes, did you run this command ?
rails generate refinery:wymeditor
from refinerycms-wymeditor.
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.
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.
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.
You are right, i can reproduce your, let me check why it does not whitelist data attributes.
from refinerycms-wymeditor.
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)
- How to add color picker into refinerycms-wymeditor? HOT 4
- Installing gem overwrites the railties binstubs HOT 1
- It's not clear how to whitelist tags and attributes HOT 3
- Add Markdown support
- Option to disable keybinds for editor
- "Add link" is not working (after submit -nothing happens) HOT 1
- Only allow image upload, not image select
- How to add custom styles? HOT 1
- Live preview causes page to be unresponsive on large posts
- admin.js override different from real code custom_visual_editor_boot_options
- Validations for <audio> and<source>... HOT 1
- rails generate refinery:wymeditor returns undefined method `<<' for nil:NilClass (NoMethodError) HOT 6
- Some css styles are missing after upgrade on refinery 4.0.0 HOT 2
- Issue with WYM Editor in production HOT 1
- Cannot update to Rails 5.2.2 HOT 2
- Saving page results in Internal Server Error HOT 5
- Can we have a new release? HOT 2
- Not rendering on page edit
- Whitelisting custom elements? HOT 2
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 refinerycms-wymeditor.