pagedown-rails 1.0.1 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -7,7 +7,7 @@
7
7
  Add this line to the assets group in your Gemfile:
8
8
 
9
9
  ```ruby
10
- gem 'pagedown-rails'
10
+ gem 'pagedown-rails', '~> 1.1.0'
11
11
  ```
12
12
 
13
13
  Add the necessary libraries to `app/assets/javascripts/application.js`:
@@ -15,6 +15,30 @@ Add the necessary libraries to `app/assets/javascripts/application.js`:
15
15
  ```js
16
16
  //= require markdown.converter
17
17
  //= require markdown.sanitizer
18
+ //= require markdown.editor
19
+ ```
20
+
21
+ Add the necessary libraries to `app/assets/stylesheets/application.css`:
22
+
23
+ ```css
24
+ /*
25
+ *= require markdown
26
+ */
27
+ ```
28
+
29
+ ### To create markdown editor:
30
+
31
+ ```js
32
+ var converter = Markdown.getSanitizingConverter();
33
+ var editor = new Markdown.Editor(converter);
34
+ editor.run();
35
+ ```
36
+
37
+ ```html
38
+ <div class='wmd-panel'>
39
+ <div id='wmd-button-bar'></div>
40
+ <textarea class='wmd-input'></textarea>
41
+ </div>
18
42
  ```
19
43
 
20
44
  ## What's included?
@@ -22,5 +46,6 @@ Add the necessary libraries to `app/assets/javascripts/application.js`:
22
46
  * markdown.converter
23
47
  * markdown.sanitizer
24
48
  * markdown.editor
49
+ * css styles
25
50
 
26
51
  Copyright Richard Hubers, released under the MIT License.
@@ -1,5 +1,5 @@
1
1
  module PageDown
2
2
  module Rails
3
- VERSION = "1.0.1"
3
+ VERSION = "1.1.0"
4
4
  end
5
5
  end
@@ -0,0 +1,91 @@
1
+ .wmd-input
2
+ {
3
+ height: 300px;
4
+ width: 100%;
5
+ border: 1px solid DarkGray;
6
+ }
7
+
8
+ .wmd-button-row
9
+ {
10
+ position: relative;
11
+ margin-left: 5px;
12
+ margin-right: 5px;
13
+ margin-bottom: 5px;
14
+ margin-top: 10px;
15
+ padding: 0px;
16
+ height: 20px;
17
+ }
18
+
19
+ .wmd-spacer
20
+ {
21
+ width: 1px;
22
+ height: 20px;
23
+ margin-left: 14px;
24
+
25
+ position: absolute;
26
+ background-color: Silver;
27
+ display: inline-block;
28
+ list-style: none;
29
+ }
30
+
31
+ .wmd-button {
32
+ width: 20px;
33
+ height: 20px;
34
+ padding-left: 2px;
35
+ padding-right: 3px;
36
+ position: absolute;
37
+ display: inline-block;
38
+ list-style: none;
39
+ cursor: pointer;
40
+ }
41
+
42
+ .wmd-button > span {
43
+ background-image: image-url('markdown-buttons.png');
44
+ background-repeat: no-repeat;
45
+ background-position: 0px 0px;
46
+ width: 20px;
47
+ height: 20px;
48
+ display: inline-block;
49
+ }
50
+
51
+ .wmd-spacer1
52
+ {
53
+ left: 50px;
54
+ }
55
+ .wmd-spacer2
56
+ {
57
+ left: 175px;
58
+ }
59
+ .wmd-spacer3
60
+ {
61
+ left: 300px;
62
+ }
63
+
64
+ .wmd-prompt-background
65
+ {
66
+ background-color: Black;
67
+ }
68
+
69
+ .wmd-prompt-dialog
70
+ {
71
+ border: 1px solid #999999;
72
+ background-color: #F5F5F5;
73
+ }
74
+
75
+ .wmd-prompt-dialog > div {
76
+ font-size: 0.8em;
77
+ font-family: arial, helvetica, sans-serif;
78
+ }
79
+
80
+
81
+ .wmd-prompt-dialog > form > input[type="text"] {
82
+ border: 1px solid #999999;
83
+ color: black;
84
+ }
85
+
86
+ .wmd-prompt-dialog > form > input[type="button"]{
87
+ border: 1px solid #888888;
88
+ font-family: trebuchet MS, helvetica, sans-serif;
89
+ font-size: 0.8em;
90
+ font-weight: bold;
91
+ }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pagedown-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.1.0
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-12-10 00:00:00.000000000 Z
12
+ date: 2013-02-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: railties
@@ -38,9 +38,11 @@ files:
38
38
  - lib/pagedown/rails/version.rb
39
39
  - lib/pagedown/rails.rb
40
40
  - lib/pagedown-rails.rb
41
+ - vendor/assets/images/markdown-buttons.png
41
42
  - vendor/assets/javascripts/markdown.converter.js
42
43
  - vendor/assets/javascripts/markdown.editor.js
43
44
  - vendor/assets/javascripts/markdown.sanitizer.js
45
+ - vendor/assets/stylesheets/markdown.css
44
46
  - README.md
45
47
  homepage: http://github.com/rh/pagedown-rails
46
48
  licenses:
@@ -63,9 +65,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
63
65
  version: '0'
64
66
  requirements: []
65
67
  rubyforge_project:
66
- rubygems_version: 1.8.24
68
+ rubygems_version: 1.8.23
67
69
  signing_key:
68
70
  specification_version: 3
69
71
  summary: This gem makes PageDown available in the Rails asset pipeline
70
72
  test_files: []
71
- has_rdoc: