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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dbea84daf14b0cab90133771f9d26505444de0aa469d28a0f51d2fdb1994d2c9
4
- data.tar.gz: 754e03293a485251d0b5cac5dc48ee1d5214569a884946e3dda554c691a7d51d
3
+ metadata.gz: 8b913fa8159a4590c93af6720bdfb50b06264b2ce499af1d2deffa80931337ae
4
+ data.tar.gz: a063b009e1b2c79b8afbfc10f34e76778c036113945cf6756f31c41b47d5e0fa
5
5
  SHA512:
6
- metadata.gz: cfbabde6a50498855311b9dd7a017ac52886387e57b8dfc57d2c0b4c1535beed32f9d4111816ed91904e6cc8873f18ff9b6d5f9f352631a2f3063eb0509ab048
7
- data.tar.gz: 0757d7e8d1c6d7c479f75e081aaf7a5fede993ae1a15b03217163f864f3f4627e9db8c9561260b1faa1850e0ae61f5e2a2b0a9e28bc6b077e9caec2c4680fb66
6
+ metadata.gz: 1b7a4838b92aea409e7fa2738404108a070933c32150bce6fd3f5b864452d7c31fcb0edcee62897d8844b9192f2d37f3392dfdcbf0c8929790bd8174415e5bd6
7
+ data.tar.gz: 03f9221733f68765ae810fd34d66b88983b5aa5f1a83d72daab690eed14714c1d06abccfaef03098ca0a88fe464c7b8dca5e24a9619f3e170958dd9e5db72f98
@@ -1,5 +1,5 @@
1
1
  /*!
2
- Marksmith 0.5.1
2
+ Marksmith 0.6.0
3
3
  */
4
4
  var ListContinuationController = (function () {
5
5
  'use strict';
@@ -1,5 +1,5 @@
1
1
  /*!
2
- Marksmith 0.5.1
2
+ Marksmith 0.6.0
3
3
  */
4
4
  var ListContinuationController = (function (stimulus) {
5
5
  'use strict';
@@ -1,5 +1,5 @@
1
1
  /*!
2
- Marksmith 0.5.1
2
+ Marksmith 0.6.0
3
3
  */
4
4
  var MarksmithController = (function () {
5
5
  'use strict';
@@ -1,5 +1,5 @@
1
1
  /*!
2
- Marksmith 0.5.1
2
+ Marksmith 0.6.0
3
3
  */
4
4
  var MarksmithController = (function (stimulus) {
5
5
  'use strict';
@@ -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 %>
@@ -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 :marksmith_field
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
 
@@ -1,3 +1,3 @@
1
1
  module Marksmith
2
- VERSION = "0.5.1"
2
+ VERSION = "0.6.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: marksmith
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adrian Marin