I am using ruby on rails 3.2.1. For my post formatting I want to use TinyMCE, but I have problem with it.
- I have installed tinymce gem and restarted server.
- Downloaded tinymce and putted it in \myapp name\app\assets
My application head:
<head> <title>Līvu pamatskola</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <%= stylesheet_link_tag 'style' %> <%= javascript_include_tag "application" %> <%= csrf_meta_tag %> <script type="text/javascript" src="D:/Projects/Myapp name/app/assets/tinymce/jscripts/tiny_mce/tiny_mce.js" ></script> <script type="text/javascript" > tinyMCE.init({ mode : "textareas", theme : "simple" }); </script> </head>
Made /MyApp name/config/tinymce.yml file with:
theme_advanced_toolbar_location: top theme_advanced_toolbar_align: left theme_advanced_statusbar_location: bottom theme_advanced_buttons3_add: - tablecontrols - fullscreen plugins: - table - fullscreen
In /MyApp name/app/assets/javascripts/application.js
//= require tinymce-jquery
In result I have nice formatting panel @post content field, but after saving post I can see text with html tags, not formated text. I think there is problems with installation.