Open dinakaran opened 10 years ago
Can you clarify what you mean by "when i update the styles in the editor the styles is not getting saved"?
thanks spohlenz for answer:) for example if i applied h1 tag on the editor area on the edit page it is showing the h1 tag. but when i save the content the h1 tag is not appearing on the view template
I have the same issue, basically. When I apply a font size or family in the editor and save my post, it shows up in my db as having been changed, but when I display it I don't get the changes.
When outputting the content in your template, you need to call html_safe
on your content to ensure that the output is not escaped. e.g.
<%= @post.content.html_safe %>
I tried that. I get bold or italics, but not the font or size.
Are the font size/family styles definitely being saved to the database? Is another !important
CSS rule possibly overriding it?
yes, i'm looking at the entries in the rails console right now. Not using any !important rules.
Can you please paste the HTML that is being output when rendering the page, as well as the HTML as it appears in the database?
Are you running the output through any other helpers such as simple_format
? What is the code you are using to output the HTML?
Here's the entire code of the page:
Ok, wow, i'm an idiot. I don't even remember adding simple_format, but there it is.....Thanks spohlenz
@dinakaran Does this also solve your issue?
Hi
I am using the tinymce-4 branch of this in my rails 4 application the problem is
when i update the styles in the editor the styles is not getting saved there is no errors from console
and following is my tinymce.yml configuration
is there anything i need to provide
Thanks for your help