larsklevan / yui_editor

Integrate the Yahoo Rich Text Editor (http://developer.yahoo.com/yui/editor/) into a Rails application.

This URL has Read+Write access

yui_editor / README
100644 57 lines (36 sloc) 1.175 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
YuiEditor
=========
 
Integrate the Yahoo Rich Text Editor (http://developer.yahoo.com/yui/editor/) into a Rails application.
 
Example
=======
 
# Basic usage
 
blog_controller.rb:
 
class BlogController < ApplicationController
  uses_yui_editor
end
 
new.html.erb:
 
<% form_for(@blog) do |f| %>
  <%= f.text_area :post, :class => 'rich_text_editor' %>
<% end %>
 
blogs.html.erb:
 
<head>
  <%= include_yui_editor_if_used %>
</head>
 
# Customizing the configuration
 
default settings are in RAILS_ROOT/config/yui_editor.yml.
 
you can override the editor defaults in each controller:
 
class BlogController < ApplicationController
  uses_yui_editor(:only => [:new, :create, :edit, :update], :selector => 'blog_post')
end
 
Instructions for configuring the editor:
http://developer.yahoo.com/yui/docs/YAHOO.widget.Editor.html#configattributes
 
Instructions for configuring the toolbar:
http://developer.yahoo.com/yui/examples/editor/toolbar_editor.html
 
Installation
============
 
script/plugin install git://github.com/larsklevan/yui_editor.git
 
Feedback
========
 
Send feedback and questions to:
tastybyte at gmail.com
 
Copyright (c) 2008 Lars Klevan, released under the MIT license