effective_bootstrap 0.11.10 → 0.11.12

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dc0e887c1347f08ce3e7e3efb529b87bb0ef4c0c60fa7486a7901f47dce05623
4
- data.tar.gz: ae0e0d7eb6135d1e6b9c7c21504389e9788588e858e1d310b27991714b73337a
3
+ metadata.gz: c7aeffb5b3abbf1a71b2092b995ab03f2945ec88fc62558fd6133cfe201ff17c
4
+ data.tar.gz: bf0bee697c97e88955e6d68ad44d54f5098987924fa6ea4dfd416fe9b9d0d5f2
5
5
  SHA512:
6
- metadata.gz: 3470fdd9bd0aaf4ccba3db1407454a993a6f0069ef66b2cbf62a99d12ca11924875808c580b43f84bcfea9476ed47f12242d901551805dc779bae54dc1fac582
7
- data.tar.gz: b685bc77c3a06a18dbe10649ffd10a05b1e8d9640b941ccd7cfd026f9e74c26e46dafe4a30c5c0f48eaaa345b8e65a617405f040c0b0394975c5fe9b999a10fa
6
+ metadata.gz: 0ca84d15a1a3c2cae9fee3481bcf79d3cf21427ce888752f4718036ca747b2da6abcf999c5d79ebb4a1c4f0c73174ab639164a27bb0fff586f67b68d65063fd6
7
+ data.tar.gz: 3d2b105641a41fcb866bf458e4efdac8b20dcd224377ff466bb0354df02bfdf2175de92e89f15312d9c2713a9a7d3dc32de710d1cc5735c1bef3a254be0c5560
@@ -5,17 +5,17 @@ module EffectiveArticleEditorHelper
5
5
  def render_article_editor_action_text_content(content)
6
6
  raise('expected content to be an ActionText content') unless content.kind_of?(ActionText::Content)
7
7
 
8
- rendered = render_action_text_content(content)
8
+ rendered = content.to_html
9
9
 
10
10
  if rendered.include?('effective-article-editor')
11
11
  doc = Nokogiri::HTML(rendered)
12
12
  doc.search('action-text-attachment').each { |fragment| fragment.remove }
13
13
 
14
14
  # Filter out <html><body>\n and \n</body></html>
15
- rendered = doc.inner_html.to_s[13..-16].html_safe
15
+ rendered = doc.inner_html.to_s[13..-16]
16
16
  end
17
17
 
18
- rendered
18
+ rendered.html_safe
19
19
  end
20
20
 
21
21
  end
@@ -12,11 +12,48 @@ module Effective
12
12
  custom: {
13
13
  css: ['/assets/effective_bootstrap_article_editor.css']
14
14
  },
15
+ align: {
16
+ 'left': 'text-left',
17
+ 'center': 'text-center',
18
+ 'right': 'text-right',
19
+ 'justify': false
20
+ },
21
+ makebutton: {
22
+ items: {
23
+ primary: {
24
+ title: 'Primary',
25
+ params: { classname: 'btn btn-primary' }
26
+ },
27
+ secondary: {
28
+ title: 'Secondary',
29
+ params: { classname: 'btn btn-secondary' }
30
+ },
31
+ danger: {
32
+ title: 'Danger',
33
+ params: { classname: 'btn btn-danger' }
34
+ },
35
+ primary_large: {
36
+ title: 'Primary (large)',
37
+ params: { classname: 'btn btn-lg btn-primary' }
38
+ },
39
+ secondary_large: {
40
+ title: 'Secondary (large)',
41
+ params: { classname: 'btn btn-lg btn-secondary' }
42
+ },
43
+ danger_large: {
44
+ title: 'Danger (large)',
45
+ params: { classname: 'btn btn-lg btn-danger' }
46
+ }
47
+ }
48
+ },
15
49
  classes: {
16
- body: 'article-editor-body',
17
50
  table: 'table'
18
51
  },
