ponkotsu-md-editor 0.1.2 → 0.1.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: '094a76006ea2e66ea15d4f6035c0af4af782a25412658a8d6522508928618ac1'
4
- data.tar.gz: c914be22aebc2acaa259f3da21a7f139f6564d429121dd47bef0b26708c0fe8f
3
+ metadata.gz: 95bbeed5ae3fc8d9b2566bd53e3579ea3c751734575148b7106a33b77a3a485a
4
+ data.tar.gz: 13196465f96b620965ab53990f01c0bfa13be83e62895dab31fae691a7c2b545
5
5
  SHA512:
6
- metadata.gz: cbf47e74bcea4b079f4270210bfbf2ccfbaac0b1f28abe429f30cdd5996967c65f06cf7cdfe2ec095b7c9bacb170bef68e380dfb3373abb5057bf4de971d4487
7
- data.tar.gz: 499f2f0f4798fe158f7321ae01dc435342dd0d1317fc8a764d831022150ff67b6cbdfa6c315352a079ab3221fc37839f8219ce04a52bc54e796361412a77c806
6
+ metadata.gz: 425b187b1afad1e0d3041da690ab87adffcb50b8dfbd8b85d7934dd8dd86a42392e547efeca5a5b87a7633bed646e0ac65d1c8363d566380d3c58a65d7251a7c
7
+ data.tar.gz: c5abfa48b4813665ecc44769ab66a03c5aa4db792831b9374863081ebbd5a92a2fbad423da7c3c5de8b850ad7cb7d98196ab845565af593f2546ec05abb1c562
@@ -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>
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "editor/"
4
-
5
3
  module PonkotsuMdEditor
6
4
  class Error < StandardError; end
7
5
  # Your code goes here...
@@ -12,6 +10,7 @@ module PonkotsuMdEditor
12
10
  module Helpers
13
11
  # Renders a Markdown editor component with the specified content and options
14
12
  #
13
+ # @param form [ActionView::Helpers::FormBuilder] Form builder object
15
14
  # @param content [String] Initial content to display in the editor (default: "")
16
15
  # @param options [Hash] Configuration options for the editor (default: {})
17
16
  # @return [String] Rendered HTML for the Markdown editor
@@ -24,7 +23,7 @@ module PonkotsuMdEditor
24
23
  # placeholder: "This is Placeholder."
25
24
  # }) %>
26
25
  def markdown_editor(form, content = "", options = {})
27
- render "editor", content: content, form: form, options: options
26
+ render "ponkotsu_md_editor/editor", content: content, form: form, options: options
28
27
  end
29
28
  end
30
29
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PonkotsuMdEditor
4
- VERSION = "0.1.2"
4
+ VERSION = "0.1.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.1.2
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - dhq_boiler
@@ -38,10 +38,10 @@ files:
38
38
  - Rakefile
39
39
  - lib/app/assets/javascripts/markdown_editor.js
40
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
41
+ - lib/app/views/ponkotsu_md_editor/_editor.html.erb
42
+ - lib/app/views/ponkotsu_md_editor/_input_area.html.erb
43
+ - lib/app/views/ponkotsu_md_editor/_preview_area.html.erb
44
+ - lib/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