Closed amandameng closed 7 years ago
gem 'rails', '~> 3.0.10' gem 'rails_kindeditor', '~> 0.2.8' gem 'carrierwave', '~> 0.5.8'
view 6: <%= form_for @page, :url => page_path(@page.title) do |f| %> 7:
layout <%= javascript_include_tag 'kindeditor/kindeditor-min.js', 'kindeditor/kindeditor-init.js' %>
What did I miss?
I end up with using plain JS code.
$(function() { var editor = KindEditor.create('textarea[class="page_content"]', { uploadJson: '/kindeditor/upload', allowFileManager: true, langType : 'en', resizeMode : 1, width : "1000px", height: "600px" });
})
Can you give me a clue why the helper method not working?
Do you run the install generator?
rails generate rails_kindeditor:install
and we don't need this anymore:
<%= javascript_include_tag 'kindeditor/kindeditor-min.js', 'kindeditor/kindeditor-init.js' %>
please follow the instuctions in README.md, then feedback the details.
@Macrow I did run that, this copied javascripts to the public folder. I'm using 3.0.10, there's no assets. If don't include js like below, then how? <%= javascript_include_tag 'kindeditor/kindeditor-min.js', 'kindeditor/kindeditor-init.js' %>
Please use rails_kindeditor v0.2.8 for Rails v3.0.x
https://github.com/Macrow/rails_kindeditor/tree/v0.2.8
Upgrade your rails is recommanded.
gem 'rails_kindeditor', '~> 0.2.8'
It's the version I used.
Yeah, I think upgrade is great.
gem 'rails', '~> 3.0.10' gem 'rails_kindeditor', '~> 0.2.8' gem 'carrierwave', '~> 0.5.8'
view 6: <%= form_for @page, :url => page_path(@page.title) do |f| %> 7:
layout <%= javascript_include_tag 'kindeditor/kindeditor-min.js', 'kindeditor/kindeditor-init.js' %>
What did I miss?
I end up with using plain JS code.
$(function() { var editor = KindEditor.create('textarea[class="page_content"]', { uploadJson: '/kindeditor/upload', allowFileManager: true, langType : 'en', resizeMode : 1, width : "1000px", height: "600px" });
})
Can you give me a clue why the helper method not working?
Do you run the install generator?
and we don't need this anymore:
please follow the instuctions in README.md, then feedback the details.
@Macrow I did run that, this copied javascripts to the public folder. I'm using 3.0.10, there's no assets. If don't include js like below, then how? <%= javascript_include_tag 'kindeditor/kindeditor-min.js', 'kindeditor/kindeditor-init.js' %>
Please use rails_kindeditor v0.2.8 for Rails v3.0.x
https://github.com/Macrow/rails_kindeditor/tree/v0.2.8
Upgrade your rails is recommanded.
gem 'rails_kindeditor', '~> 0.2.8'
It's the version I used.
Yeah, I think upgrade is great.