marksmith 0.5.1 → 0.6.0
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 +4 -4
- data/app/assets/javascripts/list_continuation_controller-full.esm.js +1 -1
- data/app/assets/javascripts/list_continuation_controller-no-stimulus.esm.js +1 -1
- data/app/assets/javascripts/marksmith_controller-full.esm.js +1 -1
- data/app/assets/javascripts/marksmith_controller-no-stimulus.esm.js +1 -1
- data/app/components/marksmith/markdown_field/show_component.html.erb +1 -1
- data/lib/marksmith/engine.rb +1 -1
- data/lib/marksmith/fields/markdown_field.rb +6 -1
- data/lib/marksmith/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8b913fa8159a4590c93af6720bdfb50b06264b2ce499af1d2deffa80931337ae
|
|
4
|
+
data.tar.gz: a063b009e1b2c79b8afbfc10f34e76778c036113945cf6756f31c41b47d5e0fa
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1b7a4838b92aea409e7fa2738404108a070933c32150bce6fd3f5b864452d7c31fcb0edcee62897d8844b9192f2d37f3392dfdcbf0c8929790bd8174415e5bd6
|
|
7
|
+
data.tar.gz: 03f9221733f68765ae810fd34d66b88983b5aa5f1a83d72daab690eed14714c1d06abccfaef03098ca0a88fe464c7b8dca5e24a9619f3e170958dd9e5db72f98
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
<%= field_wrapper **field_wrapper_args, full_width: true do %>
|
|
1
|
+
<%= field_wrapper **field_wrapper_args, full_width: true, collapsable: !@field.always_show do %>
|
|
2
2
|
<%= render partial: "marksmith/shared/rendered_body", locals: { body: Marksmith::Renderer.new(body: @field.value).render } %>
|
|
3
3
|
<% end %>
|
data/lib/marksmith/engine.rb
CHANGED
|
@@ -56,7 +56,7 @@ module Marksmith
|
|
|
56
56
|
require "marksmith/fields/markdown_field"
|
|
57
57
|
|
|
58
58
|
ActiveSupport.on_load(:avo_boot) do
|
|
59
|
-
Avo.plugin_manager.register :
|
|
59
|
+
Avo.plugin_manager.register :marksmith
|
|
60
60
|
|
|
61
61
|
Avo.plugin_manager.register_field :markdown, Marksmith::Fields::MarkdownField
|
|
62
62
|
Avo.plugin_manager.register_field :marksmith, Marksmith::Fields::MarkdownField
|
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
module Marksmith
|
|
2
2
|
module Fields
|
|
3
3
|
class MarkdownField < Avo::Fields::BaseField
|
|
4
|
+
# Avo >= 4.2 lets the editor viewport be resized with a persisted height.
|
|
5
|
+
resizable_editor target: ".marksmith-textarea" if respond_to?(:resizable_editor)
|
|
6
|
+
|
|
4
7
|
attr_reader :extra_preview_params,
|
|
5
|
-
:file_uploads
|
|
8
|
+
:file_uploads,
|
|
9
|
+
:always_show
|
|
6
10
|
|
|
7
11
|
def initialize(id, **args, &block)
|
|
8
12
|
@media_library = args[:media_library].nil? ? true : args[:media_library]
|
|
9
13
|
@extra_preview_params = args[:extra_preview_params] || {}
|
|
10
14
|
@file_uploads = args[:file_uploads]
|
|
15
|
+
@always_show = args[:always_show] || false
|
|
11
16
|
|
|
12
17
|
super(id, **args, &block)
|
|
13
18
|
|
data/lib/marksmith/version.rb
CHANGED