markitup_erb-rails 0.0.1 → 0.0.2
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.md +17 -4
- data/app/controllers/markitup_erb/previews_controller.rb +7 -0
- data/app/views/markitup_erb/previews/preview.html.erb +11 -0
- data/config/routes.rb +5 -0
- data/lib/markitup_erb/rails/version.rb +1 -1
- data/vendor/assets/stylesheets/markitup/templates/preview.css.erb +5 -0
- metadata +6 -2
data/README.md
CHANGED
@@ -4,6 +4,8 @@ Vanilla [markItUp!](http://markitup.jaysalvat.com) for Rails 3.x, works with ERB
|
|
4
4
|
It comes with these sets from markItUp!: Html, Textile, Wiki Syntax, Markdown, and BBcode, if
|
5
5
|
you use one of them maybe you will need to add other gems to parse it ;-).
|
6
6
|
|
7
|
+
[markItUp!](http://markitup.jaysalvat.com) version: `1.1.2`.
|
8
|
+
|
7
9
|
## Installation
|
8
10
|
|
9
11
|
Add this line to your application's Gemfile:
|
@@ -22,31 +24,42 @@ Or install it yourself as:
|
|
22
24
|
|
23
25
|
In `app/assets/javascripts/application.js` add this:
|
24
26
|
|
25
|
-
```
|
27
|
+
```
|
26
28
|
//= require markitup/jquery.markitup
|
27
29
|
//= require markitup/sets/default/set
|
28
30
|
```
|
29
31
|
|
30
32
|
Now, in `app/assets/stylesheets/application.css` add this:
|
31
33
|
|
32
|
-
```
|
34
|
+
```
|
33
35
|
*= require markitup/skins/simple/style
|
34
36
|
*= require markitup/sets/default/style
|
35
37
|
```
|
36
38
|
|
39
|
+
So, to enable [markItUp!](http://markitup.jaysalvat.com) for all
|
40
|
+
textarea tags (you can change this selector in order to select a
|
41
|
+
specific textarea) add this snippet.
|
42
|
+
|
43
|
+
```javascript
|
44
|
+
$(function () {
|
45
|
+
mySettings.previewTemplatePath = "/markitup_erb/previews/preview"; // MarkitupErb::Rails default preview template.
|
46
|
+
$("textarea").markItUp(mySettings);
|
47
|
+
});
|
48
|
+
```
|
49
|
+
|
37
50
|
This gem comes with this extra sets from markItUp!: html, textile, wiki, markdown, and bbcode. To use it just
|
38
51
|
replace `sets` lines in `app/assets/javascripts/application.js` and `app/assets/stylesheets/application.css`.
|
39
52
|
|
40
53
|
`app/assets/javascripts/application.js`:
|
41
54
|
|
42
|
-
```
|
55
|
+
```
|
43
56
|
//= require markitup/jquery.markitup
|
44
57
|
//= require markitup/sets/markdown/set
|
45
58
|
```
|
46
59
|
|
47
60
|
`app/assets/stylesheets/application.css`:
|
48
61
|
|
49
|
-
```
|
62
|
+
```
|
50
63
|
*= require markitup/skins/simple/style
|
51
64
|
*= require markitup/sets/markdown/style
|
52
65
|
```
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
2
|
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
3
|
+
<head>
|
4
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
5
|
+
<title>markItUp! preview template</title>
|
6
|
+
<%= stylesheet_link_tag "markitup/templates/preview" %>
|
7
|
+
</head>
|
8
|
+
<body>
|
9
|
+
<!-- content -->
|
10
|
+
</body>
|
11
|
+
</html>
|
data/config/routes.rb
ADDED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: markitup_erb-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
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: 2012-07-
|
12
|
+
date: 2012-07-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -42,6 +42,9 @@ files:
|
|
42
42
|
- LICENSE
|
43
43
|
- README.md
|
44
44
|
- Rakefile
|
45
|
+
- app/controllers/markitup_erb/previews_controller.rb
|
46
|
+
- app/views/markitup_erb/previews/preview.html.erb
|
47
|
+
- config/routes.rb
|
45
48
|
- lib/markitup_erb-rails.rb
|
46
49
|
- lib/markitup_erb/rails/engine.rb
|
47
50
|
- lib/markitup_erb/rails/version.rb
|
@@ -168,6 +171,7 @@ files:
|
|
168
171
|
- vendor/assets/stylesheets/markitup/sets/wiki/style.css.erb
|
169
172
|
- vendor/assets/stylesheets/markitup/skins/markitup/style.css.erb
|
170
173
|
- vendor/assets/stylesheets/markitup/skins/simple/style.css.erb
|
174
|
+
- vendor/assets/stylesheets/markitup/templates/preview.css.erb
|
171
175
|
homepage: https://github.com/nebiros/markitup_erb-rails
|
172
176
|
licenses: []
|
173
177
|
post_install_message:
|