simple_form_markdown_editor 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +1 -1
- data/lib/simple_form_markdown_editor/markdown_editor_input.rb +5 -1
- data/lib/simple_form_markdown_editor/version.rb +1 -1
- data/test/dummy/Gemfile.lock +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: adb8663c7956eda6d7f6da3d9588949076d92d1b
|
4
|
+
data.tar.gz: 7cbcfc6052e035b1f179586138f37c6ac63b92c5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3f0f670afbac9f84ece2c9bfd33506560910987769951da4adca79bdcb61d5c33f52fea60e8b458df71851b073070b2fdeced2266f2ec60c72c7790c75658f7c
|
7
|
+
data.tar.gz: b791edd4f0d396e8bbbc8bbbddf4adaa4c48cbfa463b25316fe3bbc1f0adfb8e7bf45a1b06a69e360c544e1300b9ccf770fa9dbe56e047c4d4a6fbe6c14ec792
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -82,7 +82,7 @@ end
|
|
82
82
|
### Input
|
83
83
|
|
84
84
|
```ruby
|
85
|
-
= f.input :markdown, as: :markdown_editor, help: { enabled: true, visible: false },
|
85
|
+
= f.input :markdown, as: :markdown_editor, buttons: [ %w(h1 h2), %w(a img) ], help: { enabled: true, visible: false }, extensions: { footnotes: true }, render_class: CustomRenderClass, render_options: { no_images: true }, route: '/custom/preview'
|
86
86
|
```
|
87
87
|
|
88
88
|
## Internationalization
|
@@ -35,6 +35,10 @@ module SimpleFormMarkdownEditor
|
|
35
35
|
super
|
36
36
|
end
|
37
37
|
|
38
|
+
def render_class
|
39
|
+
options.fetch(:render_class, MarkdownEditorInput.configuration.render_class)
|
40
|
+
end
|
41
|
+
|
38
42
|
def render_options
|
39
43
|
options.fetch(:render_options, MarkdownEditorInput.configuration.render_options)
|
40
44
|
end
|
@@ -163,7 +167,7 @@ module SimpleFormMarkdownEditor
|
|
163
167
|
i18n_help.map do |section, content|
|
164
168
|
content[:elements].map do |el, con|
|
165
169
|
template.content_tag :div, class: ['help_text', el.to_s], data: { section: section.to_s, sub_section: el.to_s } do
|
166
|
-
Renderer.call(con[:text], render_options: render_options, extensions: extensions)
|
170
|
+
Renderer.call(con[:text], render_class: render_class, render_options: render_options, extensions: extensions)
|
167
171
|
end
|
168
172
|
end
|
169
173
|
end.flatten.join.html_safe
|
data/test/dummy/Gemfile.lock
CHANGED