Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
wymeditor for rails asset pipeline
Ruby JavaScript
branch: master

This branch is 5 commits ahead of marshill:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
script
spec
tasks
vendor/assets
.gitignore
Gemfile
Gemfile.lock
MIT-LICENSE
README.md
Rakefile
wymeditor-rails.gemspec

README.md

WymeditorRails

This project rocks and uses MIT-LICENSE.

Help

Installation

Very simple!

  • Add this line to Gemfile
  gem 'wymeditor-rails'
  • Add this line to `app/assets/javascripts/application.js
  //= require jquery.wymeditor

Using with ActiveAdmin

With asset pipeling support, wymeditor can be easily integrated with active-admin. After installing, all you need to do is write some javascript like this:

Lets say we have articles model whose content needs to be edited

  • First bind wymeditor to textarea where content is present.
  $('#article_content').wymeditor({ basePath: "/assets/" });
  • Bind a callback to article submit button to reflect the content from editor before updating the article
  $('#edit_article').submit(function() {
    $('#article_content').html($.wymeditors(0).xhtml());
    return true;
  });
Something went wrong with that request. Please try again.