|
| 1 | +/* @settings |
| 2 | +
|
| 3 | +name: Ozan's Image in Editor Plugin |
| 4 | +id: oz-image-in-editor-plugin |
| 5 | +settings: |
| 6 | +
|
| 7 | + - |
| 8 | + id: oz-img-in-editor-max-transclusion-height |
| 9 | + title: Transclusion Embed Maximum Height |
| 10 | + description: Set the max height of transclusion render in editor as px |
| 11 | + type: variable-number |
| 12 | + default: 600 |
| 13 | + format: px |
| 14 | + - |
| 15 | + id: oz-img-in-editor-max-msg-height |
| 16 | + title: MSG Embed Maximum Height |
| 17 | + description: Set the max height of msg render in editor as px |
| 18 | + type: variable-number |
| 19 | + default: 300 |
| 20 | + format: px |
| 21 | + - |
| 22 | + id: oz-img-in-editor-img-size-xx-small |
| 23 | + title: Alt Text "#xx-small" Maximum Image Width |
| 24 | + description: Set the max width of images with "#xx-small" alt text |
| 25 | + type: variable-number |
| 26 | + default: 25 |
| 27 | + format: "%" |
| 28 | + - |
| 29 | + id: oz-img-in-editor-img-size-x-small |
| 30 | + title: Alt Text "#x-small" Maximum Image Width |
| 31 | + description: Set the max width of images with "#x-small" alt text |
| 32 | + type: variable-number |
| 33 | + default: 50 |
| 34 | + format: "%" |
| 35 | + - |
| 36 | + id: oz-img-in-editor-img-size-small |
| 37 | + title: Alt Text "#small" Maximum Image Width |
| 38 | + description: Set the max width of images with "#small" alt text |
| 39 | + type: variable-number |
| 40 | + default: 75 |
| 41 | + format: "%" |
| 42 | +*/ |
| 43 | + |
| 44 | +.theme-light, |
| 45 | +.theme-dark { |
| 46 | + --oz-img-in-editor-max-msg-height: 300px; |
| 47 | + --oz-img-in-editor-max-transclusion-height: 600px; |
| 48 | + --oz-img-in-editor-img-size-xx-small: 25%; |
| 49 | + --oz-img-in-editor-img-size-x-small: 50%; |
| 50 | + --oz-img-in-editor-img-size-small: 75%; |
| 51 | +} |
| 52 | + |
1 | 53 | .CodeMirror-linewidget img {
|
2 | 54 | margin-top: 5px;
|
3 | 55 | margin-bottom: 5px;
|
|
13 | 65 | .oz-transclusion-widget-cm6 {
|
14 | 66 | padding: 3px 3px 3px 19px;
|
15 | 67 | border: 0.7px solid var(--text-muted);
|
16 |
| - max-height: 600px; |
| 68 | + max-height: var(oz-img-in-editor-max-transclusion-height); |
17 | 69 | overflow: auto;
|
18 | 70 | border-radius: 7px;
|
19 | 71 | margin-top: 5px;
|
@@ -190,20 +242,17 @@ div.oz-transclusion-widget-cm6 pre {
|
190 | 242 |
|
191 | 243 | div.oz-image-widget > img[alt$='#small'],
|
192 | 244 | div.oz-image-widget-cm6 > img[alt$='#small'] {
|
193 |
| - max-width: 75% !important; |
194 |
| - min-width: 200pt !important; |
| 245 | + max-width: var(--oz-img-in-editor-img-size-small) !important; |
195 | 246 | }
|
196 | 247 |
|
197 | 248 | div.oz-image-widget > img[alt$='#x-small'],
|
198 | 249 | div.oz-image-widget-cm6 > img[alt$='#x-small'] {
|
199 |
| - max-width: 50% !important; |
200 |
| - min-width: 100pt !important; |
| 250 | + max-width: var(--oz-img-in-editor-img-size-x-small) !important; |
201 | 251 | }
|
202 | 252 |
|
203 | 253 | div.oz-image-widget > img[alt$='#xx-small'],
|
204 | 254 | div.oz-image-widget-cm6 > img[alt$='#xx-small'] {
|
205 |
| - max-width: 25% !important; |
206 |
| - min-width: 50pt !important; |
| 255 | + max-width: var(--oz-img-in-editor-img-size-xx-small) !important; |
207 | 256 | }
|
208 | 257 |
|
209 | 258 | /* Style For CM6 */
|
@@ -286,7 +335,7 @@ div.oz-pdf-widget-cm6 + br {
|
286 | 335 | }
|
287 | 336 |
|
288 | 337 | .oz-custom-html-widget-cm6 .msg-handler-plugin-renderer {
|
289 |
| - max-height: 300px; |
| 338 | + max-height: var(--oz-img-in-editor-max-msg-height); |
290 | 339 | overflow-y: scroll;
|
291 | 340 | border: 0.1px solid var(--text-muted);
|
292 | 341 | padding: 10px;
|
|
0 commit comments