ponkotsu-md-editor 0.1.3 → 0.1.5

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: 8913fcdedbb7adf1b18cfd0becbca4a51e0938c29b6fd4597a193ae205d950af
4
- data.tar.gz: 82531d8c36f64b582ad615bffc9f9dc09e0361e41d0068f8dd52596152a4c222
3
+ metadata.gz: 92a9f8fe26f4302bc33829a1801686dd891df839e1dfa8de513fe2710bcb42ae
4
+ data.tar.gz: 6c011631198ca5b5dd36d3e6895075e16301740bc43ee2791534b1c8f6ba390c
5
5
  SHA512:
6
- metadata.gz: b3988a0b65205c9d120718d0b5c4c5e260ed859de71ea83a84e32a9dd9306f19b4b177bf62a55679445bcae67cd74e58cf815cf8eb52cc4d7e73041643a41a91
7
- data.tar.gz: 13767feb4ed7d6554d1de1c91e546e9fc34af11b723769b7f59c14757602c39b37d40271bda341ff2990ea5ad60f63a70b3683c212d64724328c0500a9544df9
6
+ metadata.gz: 925bd4b17d60813a2c9dfeb10cf6f4ca7fd2ab6e4d916e5357bdf2aa1a3e8d70dbbd832dceee94516421b8e17b28c56bc04a71b531c69a03e8fd6121fe7b5229
7
+ data.tar.gz: fcd996fb98a86ffb52ab38b762c96655df90319b3290a2b59a4e37e8fbc27c044d26d83ea257806c7028e865a861353174fd76e875440b7600490bbade7ba570
@@ -60,7 +60,7 @@
60
60
 
61
61
  <div class="markdown-editor">
62
62
  <%= render "toolbar", options: _options %>
63
- <%= render "input_area", options: _options %>
63
+ <%= render "input_area", form: form, options: _options %>
64
64
  </div>
65
65
  <div class="form-text medium-contrast-text">
66
66
  <strong><%= case lang
@@ -1,7 +1,7 @@
1
1
  <%
2
- form = locals[:form]
3
- content = locals[:content]
4
- placeholder = locals[:placeholder]
2
+ _form = form
3
+ _content = content
4
+ placeholder = options[:placeholder]
5
5
  %>
6
6
 
7
7
  <div class="editor-container">
@@ -9,14 +9,14 @@
9
9
  contenteditable="true"
10
10
  data-field="content"
11
11
  class="form-control markdown-textarea">
12
- <%= raw content %>
12
+ <%= raw _content %>
13
13
  </div>
14
14
 
15
15
  <div id="editor_content_placeholder">
16
16
  <%= placeholder %>
17
17
  </div>
18
18
 
19
- <%= form.hidden_field :content, id: "content_hidden_field" %>
19
+ <%= _form.hidden_field _content, id: "content_hidden_field" %>
20
20
 
21
21
  <%= render "preview_area" %>
22
22
  </div>
@@ -10,6 +10,7 @@ module PonkotsuMdEditor
10
10
  module Helpers
11
11
  # Renders a Markdown editor component with the specified content and options
12
12
  #
13
+ # @param form [ActionView::Helpers::FormBuilder] Form builder object
13
14
  # @param content [String] Initial content to display in the editor (default: "")
14
15
  # @param options [Hash] Configuration options for the editor (default: {})
15
16
  # @return [String] Rendered HTML for the Markdown editor
@@ -22,7 +23,7 @@ module PonkotsuMdEditor
22
23
  # placeholder: "This is Placeholder."
23
24
  # }) %>
24
25
  def markdown_editor(form, content = "", options = {})
25
- render "editor", content: content, form: form, options: options
26
+ render "ponkotsu_md_editor/editor", content: content, form: form, options: options
26
27
  end
27
28
  end
28
29
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PonkotsuMdEditor
4
- VERSION = "0.1.3"
4
+ VERSION = "0.1.5"
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.1.3
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - dhq_boiler
@@ -36,12 +36,12 @@ files:
36
36
  - LICENSE.txt
37
37
  - README.md
38
38
  - Rakefile
39
- - lib/app/assets/javascripts/markdown_editor.js
40
- - lib/app/assets/stylesheets/markdown_editor.css
41
- - lib/app/ponkotsu/md/editor/_editor.html.erb
42
- - lib/app/ponkotsu/md/editor/_input_area.html.erb
43
- - lib/app/ponkotsu/md/editor/_preview_area.html.erb
44
- - lib/app/ponkotsu/md/editor/_toolbar.html.erb
39
+ - app/assets/javascripts/markdown_editor.js
40
+ - app/assets/stylesheets/markdown_editor.css
41
+ - app/views/ponkotsu_md_editor/_editor.html.erb
42
+ - app/views/ponkotsu_md_editor/_input_area.html.erb
43
+ - app/views/ponkotsu_md_editor/_preview_area.html.erb
44
+ - app/views/ponkotsu_md_editor/_toolbar.html.erb
45
45
  - lib/ponkotsu/md/editor.rb
46
46
  - lib/ponkotsu/md/editor/engine.rb
47
47
  - lib/ponkotsu/md/editor/helpers.rb