ponkotsu-md-editor 0.1.24 → 0.1.26
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6730ee55efac443136f63872557bf43feaa7fa820541351954f8e9fe4b19dbbf
|
|
4
|
+
data.tar.gz: 25b97dbbd103ae9ee6f514e1b2c2c4575cdea1aad778b499566d2b04f70b2b53
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fac5a317834db75048de901a310eaaaf1d4662d6da3d1cb77bebf1ad7b9874fa030b5283307aad0d928601417780d84579e74a3ed65e749b3b6e64ba54c025cf
|
|
7
|
+
data.tar.gz: 8f4ab954655e4bb8e0fd7aa78cd6f3c9549d26dad0e89c1c4227bbe4b0216bd0069a6ba051b9bf06848fac1e05b8b0b1fae4a1bc22b362c936773f0f0ec2f847
|
|
@@ -10,7 +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
|
|
13
|
+
# @param form [ActionView::Helpers::FormBuilder] Form builder object
|
|
14
14
|
# @param content [String] Initial content to display in the editor (default: "")
|
|
15
15
|
# @param options [Hash] Configuration options for the editor (default: {})
|
|
16
16
|
# @return [String] Rendered HTML for the Markdown editor
|
|
@@ -22,8 +22,9 @@ module PonkotsuMdEditor
|
|
|
22
22
|
# tools: [ :bold, :italic, :strikethrough ],
|
|
23
23
|
# placeholder: "This is Placeholder."
|
|
24
24
|
# }) %>
|
|
25
|
-
def markdown_editor(
|
|
26
|
-
|
|
25
|
+
def markdown_editor(form, content, options = {})
|
|
26
|
+
form = form[:form] if form.is_a?(Hash)
|
|
27
|
+
render "ponkotsu_md_editor/editor", locals: { content: content, form: form, options: options }
|
|
27
28
|
end
|
|
28
29
|
end
|
|
29
30
|
end
|