Giter Club home page Giter Club logo

ueditor-rails's Introduction

Rails 3.1 Integration for Ueditor

The ueditor-rails gem integrates the Ueditor editor with the Rails 3.1 asset pipeline.

Instructions

1. Add ueditor-rails to your Gemfile

gem 'ueditor-rails'

Be sure to add to the global group, not the assets group. Then run bundle install.

2. Include the Ueditor assets

Use one of the following options to include Ueditor assets.

(1) Add to your application.js:

//= require ueditor

(2) The Ueditor assets can be included on a per-page basis using js:

<script type="text/javascript" src="/assets/ueditor.js"> **3. Initialize Ueditor** For each textarea that you want to use with Ueditor, add the "ueditor" with a unique ID: <%= text_area_tag :editor, "", :id => "myEditor", :rows => 40, :cols => 120 %> <script type="text/javascript"> UE.getEditor('myEditor', {initialFrameWidth:650}) </script>

Ueditor has many options and plugins, the document is here Ueditor document .

Using ueditor-rails as an Engine Dependency

Ensure that you explicitly require ueditor-rails within your engine file. Including ueditor-rails as a dependency in your gemspec is not enough.

Updating

When new versions of Ueditor are released, simply update the ueditor-rails gem to the latest version. There is no need to run any extra rake tasks (apart from rake assets:precompile).

ueditor-rails's People

Contributors

daveliu avatar

Watchers

James Cloos avatar allen gao avatar shadow 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.