Code: Select all
<%= f.text_area :page %> // This produces a textarea with id image_page
<script>
CKEDITOR.replace( 'image_page' ); // I also tried wrapping this in `$(id='image_page').ready(function () {` `CKEDITOR.replace( 'image_page' );` `});` but that made no difference.
</script>
Code: Select all
<% if controller_name == 'images' && ['new', 'edit'].include?(action_name) %>
<script src="/assets/ckeditor.js"></script>
<% end %>
Code: Select all
var CKEDITOR_BASEPATH = '/assets/ckeditor453/';
When visiting the new or edit path directly (thus not via a link but entering their address in the browser's location bar), the page immediately loads correctly with the need for reloading i
kabosu coin