trestle-tinymce 0.4.0.pre → 0.4.0.pre2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/rspec.yml +18 -0
- data/.rspec +1 -0
- data/README.md +28 -10
- data/Rakefile +5 -0
- data/app/assets/bundle/tinymce/skins/ui/trestle/{content.css → tinymce-5/content.css} +1 -1
- data/app/assets/bundle/tinymce/skins/ui/trestle/{content.inline.css → tinymce-5/content.inline.css} +1 -1
- data/app/assets/bundle/tinymce/skins/ui/trestle/tinymce-5/content.inline.min.css +8 -0
- data/app/assets/bundle/tinymce/skins/ui/trestle/{content.inline.min.css.map → tinymce-5/content.inline.min.css.map} +1 -1
- data/app/assets/bundle/tinymce/skins/ui/trestle/tinymce-5/content.min.css +8 -0
- data/app/assets/bundle/tinymce/skins/ui/trestle/{content.min.css.map → tinymce-5/content.min.css.map} +1 -1
- data/app/assets/bundle/tinymce/skins/ui/trestle/{skin.css → tinymce-5/skin.css} +13 -13
- data/app/assets/bundle/tinymce/skins/ui/trestle/{skin.min.css → tinymce-5/skin.min.css} +1 -1
- data/app/assets/bundle/tinymce/skins/ui/trestle/tinymce-5/skin.min.css.map +1 -0
- data/app/assets/bundle/tinymce/skins/ui/trestle/tinymce-6/content.css +791 -0
- data/app/assets/bundle/tinymce/skins/ui/trestle/tinymce-6/content.inline.css +779 -0
- data/app/assets/bundle/tinymce/skins/ui/trestle/tinymce-6/content.inline.js +2 -0
- data/app/assets/bundle/tinymce/skins/ui/trestle/tinymce-6/content.inline.js.map +1 -0
- data/app/assets/bundle/tinymce/skins/ui/trestle/tinymce-6/content.inline.min.css +2 -0
- data/app/assets/bundle/tinymce/skins/ui/trestle/tinymce-6/content.inline.min.css.map +1 -0
- data/app/assets/bundle/tinymce/skins/ui/trestle/tinymce-6/content.js +2 -0
- data/app/assets/bundle/tinymce/skins/ui/trestle/tinymce-6/content.js.map +1 -0
- data/app/assets/bundle/tinymce/skins/ui/trestle/tinymce-6/content.min.css +2 -0
- data/app/assets/bundle/tinymce/skins/ui/trestle/tinymce-6/content.min.css.map +1 -0
- data/app/assets/bundle/tinymce/skins/ui/trestle/tinymce-6/skin.css +3879 -0
- data/app/assets/bundle/tinymce/skins/ui/trestle/tinymce-6/skin.js +2 -0
- data/app/assets/bundle/tinymce/skins/ui/trestle/tinymce-6/skin.js.map +1 -0
- data/app/assets/bundle/tinymce/skins/ui/trestle/tinymce-6/skin.min.css +2 -0
- data/app/assets/bundle/tinymce/skins/ui/trestle/tinymce-6/skin.min.css.map +1 -0
- data/app/assets/bundle/tinymce/skins/ui/trestle/tinymce-6/skin.shadowdom.css +30 -0
- data/app/assets/bundle/tinymce/skins/ui/trestle/tinymce-6/skin.shadowdom.js +2 -0
- data/app/assets/bundle/tinymce/skins/ui/trestle/tinymce-6/skin.shadowdom.js.map +1 -0
- data/app/assets/bundle/tinymce/skins/ui/trestle/tinymce-6/skin.shadowdom.min.css +2 -0
- data/app/assets/bundle/tinymce/skins/ui/trestle/tinymce-6/skin.shadowdom.min.css.map +1 -0
- data/app/assets/bundle/trestle/tinymce.js +1 -1
- data/config/initializers/trestle.rb +10 -13
- data/frontend/js/controllers/tinymce_controller.js +8 -1
- data/frontend/js/index.js +7 -0
- data/lib/trestle/tinymce/configuration.rb +7 -0
- data/lib/trestle/tinymce/engine.rb +4 -2
- data/lib/trestle/tinymce/version.rb +1 -1
- data/lib/trestle/tinymce.rb +4 -0
- data/package.json +2 -2
- data/src/{trestle → tinymce-5}/skin.less +30 -7
- data/src/tinymce-6/content.inline.less +1 -0
- data/src/tinymce-6/content.less +16 -0
- data/src/tinymce-6/skin.less +297 -0
- data/src/tinymce-6/skin.shadowdom.less +1 -0
- data/trestle-tinymce.gemspec +4 -2
- data/yarn.lock +1156 -1233
- metadata +71 -26
- data/app/assets/bundle/tinymce/skins/ui/trestle/content.inline.min.css +0 -8
- data/app/assets/bundle/tinymce/skins/ui/trestle/content.min.css +0 -8
- data/app/assets/bundle/tinymce/skins/ui/trestle/skin.min.css.map +0 -1
- /data/app/assets/bundle/tinymce/skins/ui/trestle/{content.mobile.css → tinymce-5/content.mobile.css} +0 -0
- /data/app/assets/bundle/tinymce/skins/ui/trestle/{content.mobile.min.css → tinymce-5/content.mobile.min.css} +0 -0
- /data/app/assets/bundle/tinymce/skins/ui/trestle/{content.mobile.min.css.map → tinymce-5/content.mobile.min.css.map} +0 -0
- /data/app/assets/bundle/tinymce/skins/ui/trestle/{fonts → tinymce-5/fonts}/tinymce-mobile.woff +0 -0
- /data/app/assets/bundle/tinymce/skins/ui/trestle/{skin.mobile.css → tinymce-5/skin.mobile.css} +0 -0
- /data/app/assets/bundle/tinymce/skins/ui/trestle/{skin.mobile.min.css → tinymce-5/skin.mobile.min.css} +0 -0
- /data/app/assets/bundle/tinymce/skins/ui/trestle/{skin.mobile.min.css.map → tinymce-5/skin.mobile.min.css.map} +0 -0
- /data/src/{trestle → tinymce-5}/content.inline.less +0 -0
- /data/src/{trestle → tinymce-5}/content.less +0 -0
- /data/src/{trestle → tinymce-5}/content.mobile.less +0 -0
- /data/src/{trestle → tinymce-5}/skin.mobile.less +0 -0
@@ -1,6 +1,13 @@
|
|
1
1
|
/* global Trestle, tinymce */
|
2
2
|
|
3
3
|
export default class extends Trestle.ApplicationController {
|
4
|
+
static values = {
|
5
|
+
configuration: {
|
6
|
+
type: String,
|
7
|
+
default: 'default'
|
8
|
+
}
|
9
|
+
}
|
10
|
+
|
4
11
|
connect () {
|
5
12
|
tinymce.init({
|
6
13
|
target: this.element,
|
@@ -17,6 +24,6 @@ export default class extends Trestle.ApplicationController {
|
|
17
24
|
}
|
18
25
|
|
19
26
|
get configuration () {
|
20
|
-
return Trestle.TinyMCE.
|
27
|
+
return Trestle.TinyMCE[this.configurationValue]
|
21
28
|
}
|
22
29
|
}
|
data/frontend/js/index.js
CHANGED
@@ -6,3 +6,10 @@ import TinyMCEController from './controllers/tinymce_controller'
|
|
6
6
|
Trestle.TinyMCE = {}
|
7
7
|
|
8
8
|
Stimulus.register('tinymce', TinyMCEController)
|
9
|
+
|
10
|
+
// Prevent Bootstrap dialog from blocking focusin
|
11
|
+
document.addEventListener('focusin', (e) => {
|
12
|
+
if (e.target.closest(".tox-tinymce-aux, .moxman-window, .tam-assetmanager-root") !== null) {
|
13
|
+
e.stopImmediatePropagation()
|
14
|
+
}
|
15
|
+
})
|
@@ -3,6 +3,13 @@ module Trestle
|
|
3
3
|
class Configuration
|
4
4
|
include Configurable
|
5
5
|
include Configurable::Open
|
6
|
+
|
7
|
+
def to_javascript
|
8
|
+
options.map { |name, configuration|
|
9
|
+
config = ::TinyMCE::Rails::Configuration.new(configuration.as_json.with_indifferent_access)
|
10
|
+
"Trestle.TinyMCE.#{name} = #{config.to_javascript};"
|
11
|
+
}.join("\n")
|
12
|
+
end
|
6
13
|
end
|
7
14
|
end
|
8
15
|
end
|
@@ -3,8 +3,10 @@ require "tinymce/rails"
|
|
3
3
|
module Trestle
|
4
4
|
module TinyMCE
|
5
5
|
class Engine < Rails::Engine
|
6
|
-
config.assets
|
7
|
-
|
6
|
+
if config.respond_to?(:assets)
|
7
|
+
config.assets.precompile << "trestle/tinymce.manifest.js" # Sprockets 4 manifest
|
8
|
+
config.assets.precompile << "trestle/tinymce.js" # Sprockets 3
|
9
|
+
end
|
8
10
|
end
|
9
11
|
end
|
10
12
|
end
|
data/lib/trestle/tinymce.rb
CHANGED
@@ -5,6 +5,10 @@ module Trestle
|
|
5
5
|
require_relative "tinymce/version"
|
6
6
|
require_relative "tinymce/configuration"
|
7
7
|
require_relative "tinymce/field"
|
8
|
+
|
9
|
+
def self.tinymce_major_version
|
10
|
+
::TinyMCE::Rails::VERSION.split(".")[0].to_i
|
11
|
+
end
|
8
12
|
end
|
9
13
|
|
10
14
|
Configuration.option :tinymce, TinyMCE::Configuration.new
|
data/package.json
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
{
|
2
2
|
"name": "trestle-tinymce",
|
3
|
-
"version": "0.
|
3
|
+
"version": "0.4.0-pre2",
|
4
4
|
"description": "TinyMCE plugin for the Trestle admin framework",
|
5
5
|
"main": "frontend/js/index.js",
|
6
6
|
"repository": "https://github.com/TrestleAdmin/trestle-tinymce.git",
|
7
7
|
"author": "Sam Pohlenz <sam@sampohlenz.com>",
|
8
|
-
"license": "LGPL-3.0",
|
8
|
+
"license": "LGPL-3.0-only",
|
9
9
|
"private": false,
|
10
10
|
"scripts": {
|
11
11
|
"dev": "webpack --mode development",
|
@@ -3,6 +3,7 @@
|
|
3
3
|
// Root variables
|
4
4
|
|
5
5
|
@background-color: #f5f5f5;
|
6
|
+
|
6
7
|
@color-tint: #4d6bb2;
|
7
8
|
@color-error: #e17572;
|
8
9
|
@color-success: #7dc67d;
|
@@ -22,13 +23,16 @@
|
|
22
23
|
// Button
|
23
24
|
|
24
25
|
@button-border-radius: .3rem;
|
26
|
+
|
25
27
|
@button-background-color: @color-success;
|
28
|
+
@button-text-color: white;
|
29
|
+
|
26
30
|
@button-font-size: 1.35rem;
|
27
31
|
@button-font-weight: 400;
|
28
32
|
@button-line-height: 1.5;
|
33
|
+
|
29
34
|
@button-padding-x: 1.25rem;
|
30
35
|
@button-padding-y: .5rem;
|
31
|
-
@button-text-color: white;
|
32
36
|
|
33
37
|
@button-focus-box-shadow: inset 0 1px 0 hsla(0, 0%, 100%, .15), 0 1px 1px rgba(0, 0, 0, .075), 0 0 0 .2rem rgba(145, 207, 145, .5);
|
34
38
|
|
@@ -82,6 +86,7 @@
|
|
82
86
|
@dialog-footer-padding: 1.5rem;
|
83
87
|
@dialog-footer-separator-border: 1px solid rgba(0, 0, 0, .1);
|
84
88
|
|
89
|
+
@dialog-body-font-size: 1rem;
|
85
90
|
@dialog-body-padding: 1.5rem;
|
86
91
|
|
87
92
|
@dialog-title-font-size: 1.3rem;
|
@@ -157,14 +162,10 @@
|
|
157
162
|
|
158
163
|
// Dialog
|
159
164
|
|
160
|
-
.tox-dialog__body {
|
161
|
-
font-size: 1rem;
|
162
|
-
}
|
163
|
-
|
164
165
|
.tox-dialog__header {
|
165
166
|
background-color: hsl(var(--primary-h), var(--primary-s), calc(var(--primary-l) * .8));
|
166
|
-
background-image: linear-gradient(rgba(white, .05), rgba(black, .05));
|
167
|
-
background-repeat: no-repeat;
|
167
|
+
background-image: var(--theme-texture, none), var(--theme-gradient, linear-gradient(rgba(white, .05), rgba(black, .05)));
|
168
|
+
background-repeat: repeat, no-repeat;
|
168
169
|
|
169
170
|
.tox-button {
|
170
171
|
margin: -10px .25rem -10px 0;
|
@@ -230,6 +231,12 @@
|
|
230
231
|
align-items: flex-start;
|
231
232
|
}
|
232
233
|
|
234
|
+
// Collection
|
235
|
+
|
236
|
+
.tox-collection--grid .tox-collection__group {
|
237
|
+
max-height: 264px;
|
238
|
+
}
|
239
|
+
|
233
240
|
// Form
|
234
241
|
|
235
242
|
.tox-textfield {
|
@@ -262,3 +269,19 @@
|
|
262
269
|
}
|
263
270
|
}
|
264
271
|
}
|
272
|
+
|
273
|
+
// Testing
|
274
|
+
|
275
|
+
// :root {
|
276
|
+
// // --primary: #338ab7;
|
277
|
+
// // --primary-rgb: 51, 138, 183;
|
278
|
+
// // --primary-h: 200;
|
279
|
+
// // --primary-s: 56%;
|
280
|
+
// // --primary-l: 46%;
|
281
|
+
|
282
|
+
// --primary: #e50914;
|
283
|
+
// --primary-rgb: 229, 9, 20;
|
284
|
+
// --primary-h: 357;
|
285
|
+
// --primary-s: 92%;
|
286
|
+
// --primary-l: 47%;
|
287
|
+
// }
|
@@ -0,0 +1 @@
|
|
1
|
+
@import 'src/less/theme/content-ui';
|
@@ -0,0 +1,16 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright (c) Tiny Technologies, Inc. All rights reserved.
|
3
|
+
* Licensed under the LGPL or a commercial license.
|
4
|
+
* For LGPL see License.txt in the project root for license information.
|
5
|
+
* For commercial licenses see https://www.tiny.cloud/
|
6
|
+
*/
|
7
|
+
|
8
|
+
@import 'src/less/theme/content-ui';
|
9
|
+
|
10
|
+
body {
|
11
|
+
font-family: sans-serif;
|
12
|
+
}
|
13
|
+
|
14
|
+
table {
|
15
|
+
border-collapse: collapse;
|
16
|
+
}
|
@@ -0,0 +1,297 @@
|
|
1
|
+
@import '../../../theme/theme';
|
2
|
+
|
3
|
+
// Root variables
|
4
|
+
|
5
|
+
@background-color: #f5f5f5;
|
6
|
+
|
7
|
+
@color-tint: #4d6bb2;
|
8
|
+
@color-error: #e17572;
|
9
|
+
@color-success: #7dc67d;
|
10
|
+
|
11
|
+
@control-border-radius: .375rem;
|
12
|
+
|
13
|
+
@tinymce-border-width: 1px;
|
14
|
+
@tinymce-border-radius: @control-border-radius;
|
15
|
+
@tinymce-border-color: #ccc;
|
16
|
+
|
17
|
+
@pad-xs: 2px;
|
18
|
+
|
19
|
+
// Font
|
20
|
+
|
21
|
+
@line-height-base: 1.5;
|
22
|
+
|
23
|
+
// Button
|
24
|
+
|
25
|
+
@button-border-radius: .375rem;
|
26
|
+
|
27
|
+
@button-background-color: @color-success;
|
28
|
+
@button-text-color: white;
|
29
|
+
|
30
|
+
@button-font-size: 1.35rem;
|
31
|
+
@button-font-weight: 400;
|
32
|
+
@button-line-height: 1.5;
|
33
|
+
|
34
|
+
@button-padding-x: 1.25rem;
|
35
|
+
@button-padding-y: .5rem;
|
36
|
+
|
37
|
+
@button-focus-box-shadow: inset 0 1px 0 hsla(0, 0%, 100%, .15), 0 1px 1px rgba(0, 0, 0, .075), 0 0 0 .2rem rgba(145, 207, 145, .5);
|
38
|
+
|
39
|
+
@button-hover-background-color: #6aa86a;
|
40
|
+
@button-hover-border-color: #649e64;
|
41
|
+
|
42
|
+
@button-active-background-color: #649e64;
|
43
|
+
@button-active-border-color: #5e955e;
|
44
|
+
@button-active-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
|
45
|
+
|
46
|
+
// Toolbar
|
47
|
+
|
48
|
+
@toolbar-group-padding-x: 6px;
|
49
|
+
|
50
|
+
@toolbar-button-hover-background-color: rgba(var(--primary-rgb), .15);
|
51
|
+
@toolbar-button-enabled-background-color: rgba(var(--primary-rgb), .3);
|
52
|
+
|
53
|
+
@collection-list-item-label-active-text-color: @color-black;
|
54
|
+
@collection-toolbar-item-label-active-text-color: @color-black;
|
55
|
+
@collection-grid-item-label-active-text-color: @color-black;
|
56
|
+
|
57
|
+
// Checkbox
|
58
|
+
|
59
|
+
@checkbox-selected-color: #4d6bb2;
|
60
|
+
|
61
|
+
@checkbox-focus-box-shadow: 0 0 0 .2rem rgba(@color-tint, .25);
|
62
|
+
|
63
|
+
// Secondary button
|
64
|
+
|
65
|
+
@button-secondary-background-color: #bbb;
|
66
|
+
@button-secondary-border-radius: .2rem;
|
67
|
+
@button-secondary-text-color: white;
|
68
|
+
|
69
|
+
@button-secondary-focus-box-shadow: inset 0 1px 0 hsla(0, 0%, 100%, .15), 0 1px 1px rgba(0, 0, 0, .075), 0 0 0 .2rem hsla(0, 0%, 77.3%, .5);
|
70
|
+
|
71
|
+
@button-secondary-hover-background-color: #a8a8a8;
|
72
|
+
@button-secondary-hover-border-color: #a2a2a2;
|
73
|
+
|
74
|
+
@button-secondary-active-background-color: #a8a8a8;
|
75
|
+
@button-secondary-active-border-color: #a2a2a2;
|
76
|
+
@button-secondary-active-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
|
77
|
+
|
78
|
+
// Menu
|
79
|
+
|
80
|
+
@menu-background-color: #fff;
|
81
|
+
|
82
|
+
// Dialog
|
83
|
+
|
84
|
+
@dialog-backdrop-background-color: fade(#000, 50);
|
85
|
+
@dialog-backdrop-background-color-opaque: #000;
|
86
|
+
|
87
|
+
@dialog-background-color: #fff;
|
88
|
+
|
89
|
+
@dialog-border-radius: 0;
|
90
|
+
@dialog-border-width: 0;
|
91
|
+
@dialog-box-shadow: 0 .0625rem .09375em -.25rem rgba(0, 0, 0, .25), 0 .125rem .1875em -.25rem rgba(0, 0, 0, .25), 0 .25rem .375em -.25rem rgba(0, 0, 0, .25), 0 .5rem .75em -.25rem rgba(0, 0, 0, .25), 0 1rem 1.5em -.25rem rgba(0, 0, 0, .25);
|
92
|
+
|
93
|
+
@dialog-header-background-color: darken(@color-tint, 15%);
|
94
|
+
@dialog-header-padding: 1.05rem .5rem 1.05rem 1.5rem;
|
95
|
+
|
96
|
+
@dialog-footer-background-color: #f9f9f9;
|
97
|
+
@dialog-footer-padding: 1.5rem;
|
98
|
+
@dialog-footer-separator-border: 1px solid rgba(0, 0, 0, .1);
|
99
|
+
|
100
|
+
@dialog-body-font-size: 1rem;
|
101
|
+
@dialog-body-padding: 1.5rem;
|
102
|
+
|
103
|
+
@dialog-title-font-size: 1.3rem;
|
104
|
+
@dialog-title-font-weight: 500;
|
105
|
+
@dialog-title-text-color: white;
|
106
|
+
|
107
|
+
@dialog-nav-focus-background-color: none;
|
108
|
+
|
109
|
+
// Label
|
110
|
+
|
111
|
+
@input-label-font-weight: bold;
|
112
|
+
@input-label-line-height: 2;
|
113
|
+
@input-label-text-color: #333;
|
114
|
+
|
115
|
+
// Form
|
116
|
+
|
117
|
+
@textfield-background-color: #fff;
|
118
|
+
@textfield-border-radius: @control-border-radius;
|
119
|
+
@textfield-font-size: 1rem;
|
120
|
+
@textfield-line-height: 1.5;
|
121
|
+
@textfield-pad-x: .75rem;
|
122
|
+
@textfield-pad-y: .375rem;
|
123
|
+
|
124
|
+
@textfield-focus-border-color: hsl(var(--primary-h), var(--primary-s), calc(var(--primary-l) * 1.5));
|
125
|
+
@textfield-focus-box-shadow: 0 0 0 .25rem rgba(var(--primary-rgb), .25);
|
126
|
+
|
127
|
+
// Form layout
|
128
|
+
|
129
|
+
@form-group-vertical-spacing: .75rem;
|
130
|
+
@form-group-horizontal-spacing: 1rem;
|
131
|
+
@form-grid-horizontal-gap: 20px;
|
132
|
+
|
133
|
+
// Additional customization
|
134
|
+
|
135
|
+
.tox {
|
136
|
+
// Buttons
|
137
|
+
|
138
|
+
.tox-button {
|
139
|
+
transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out;
|
140
|
+
|
141
|
+
@media @breakpoint-sm {
|
142
|
+
font-size: 1.25rem;
|
143
|
+
padding: .35rem .75rem;
|
144
|
+
}
|
145
|
+
}
|
146
|
+
|
147
|
+
.tox-button--secondary {
|
148
|
+
font-size: .875rem;
|
149
|
+
padding: .25rem .65rem;
|
150
|
+
|
151
|
+
@media @breakpoint-sm {
|
152
|
+
font-size: .75rem;
|
153
|
+
padding: .2rem .5rem;
|
154
|
+
}
|
155
|
+
}
|
156
|
+
|
157
|
+
// Checkbox
|
158
|
+
|
159
|
+
.tox-checkbox__icons {
|
160
|
+
height: 1.15em;
|
161
|
+
overflow: hidden;
|
162
|
+
padding: 0 !important;
|
163
|
+
width: 1.15em;
|
164
|
+
|
165
|
+
.tox-checkbox-icon__checked svg {
|
166
|
+
fill: var(--primary);
|
167
|
+
}
|
168
|
+
}
|
169
|
+
|
170
|
+
input.tox-checkbox__input:focus + .tox-checkbox__icons {
|
171
|
+
box-shadow: 0 0 0 .2rem rgba(var(--primary-rgb), .25);
|
172
|
+
}
|
173
|
+
|
174
|
+
// Dialog
|
175
|
+
|
176
|
+
.tox-dialog__header {
|
177
|
+
background-color: hsl(var(--primary-h), var(--primary-s), calc(var(--primary-l) * .8));
|
178
|
+
background-image: var(--theme-texture, none), var(--theme-gradient, linear-gradient(rgba(white, .05), rgba(black, .05)));
|
179
|
+
background-repeat: repeat, no-repeat;
|
180
|
+
|
181
|
+
.tox-button {
|
182
|
+
margin: -10px .25rem -10px 0;
|
183
|
+
opacity: .75;
|
184
|
+
padding: .25rem;
|
185
|
+
|
186
|
+
path {
|
187
|
+
fill: white;
|
188
|
+
}
|
189
|
+
|
190
|
+
&:hover:not(:disabled) {
|
191
|
+
background-color: transparent;
|
192
|
+
border-color: transparent;
|
193
|
+
opacity: 1;
|
194
|
+
}
|
195
|
+
}
|
196
|
+
}
|
197
|
+
|
198
|
+
.tox-dialog__title {
|
199
|
+
text-shadow: rgba(0, 0, 0, .5) 0 1px 1px;
|
200
|
+
}
|
201
|
+
|
202
|
+
.tox-dialog__body-nav {
|
203
|
+
align-items: stretch;
|
204
|
+
background: #f3f3f3;
|
205
|
+
padding: 15px 0 15px 10px;
|
206
|
+
|
207
|
+
@media @breakpoint-sm {
|
208
|
+
padding: 10px 15px;
|
209
|
+
}
|
210
|
+
}
|
211
|
+
|
212
|
+
.tox-dialog__body-nav-item {
|
213
|
+
background-color: #eee;
|
214
|
+
border-bottom: 0;
|
215
|
+
color: #555;
|
216
|
+
font-weight: 500;
|
217
|
+
margin-bottom: 0;
|
218
|
+
margin-top: 4px;
|
219
|
+
padding: 10px 20px;
|
220
|
+
|
221
|
+
@media @breakpoint-sm {
|
222
|
+
font-size: .95rem;
|
223
|
+
margin-top: 0;
|
224
|
+
padding: 10px;
|
225
|
+
|
226
|
+
body:not(.tox-force-desktop) & {
|
227
|
+
&:not(:first-child) {
|
228
|
+
margin-right: 2px;
|
229
|
+
}
|
230
|
+
}
|
231
|
+
}
|
232
|
+
}
|
233
|
+
|
234
|
+
.tox-dialog__body-nav-item--active {
|
235
|
+
background-color: white;
|
236
|
+
border-bottom: 0;
|
237
|
+
color: #333;
|
238
|
+
}
|
239
|
+
|
240
|
+
.tox-dialog__footer-end,
|
241
|
+
.tox-dialog__footer-start {
|
242
|
+
align-items: flex-start;
|
243
|
+
}
|
244
|
+
|
245
|
+
// Collection
|
246
|
+
|
247
|
+
.tox-collection--grid .tox-collection__group {
|
248
|
+
max-height: 264px;
|
249
|
+
}
|
250
|
+
|
251
|
+
// Form
|
252
|
+
|
253
|
+
.tox-textfield {
|
254
|
+
transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
|
255
|
+
|
256
|
+
&:focus {
|
257
|
+
border-color: hsl(var(--primary-h), var(--primary-s), calc(var(--primary-l) * 1.5));
|
258
|
+
box-shadow: 0 0 0 .2rem rgba(var(--primary-rgb), .25);
|
259
|
+
}
|
260
|
+
}
|
261
|
+
|
262
|
+
&:not([dir=rtl]) {
|
263
|
+
// Checkbox
|
264
|
+
|
265
|
+
.tox-checkbox__label {
|
266
|
+
margin-left: .6rem;
|
267
|
+
}
|
268
|
+
|
269
|
+
// Dialog
|
270
|
+
|
271
|
+
@media @breakpoint-sm {
|
272
|
+
.tox-dialog__body-nav-item {
|
273
|
+
body:not(.tox-force-desktop) & {
|
274
|
+
&:not(:first-child) {
|
275
|
+
margin-left: 2px;
|
276
|
+
}
|
277
|
+
}
|
278
|
+
}
|
279
|
+
}
|
280
|
+
}
|
281
|
+
}
|
282
|
+
|
283
|
+
// Testing
|
284
|
+
|
285
|
+
// :root {
|
286
|
+
// // --primary: #338ab7;
|
287
|
+
// // --primary-rgb: 51, 138, 183;
|
288
|
+
// // --primary-h: 200;
|
289
|
+
// // --primary-s: 56%;
|
290
|
+
// // --primary-l: 46%;
|
291
|
+
|
292
|
+
// --primary: #e50914;
|
293
|
+
// --primary-rgb: 229, 9, 20;
|
294
|
+
// --primary-h: 357;
|
295
|
+
// --primary-s: 92%;
|
296
|
+
// --primary-l: 47%;
|
297
|
+
// }
|
@@ -0,0 +1 @@
|
|
1
|
+
@import 'src/less/theme/shadowdom';
|
data/trestle-tinymce.gemspec
CHANGED
@@ -10,11 +10,13 @@ Gem::Specification.new do |spec|
|
|
10
10
|
spec.summary = "TinyMCE integration plugin for the Trestle admin framework"
|
11
11
|
spec.description = "TinyMCE integration plugin for the Trestle admin framework."
|
12
12
|
spec.homepage = "https://www.trestle.io"
|
13
|
-
spec.license = "LGPL-3.0"
|
13
|
+
spec.license = "LGPL-3.0-only"
|
14
14
|
|
15
15
|
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
16
16
|
spec.require_paths = ["lib"]
|
17
17
|
|
18
18
|
spec.add_dependency "trestle", "~> 0.10.0.pre"
|
19
|
-
spec.add_dependency "tinymce-rails", "
|
19
|
+
spec.add_dependency "tinymce-rails", ">= 5.1", "< 7"
|
20
|
+
|
21
|
+
spec.add_development_dependency "rspec-rails"
|
20
22
|
end
|