52
+ embed: {
53
+ script: false # do not strip out script tag from embeds
54
+ },
19
55
  filelink: nil,
56
+ format: ['p', 'h2', 'h3', 'h4', 'h5', 'ul', 'ol'],
20
57
  grid: {
21
58
  classname: 'row',
22
59
  columns: 12,
@@ -26,26 +63,29 @@ module Effective
26
63
  right: '15px',
27
64
  },
28
65
  patterns: {
29
- '6|6': 'col-sm-6|col-sm-6',
30
- '4|4|4': 'col-sm-4|col-sm-4|col-sm-4',
31
- '3|3|3|3': 'col-sm-3|col-sm-3|col-sm-3|col-sm-3',
32
- '2|2|2|2|2|2': 'col-sm-2|col-sm-2|col-sm-2|col-sm-2|col-sm-2|col-sm-2',
33
- '3|6|3': 'col-sm-3|col-sm-6|col-sm-3',
34
- '2|8|2': 'col-sm-2|col-sm-8|col-sm-2',
35
- '5|7': 'col-sm-5|col-sm-7',
36
- '7|5': 'col-sm-7|col-sm-5',
37
- '4|8': 'col-sm-4|col-sm-8',
38
- '8|4': 'col-sm-8|col-sm-4',
39
- '3|9': 'col-sm-3|col-sm-9',
40
- '9|3': 'col-sm-9|col-sm-3',
41
- '2|10': 'col-sm-2|col-sm-10',
42
- '10|2': 'col-sm-10|col-sm-2',
43
- '12': 'col-sm-12'
66
+ '6|6': 'col-md-6|col-md-6',
67
+ '4|4|4': 'col-md-4|col-md-4|col-md-4',
68
+ '3|3|3|3': 'col-md-3|col-md-3|col-md-3|col-md-3',
69
+ '2|2|2|2|2|2': 'col-md-2|col-md-2|col-md-2|col-md-2|col-md-2|col-md-2',
70
+ '3|6|3': 'col-md-3|col-md-6|col-md-3',
71
+ '2|8|2': 'col-md-2|col-md-8|col-md-2',
72
+ '5|7': 'col-md-5|col-md-7',
73
+ '7|5': 'col-md-7|col-md-5',
74
+ '4|8': 'col-md-4|col-md-8',
75
+ '8|4': 'col-md-8|col-md-4',
76
+ '3|9': 'col-md-3|col-md-9',
77
+ '9|3': 'col-md-9|col-md-3',
78
+ '2|10': 'col-md-2|col-md-10',
79
+ '10|2': 'col-md-10|col-md-2',
80
+ '12': 'col-md-12'
44
81
  }
45
82
  },
46
- plugins: ['blockcode', 'carousel', 'cellcolor', 'collapse', 'imageposition', 'imageresize', 'inlineformat', 'listitem', 'removeformat', 'reorder', 'style', 'filelink'],
83
+ layer: false, # the layer button is confusing for the layperson
84
+ link: { size: 500 }, # truncate after this length
85
+ outset: false, # tricky to design around
86
+ plugins: ['blockcode', 'carousel', 'cellcolor', 'collapse', 'filelink', 'imageposition', 'imageresize', 'inlineformat', 'listitem', 'makebutton', 'removeformat', 'reorder', 'style'],
47
87
  quote: {
48
- template: '<blockquote><p></p></blockquote>'
88
+ template: '<blockquote class="blockquote text-center"><p class="mb-0"><strong>A well-known quote, contained in a blockquote element.</strong></p></blockquote>'
49
89
  },
50
90
  styles: {
51
91
  table: {
@@ -1,3 +1,3 @@
1
1
  module EffectiveBootstrap
2
- VERSION = '0.11.10'.freeze
2
+ VERSION = '0.11.12'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_bootstrap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.10
4
+ version: 0.11.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-10-11 00:00:00.000000000 Z
11
+ date: 2022-10-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails