rails_markitup 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.markdown +20 -27
- data/lib/rails_markitup/version.rb +1 -1
- metadata +3 -3
data/README.markdown
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
A MarkDown TextEditor with jQuery and Markitup! and redcarpet for Rails 3
|
2
2
|
=========================================================================
|
3
3
|
|
4
|
-
__use: [Markitup](http://markitup.jaysalvat.com/ "Markitup")__
|
4
|
+
__use: [Markitup](http://markitup.jaysalvat.com/ "Markitup")__ and [Redcarpet](https://github.com/tanoku/redcarpet "Redcarpet")
|
5
5
|
|
6
6
|
__[Demo](http://markitup.jaysalvat.com/downloads/demo.php?id=markupsets/markdown)__
|
7
7
|
|
@@ -9,42 +9,35 @@ Support Env:
|
|
9
9
|
------------
|
10
10
|
Rails3.0.8+/Ruby1.8.7+
|
11
11
|
|
12
|
-
Usage:
|
13
|
-
------
|
12
|
+
## Usage:
|
14
13
|
|
15
|
-
|
14
|
+
a. In Gemfile:
|
16
15
|
|
17
|
-
|
16
|
+
gem "redcarpet"
|
17
|
+
gem "albino"
|
18
|
+
gem "nokogiri"
|
19
|
+
gem 'rails_markitup'
|
18
20
|
|
19
|
-
|
21
|
+
b. Then run :
|
20
22
|
|
21
|
-
|
23
|
+
rails g rails_markitup:install
|
22
24
|
|
23
|
-
|
25
|
+
c. In layout:
|
24
26
|
|
25
|
-
|
27
|
+
= stylesheet_link_tag :markitup
|
28
|
+
= javascript_include_tag :markitup
|
26
29
|
|
27
|
-
|
30
|
+
d. In your textarea , simple\_form\_for exapmle:
|
28
31
|
|
29
|
-
|
32
|
+
= form.input :content, :as => :text, :input_html => {:id => 'markdown'}
|
30
33
|
|
31
|
-
|
34
|
+
e. In your application.js:
|
32
35
|
|
33
|
-
|
36
|
+
$(document).ready(function(){
|
37
|
+
$('#markdown').markItUp(myMarkdownSettings);
|
38
|
+
});
|
34
39
|
|
35
|
-
|
40
|
+
f. In your show page:
|
36
41
|
|
37
|
-
|
38
|
-
|
39
|
-
5. in your application.js:
|
40
|
-
|
41
|
-
>$(document).ready(function(){
|
42
|
-
>
|
43
|
-
> $('#markdown').markItUp(myMarkdownSettings);
|
44
|
-
>
|
45
|
-
>});
|
46
|
-
|
47
|
-
5. in your show page:
|
48
|
-
|
49
|
-
> = markdown(@topic.content)
|
42
|
+
= markdown(@topic.content)
|
50
43
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_markitup
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 27
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 2
|
10
|
+
version: 0.0.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- AlexZhang
|