use_tinymce 0.0.12 → 0.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.markdown +38 -22
- data/lib/use_tinymce/use_tinymce.rb +2 -2
- metadata +2 -2
data/README.markdown
CHANGED
@@ -1,11 +1,12 @@
|
|
1
|
-
UseTinyMCE - 0.0.
|
1
|
+
UseTinyMCE - 0.0.13.pre1
|
2
2
|
==========
|
3
3
|
|
4
4
|
**UseTinyMCE** is yet another (as if we needed another) hack for including
|
5
|
-
TinyMCE in a Rails 3.0 or 3.
|
5
|
+
TinyMCE in a Rails 3.0, 3.1, or 3.2 app.
|
6
6
|
|
7
7
|
**NOTE:** Rails 3.1.0 broke version 0.0.8. The current version has been tested
|
8
|
-
on
|
8
|
+
on Rails 3.1.0, 3.0.13 and (smoke tested) on Rails 3.2.1. All installations (seem to)
|
9
|
+
work properly.
|
9
10
|
|
10
11
|
It differs from the others that I looked at on rubygems in that:
|
11
12
|
|
@@ -47,40 +48,55 @@ Or read the TinyMCE code.
|
|
47
48
|
|
48
49
|
## Step by Step
|
49
50
|
|
50
|
-
|
51
|
-
Do that by running one of these rake tasks:
|
52
|
-
|
53
|
-
Rails 3.0:
|
54
|
-
|
55
|
-
* `rake use_tinymce:install_jquery` - if you are using jQuery (Rails 3.1 default)
|
56
|
-
* `rake use_tinymce:install_simple` - if you are using Prototype (Rails 3.0 default)
|
57
|
-
* `rake use_tinymce:install_advanced` - if you are using Prototype (Rails 3.0 default)
|
58
|
-
|
59
|
-
If you don't need much and aren't familiar with *TinyMCE*, then `rake use_tinymce:install_simple`
|
60
|
-
should be fine. The *advanced* version configures *TinyMCE* with many more features. Go to
|
61
|
-
the ["TinyMCE website for details"](http://tinymce.moxiecode.com/)
|
62
|
-
|
63
|
-
Rails 3.1
|
51
|
+
**Note:** you should *not* have to 'require use_tinymce` anyplace. If you do, please let me know.
|
64
52
|
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
["TinyMCE website for details"](http://tinymce.moxiecode.com/)
|
53
|
+
1. You will need to install *TinyMCE* in your /public/javascript directory.
|
54
|
+
Do that by running one of the rake tasks below. They are all in the `use_tinymce`
|
55
|
+
namespace and depend on the version of Rails you are using. See below for details.
|
69
56
|
|
70
57
|
2. Add `use_tinymce args` to all the controllers for views containing **textarea** fields
|
71
58
|
in which you want to run *TinyMCE*. `args` should be:
|
59
|
+
|
72
60
|
* `:all` - to enable *TinyMCE* for all actions
|
73
61
|
* `:foo, :bar` - to enable *TinyMCE* only for views rendered by `foo` and `bar` actions
|
74
62
|
[usually this is something like `use_tinymce :new, :edit`].
|
75
63
|
|
76
|
-
**Note:** you should *not* have to 'require use_tinymce` anyplace. If you do, please let me know.
|
77
64
|
3. Add `<%= use_tinymce_link %>` to the `HEAD` section of you application layout - for *at least*
|
78
65
|
all pages which should use *TinyMCE*
|
66
|
+
|
79
67
|
4. (Optional) Edit `/public/javascript/use_tinymce_init.js` to customize your *TinyMCE* feature
|
80
68
|
set.
|
81
69
|
|
82
70
|
That's it.
|
83
71
|
|
72
|
+
### Rake Tasks
|
73
|
+
|
74
|
+
Rails 3.0:
|
75
|
+
|
76
|
+
* `rake use_tinymce:install_jquery` - if you are using jQuery (Rails 3.1 default)
|
77
|
+
* `rake use_tinymce:install_simple` - if you are using Prototype (Rails 3.0 default)
|
78
|
+
* `rake use_tinymce:install_advanced` - if you are using Prototype (Rails 3.0 default)
|
79
|
+
* `rake use_tinymce:uninstall` - removes all trace of TinyMCE & the initialization file from
|
80
|
+
your `/public/javascripts` directory. **WARNING:** this wipes out any customizations you have
|
81
|
+
done to the `init_tinymce.js` file. **WARNING:** `uninstall` is *always* run prior to
|
82
|
+
any of the `install` tasks.
|
83
|
+
|
84
|
+
If you don't need much and aren't familiar with *TinyMCE*, then `rake use_tinymce:install_simple`
|
85
|
+
should be fine. The *advanced* version configures *TinyMCE* with many more features. Go to
|
86
|
+
the ["TinyMCE website for details"](http://tinymce.moxiecode.com/)
|
87
|
+
|
88
|
+
Rails 3.1
|
89
|
+
|
90
|
+
* rake use_tinymce:install - installs the jQuery version of TinyMCE
|
91
|
+
* `rake use_tinymce:uninstall` - removes all trace of TinyMCE & the initialization file from
|
92
|
+
your `/public/javascripts` directory. **WARNING:** this wipes out any customizations you have
|
93
|
+
done to the `init_tinymce.js` file. **WARNING:** `uninstall` is *always* run prior to
|
94
|
+
the `install` task.
|
95
|
+
|
96
|
+
This creates an `advanced` editor. See the *TinyMCE* website for configuration information:
|
97
|
+
["TinyMCE website for details"](http://tinymce.moxiecode.com/)
|
98
|
+
|
99
|
+
|
84
100
|
## Supplied Methods
|
85
101
|
|
86
102
|
Detailed info on the methods in this Gem.
|
@@ -25,7 +25,7 @@ module UseTinymce
|
|
25
25
|
|
26
26
|
if defined? Rails
|
27
27
|
module Link
|
28
|
-
if Rails.version =~ /^3.[
|
28
|
+
if Rails.version =~ /^3.[012]/
|
29
29
|
def use_tinymce_link
|
30
30
|
if defined?(params) && use_tinymce?(params[:action])
|
31
31
|
jq_path = File.join(Rails.root, 'public', 'javascripts', 'tinymce', 'jscripts', 'tiny_mce', 'jquery.tinymce.js')
|
@@ -37,7 +37,7 @@ module UseTinymce
|
|
37
37
|
end
|
38
38
|
end
|
39
39
|
else
|
40
|
-
|
40
|
+
raise RuntimeError.new("use_tinymce has not been tested for this version of Rails: #{Rails.version}")
|
41
41
|
end
|
42
42
|
end
|
43
43
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: use_tinymce
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.13
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2012-02-05 00:00:00.000000000Z
|
13
13
|
dependencies: []
|
14
14
|
description: ! 'UseTinymce - Yet Another tinyMCE integrations gem for Rails 3
|
15
15
|
|