Closed roccia closed 8 years ago
Hello,
You give a class to your input but you use an id in your javascript.
You can change to this:
</div>
<script>
$(function() {
$('.myEditor'). editable()
});
</script>
</div>
@lebart still, nothing happens, just a plain textarea showed on screen, I think the js does not working at all.
Have your require all the files like mentioned in the docs? Do you see any error in the js console?
@lebart do I need put the js in application.js? the code I showed is in _form.html.erb , but I don't think that is the problem right?
@lebart oh yes new:165 Uncaught TypeError: $(...).editable is not a function .... I forgot to check the js console
I think you need to initialize Froala with this:
<script>
$(function() {
$('.myEditor').froalaEditor()
});
</script>
.froalaEditor() instead of .editable()
@lebart yes! should be froalaEditor() , I checked the doc : https://www.froala.com/wysiwyg-editor/docs/concepts/save Thank you so much !
Your welcome.
ps: Don't forget to mark this as close if you think this solve your issue.
@lebart sure TX agian!
I follow the solution mentioned in https://github.com/froala/wysiwyg-rails/issues/14 but it still did not work, hope someone could help me the code: