sferik/rails_admin — Issue #871: Do you considered adding codemirror editor to text field?
Author: kennyadsl
Created: 2011-12-01 13:49:02+00:00
State: open

Hi,
do you considered the possibility to add codemirror js library like an alternative to Ckeditor (I think it should be possible to keep both).

There is a gem: codemirror-rails (http://rubygems.org/gems/codemirror-rails , http://github.com/fixlr/codemirror-rails) it seems to be already Rails3.1 compatible. So I think that we have only to change this file

https://github.com/sferik/rails_admin/blob/master/lib/rails_admin/config/fields/types/text.rb

including the ability to take codemirror as an instance option having something like this:

``` ruby
RailsAdmin.config do |config|
config.model Team do
edit do
field :description, :text do
codemirror true
end
end
end
end
```

If you agree we can make a pull request for this feature.

Let me know