Comments (3)
Also, although the generated code reflects the :cols value, the cols value in the html textarea wrapper generated is set always to 40, no matter the cols value passed in the view. This way, having :cols => 10 will result in the same area that :cols => 90.
from ckeditor.
I'm having this same issue but defining cols in the input_html isn't fixing it for me.
<%= f.semantic_fields_for :questions, question do |q| %>
<%= f.label "question_text", question.text %>
<%= q.semantic_fields_for "#{question.id}" do |a| %>
<%= render_question_answers(a, question) %>
<% if question.has_comment %>
<%= a.input :comment, :as => :ckeditor, :required => false,
:input_html => { :value => "Please add any comments here.", :cols => 10 } %>
<% end %>
<% end %>
<% end %>
Generates this
<li class="ckeditor input optional" id="ballot_questions_62_comment_input"><label class=" label" for="ballot_questions_62_comment">Comment</label><textarea cols="40" id="ballot_questions_62_comment" name="ballot[questions][62][comment]" rows="20"></textarea><script type="text/javascript">
//<![CDATA[
if (CKEDITOR.instances['ballot_questions_62_comment']) {CKEDITOR.remove(CKEDITOR.instances['ballot_questions_62_comment']);}CKEDITOR.replace('ballot_questions_62_comment', { "autofocus": false,"cols": 10,"id": 'ballot_questions_62_comment',"language": 'en',"namespace": ,"required": false,"value": 'Please add any comments here.' });
//]]>
</script>
</li>
With the error...
Uncaught SyntaxError: Unexpected token ,
Looks like "namespace" is missing a value. Any ideas?
from ckeditor.
Think my problem was related to #102. Adding :namespace => ""
to :input_html solved it.
from ckeditor.
Related Issues (20)
- Error "undefined method `size' for nil:NilClass" HOT 1
- Can't install additional plugins HOT 8
- ckeditor version security vulnerabilities HOT 1
- Setting image size with default image uploader
- ckeditor not rendering in heroku HOT 2
- Wrong asset path being requested HOT 9
- How can I save width and height of images uploaded with CarrieWave? HOT 1
- ActiveStorageValidations gem not working on Ckeditor assets
- delete
- It may be that this problem is in the gem ckeditor ? Images saved using ActiveStorage are different in environments. HOT 2
- undefined method `assets_languages=' for Ckeditor:Module (NoMethodError) Did you mean? asset_path= HOT 1
- image didn't show on staging [ rails4.2 + paperclip5.0.0+ ckeditor(5.1.1)]
- How to use with ActiveStorage+AWS?
- Trying to add 'lineheight' pluggin HOT 1
- Alternative for ckeditor_before_create_asset
- CKEditor4 reached its End-of-Life in June 2023 HOT 8
- Shrine templates are missing
- In gem ckeditor v5.1.2: app/assets/config/manifest.js overrides main manifest.js application configuration (Rails 7.1.3.4) HOT 3
- Getting warning this CKEditor 4.11.3 version is not secure HOT 3
- Any plans to support ruby 3+? HOT 1
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 ckeditor.