Mr.D Mr.D - 2 years ago 112
Ruby Question

Rails_admin show text written by CKEditor with html format

I have integrated CKEditor for my rails_admin. In

page I have added CKEditor and wrote text.

In my model showing page it shows me like that:
enter image description here

My code for

show do


What I need to add, to show my text, written on CKEditor, able to show in rails_admin?

==== UPDATE ====

I have added
config.assets.precompile += %w( ckeditor/* )
code in my
production.rb and development.rb
. Then I have run rake assets precompile tasks and restarted my server. It still shows the same thing in my image above.

Even If it will be possible to show text in html format, it will born new question. As you can see in image, there is
tag and its
shows not full directory of my uploaded image. If I need to send this formatted text as JSON to my phone?

==== UPDATE ====

I have opened code inspector of my browser to see
part of my page. It showd me this:
browsers code inspector

My html code, created by CKEditor, is written well, but my browser does not consider it as html code and there is quotation marks. Does these quotation marks affect to my browser to show it as bare text?

Answer Source

I have found solution. I don't know is it good or not:

show do

  field :description do
    pretty_value do
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download