No commit activity in last 3 years
No release in over 3 years
Makes WYMeditor available via the asset pipeline and provides a custom input type for SimpleForm
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

 Project Readme

WYMeditor Input for SimpleForm

A lightweight gem that makes WYMeditor available via the asset pipeline and provides a custom input type for SimpleForm.

Usage

Rails

Add the following to your Gemfile:

gem "wymeditor-simple_form"

Assets

Include the WYMeditor javascript using the asset pipeline/sprockets; in a javascript file of your choosing (usually application.js, after the //= require jquery line):

//= require wymeditor

Forms

Render a form with a WYMeditor-enabled textarea:

<%= simple_form_for(@comment) do |f| %>
  <%= f.input :message, :as => :wymeditor %>
  <%= f.button :submit %>
<% end %>

Heroku

The Heroku requirement to have config.assets.initialize_on_precompile = false prevents this gem from flagging necessary WYMEditor assets for precompile - you need to add these manually to config/environments/production.rb:

config.assets.precompile += %w( wymeditor/* wymeditor/**/* )

Todo

  • Enable configuration of the WYMeditor javascript
  • Option to make WYMeditor the default input type for all text attributes

Maintainers

WYMeditor

Copyright (c) 2005 - 2011 Jean-Francois Hovinne, Dual licensed under the MIT and GPL licenses.

License

MIT License. Copyright (c) 2012 Habanero Software http://habanerohq.com