Closed alepore closed 9 years ago
update:
not sure i understand what the tweaked template does, but i stripped down my _ck_editor.html.erb
as follow and i solved performance problems.
ckeditor works for me when deployed in production with capistrano.
note: i'm using ckeditor gem 4.1.0
<script>
window['CKEDITOR_BASEPATH'] = "/assets/ckeditor/";
</script>
<%= javascript_include_tag 'ckeditor/init' %>
<script>
$(function() {
var ids = [<%= raw ids.map{|id| "'#{id}'"}.join(', ') %>];
for (var key in ids) {
if ($('#' + ids[key]).length > 0) {
CKEDITOR.replace(ids[key]);
}
}
});
</script>
would you mind submitting a PR?
@sbasir please review this change as the original PR was yours
Hi! I get slow rendering of the
editor_engines/_ck_editor.html.erb
partial, like 1s on a pretty slow server and 500ms on the development machine. that's like 75% of the page rendering time.Anyone has the same problem? I'm on
2-2-stable