ponkotsu-md-editor 0.2.3 → 0.2.4

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: d007b75a9e2bfeabb03abec88127f8aeda9985e9a74a3fbcff8c342feff476f1
4
- data.tar.gz: e9b2b7ab14c48f2fda20f22ff1c691ec99f73d05cd14df2c4e59b3631aa5f603
3
+ metadata.gz: 541b213a7d7d2f1f4f9df9a47451cee3d1c9fd0e5a15d5749f317e395b4d9a2f
4
+ data.tar.gz: 12f9626526ff951f4f8600717f067d0514a20232983f81e3946333720e66f26f
5
5
  SHA512:
6
- metadata.gz: f546344f1057a655b542c08cbe80eaaf7e61dd7259aa56b5ecd36c8fe10b043af8229100cf23ffbf0dc34e4407997400f27edc8df3633883b6f9c7f06758e20e
7
- data.tar.gz: 9ded99ef961fbc338226e0edded2985397204c3df576a636181ef84128318b6cc4b88e83148b0714dcc71e1034a984bcd7341bae2bc58878f527207777283320
6
+ metadata.gz: efb1b746389db103b69bed166cec7613d7eb6a9df7f24e773de28e8f1e16ca609a2b8ab29d09aaa4a936b6fbd57ded44a48c1118125d57bdab3eda097c4e78d5
7
+ data.tar.gz: 94adde3b5ca1a9c03e0cfdd6e6a9864bc8b13938058f79595212a403671dd56f0c25e6d83f529c58539f7b154f3f454b80c248c38961894a08994c4369203743
@@ -59,7 +59,7 @@
59
59
 
60
60
  <div class="markdown-editor">
61
61
  <%= render "ponkotsu_md_editor/toolbar", locals: { options: _options } %>
62
- <%= render "ponkotsu_md_editor/input_area", locals: { form: _form, attribute: locals[:attribute], options: _options } %>
62
+ <%= render "ponkotsu_md_editor/input_area", locals: { form: _form, attribute: locals[:attribute], content: locals[:content], options: _options } %>
63
63
  </div>
64
64
  <div class="form-text medium-contrast-text">
65
65
  <strong><%= case _options[:lang]
@@ -8,7 +8,7 @@
8
8
  contenteditable="true"
9
9
  data-field="content"
10
10
  class="form-control markdown-textarea">
11
- <%= raw locals[:attribute] %>
11
+ <%= raw locals[:content] %>
12
12
  </div>
13
13
 
14
14
  <div id="editor_content_placeholder">
@@ -22,10 +22,11 @@ module PonkotsuMdEditor
22
22
  # tools: [:bold, :italic, :strikethrough],
23
23
  # placeholder: "This is Placeholder."
24
24
  # }) %>
25
- def markdown_editor(form, attribute, options = {})
25
+ def markdown_editor(form, attribute, content, options = {})
26
26
  form = form[:form] if form.is_a?(Hash)
27
27
  attribute = attribute[:attribute] if attribute.is_a?(Hash)
28
- render "ponkotsu_md_editor/editor", locals: { attribute: attribute, form: form, options: options }
28
+ content = content[:attribute] if content.is_a?(Hash)
29
+ render "ponkotsu_md_editor/editor", locals: { attribute: attribute, content: content, form: form, options: options }
29
30
  end
30
31
  end
31
32
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PonkotsuMdEditor
4
- VERSION = "0.2.3"
4
+ VERSION = "0.2.4"
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.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - dhq_boiler