How to configure ckeditor in rails admin?

1,480 views
Skip to first unread message

Александр Панченко

unread,
Dec 16, 2013, 5:59:05 AM12/16/13
to rails...@googlegroups.com
Is there any guide how to configure CKEditor in Rails Admin? This wiki page doesn't look very helpful.

What I've already tried:
1. apply ckeditor to a field (config/initializers/rails_admin.rb):
 
  config.model Block do
    visible false

    nested do
      field :content, :ck_editor
    end
  end


2. Create some dummy config file in (app/assests/javascripts/ckeditor/config.js):

CKEDITOR.editorConfig = function( config ) {
    config.language = 'fr';
    config.uiColor = '#AADC6E';
};


But this config doesn't apply.

Александр Панченко

unread,
Dec 16, 2013, 6:14:02 AM12/16/13
to rails...@googlegroups.com
Everything works fine. All you just need to do is restart your server after config.js created.

Chuanpin Zhu

unread,
Mar 2, 2014, 3:53:28 AM3/2/14
to rails...@googlegroups.com
Hi, did you solve this problem? I am stuck here too. would you please share it if you get the point please.

Joe Auslander

unread,
Mar 2, 2014, 2:56:27 PM3/2/14
to rails...@googlegroups.com
I have not solved it. We labeled it as less important than the other work we had going and will try to think about a way around it later.



--
You received this message because you are subscribed to the Google Groups "rails_admin" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rails_admin...@googlegroups.com.
To post to this group, send email to rails...@googlegroups.com.
Visit this group at http://groups.google.com/group/rails_admin.
For more options, visit https://groups.google.com/groups/opt_out.



--
Joe Auslander
agile coach

boost new media - Web & mobile application development

boost agile Agile consulting & training

Viplav Khadke

unread,
Apr 10, 2014, 4:17:40 PM4/10/14
to rails...@googlegroups.com
So for some reason step 2, wasn't working for me before and all of a sudden it stated working. 

The only changes I made to the code were.

CKEDITOR.editorConfig = function( config ) {
    config.toolbarGroups = [
    { name: 'document',    groups: [ 'mode', 'document', 'doctools' ] },
    { name: 'clipboard',   groups: [ 'clipboard', 'undo' ] },
    { name: 'editing',     groups: [ 'find', 'selection'] },
    { name: 'forms' },
    '/',
    { name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ] },
    { name: 'paragraph',   groups: [ 'list', 'indent', 'blocks', 'align', 'bidi' ] },
    { name: 'links' },
    { name: 'insert' },
    '/',
    { name: 'styles' },
    { name: 'colors' },
    { name: 'tools' },
    { name: 'others' },
    ];
};
And surprisingly to view changes I needn't restart the server every time.

Hope that helps.

Regards, 
Viplav

Praveen Kannan

unread,
Apr 10, 2014, 4:21:06 PM4/10/14
to rails...@googlegroups.com
Add this gem:
gem 'ckeditor'
gem 'ckeditor_rails'

In Model

rails_admin do
        edit do
                field :(field name), :ck_editor
       end
end



--
You received this message because you are subscribed to the Google Groups "rails_admin" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rails_admin...@googlegroups.com.
To post to this group, send email to rails...@googlegroups.com.
Visit this group at http://groups.google.com/group/rails_admin.
For more options, visit https://groups.google.com/d/optout.



--
Regards
      Praveen Kannan.M

                              
Reply all
Reply to author
Forward
0 new messages