The Rails_Admin wiki explains how to integrate with bootstrap-wysihtml5 which is incredibly easy.
However, I'd like the wysihtml5 widget to have the "edit as html" button.
Is this possible?
The Rails_Admin wiki explains how to integrate with bootstrap-wysihtml5 which is incredibly easy.
However, I'd like the wysihtml5 widget to have the "edit as html" button.
Is this possible?
You can configure wysihtml5 on a per-field basis like below. To e.g. enable the HTML editor feature, use
RailsAdmin.config do |config|
config.model Team do
edit do
field :description, :text do
bootstrap_wysihtml5 true
bootstrap_wysihtml5_config_options :html => true
end
end
end
end
This was added to Rails_admin a while ago, but they somehow forgot to update the Wiki.
The above answer is now out of date with the current version of Rails Admin. You should use the following syntax to customize the editor:
field :description, :wysihtml5 do
config_options :html => true
end
I have updated the wiki
© 2022 - 2024 — McMap. All rights reserved.