GithubHelp home page GithubHelp logo

trix's Introduction

Trix

Build Status

Want to include Basecamp's awesome Trix WYSIWYG editor in your Ruby on Rails application? You've come to the right place!

Please see the appropriate guide for your environment of choice:

a. Ruby on Rails

trix is easy to drop into Rails with the asset pipeline.

In your Gemfile you need to add the trix gem.

gem 'trix'

bundle install and restart your server to make the files available through the pipeline.

Import Trix styles in app/assets/stylesheets/application.css:

*= require trix

Require Trix Javascript magic in app/assets/javascripts/application.js:

//= require trix

Finally, any place where you would like to use the Trix editor in your forms, just use the trix_editor helper:

f.trix_editor :body

If you are using the Formtastic gem or the Simple Form gem, you can do this:

f.input :body, as: :trix_editor

Trix

For the official Trix Github repository, go here.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/maclover7/trix.

Upgrading Trix

  1. Copy and paste Trix's trix.js to vendor/assets/javascripts/trix.js
  2. Copy and paste Trix's trix.css to vendor/assets/stylesheets/trix.css
  3. Update lib/trix/version.rb with the correct version number
  4. git commit -am 'Bump to vVERSION'
  5. bundle exec rake release

License

The gem is available as open source under the terms of the MIT License.

trix's People

Contributors

maclover7 avatar lsylvester avatar tothpeter avatar hugomaiavieira avatar kylefox avatar marcindrozd avatar mateomurphy avatar rvanlieshout avatar spdawson avatar dixpac avatar nimi09 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.