tbraun89
tbraun89

Reputation: 2234

tinymce-rails set content_css

I'm developing an Rails application and using the tinymce-rails gem. In the TinyMce configuration I can normally set my main content.css file that is used by the editor, so it looks like the result while editing.

For my production environment I can set the content_css parameter to application.css because that is the only css file after asset:precompile, is there any trick to get the same functionality in my development environment?

Upvotes: 2

Views: 1264

Answers (2)

rlarcombe
rlarcombe

Reputation: 2986

This worked for me...

When instantiating TinyMCE in my view, I pass in content_css as an option to the tinymce method:

<%= tinymce content_css: asset_path('application.css') %>

Upvotes: 1

Bjoernsen
Bjoernsen

Reputation: 2418

does this work for you? content_css: '<%= asset_path 'application.css' %>'

Upvotes: 4

Related Questions