ponkotsu-md-editor 0.2.0 → 0.2.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8fe8a5ee54ef7b3d227b1544f1fe0ea4357f2e087035ef2d1325ed26f544e02a
4
- data.tar.gz: fe092133a77d8f39136ed3d9bf62e9f180efa1eeb3602c1a37af57f0fb3d95b5
3
+ metadata.gz: 62a1a937b8cf271a226386c2661c8decedc24ae6b2189e92ba2358f8a9428228
4
+ data.tar.gz: 72feda410a62df3df6f05ba7fae531eb7c44f8f1fc77d73284d85a1b69258efa
5
5
  SHA512:
6
- metadata.gz: 4276afc6fb1626c265e0f5fc9242eaab7a6fb7fe5a86dca690329d2a825d209c4cd8753886f57011c6f7b396149dc28739016e7b498d11c003ea962339277225
7
- data.tar.gz: 64974bbfd25c6c394ba2838608aab7fb192c574528a848c0d9406ed97efa836acadbef688e909cbbf72156d16386611e10e84739821f39f330d60e8e3ea58974
6
+ metadata.gz: 57667cc623bba7c40bb54d83dedc7eb8b7a85af87a6b4314f67a43ced501b7d068ef770b0d43b055d8ed5c9cb039c764b16800d5e28c45e19c44d2f6f495590f
7
+ data.tar.gz: e998286e7ddfead67721ed9d287ec148b770e7a1c9f0ec9b360fe02ceec263dca7e146b2608d959aef970d6b4c140f07e2622476c1006d38fbdf3107963eb06d
@@ -1,6 +1,5 @@
1
1
  <%
2
2
  _form = locals[:form]
3
- _content = locals[:content]
4
3
  _options = {
5
4
  lang: locals[:options][:lang] || :en,
6
5
  preview: locals[:options][:preview] || true,
@@ -60,7 +59,7 @@
60
59
 
61
60
  <div class="markdown-editor">
62
61
  <%= render "ponkotsu_md_editor/toolbar", locals: { options: _options } %>
63
- <%= render "ponkotsu_md_editor/input_area", locals: { form: _form, content: _content, options: _options } %>
62
+ <%= render "ponkotsu_md_editor/input_area", locals: { form: _form, attribute: locals[:attribute], options: _options } %>
64
63
  </div>
65
64
  <div class="form-text medium-contrast-text">
66
65
  <strong><%= case _options[:lang]
@@ -1,6 +1,5 @@
1
1
  <%
2
2
  _form = locals[:form]
3
- _content = locals[:content]
4
3
  _placeholder = locals[:options][:placeholder]
5
4
  %>
6
5
 
@@ -9,14 +8,14 @@
9
8
  contenteditable="true"
10
9
  data-field="content"
11
10
  class="form-control markdown-textarea">
12
- <%= raw _content %>
11
+ <%= raw locals[:attribute] %>
13
12
  </div>
14
13
 
15
14
  <div id="editor_content_placeholder">
16
15
  <%= _placeholder %>
17
16
  </div>
18
17
 
19
- <%= _form.hidden_field _content, id: "content_hidden_field" %>
18
+ <%= _form.hidden_field locals[:attribute], id: "content_hidden_field" %>
20
19
 
21
20
  <%= render "ponkotsu_md_editor/preview_area" %>
22
21
  </div>
@@ -22,9 +22,9 @@ module PonkotsuMdEditor
22
22
  # tools: [ :bold, :italic, :strikethrough ],
23
23
  # placeholder: "This is Placeholder."
24
24
  # }) %>
25
- def markdown_editor(form, content, options = {})
25
+ def markdown_editor(form, attribute, options = {})
26
26
  form = form[:form] if form.is_a?(Hash)
27
- render "ponkotsu_md_editor/editor", locals: { content: content, form: form, options: options }
27
+ render "ponkotsu_md_editor/editor", locals: { attribute: attribute, form: form, options: options }
28
28
  end
29
29
  end
30
30
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PonkotsuMdEditor
4
- VERSION = "0.2.0"
4
+ VERSION = "0.2.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ponkotsu-md-editor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - dhq_boiler