... | ... |
@@ -85,11 +85,13 @@ window.tinymce && tinymce.init({ |
85 | 85 |
formats: { |
86 | 86 |
emphasise: { inline: 'span', classes: 'emphasised' }, |
87 | 87 |
brown: { inline: 'span', classes: 'color-brown' }, |
88 |
+ platin: { inline: 'span', classes: 'color-platin' }, |
|
88 | 89 |
sansSerif: { inline: 'span', classes: 'ff-sans' } |
89 | 90 |
}, |
90 | 91 |
style_formats: [ |
91 | 92 |
{ title: 'Hervorgehoben', format: 'emphasise' }, |
92 | 93 |
{ title: 'Braun', format: 'brown' }, |
94 |
+ { title: 'Platin', format: 'platin' }, |
|
93 | 95 |
{ title: 'Sans-Serif', format: 'sansSerif' } |
94 | 96 |
] |
95 | 97 |
}); |
... | ... |
@@ -84,10 +84,12 @@ window.tinymce && tinymce.init({ |
84 | 84 |
], |
85 | 85 |
formats: { |
86 | 86 |
emphasise: { inline: 'span', classes: 'emphasised' }, |
87 |
+ brown: { inline: 'span', classes: 'color-brown' }, |
|
87 | 88 |
sansSerif: { inline: 'span', classes: 'ff-sans' } |
88 | 89 |
}, |
89 | 90 |
style_formats: [ |
90 | 91 |
{ title: 'Hervorgehoben', format: 'emphasise' }, |
92 |
+ { title: 'Braun', format: 'brown' }, |
|
91 | 93 |
{ title: 'Sans-Serif', format: 'sansSerif' } |
92 | 94 |
] |
93 | 95 |
}); |
... | ... |
@@ -83,10 +83,12 @@ window.tinymce && tinymce.init({ |
83 | 83 |
{title: 'Button (neutral)', value: 'button'} |
84 | 84 |
], |
85 | 85 |
formats: { |
86 |
- emphasise: { inline: 'span', classes: 'emphasised' } |
|
86 |
+ emphasise: { inline: 'span', classes: 'emphasised' }, |
|
87 |
+ sansSerif: { inline: 'span', classes: 'ff-sans' } |
|
87 | 88 |
}, |
88 | 89 |
style_formats: [ |
89 |
- { title: 'Hervorgehoben', format: 'emphasise' } |
|
90 |
+ { title: 'Hervorgehoben', format: 'emphasise' }, |
|
91 |
+ { title: 'Sans-Serif', format: 'sansSerif' } |
|
90 | 92 |
] |
91 | 93 |
}); |
92 | 94 |
</script> |
... | ... |
@@ -44,7 +44,7 @@ window.tinymce && tinymce.init({ |
44 | 44 |
<?php $this->endblock(); ?> |
45 | 45 |
|
46 | 46 |
<?php $this->block('content_css'); ?> |
47 |
- content_css: 'system/themes/<?= Backend::getTheme() ?>/tinymce.min.css', |
|
47 |
+ content_css: 'system/themes/<?= Backend::getTheme() ?>/tinymce.min.css,files/themes/aldegott_2022/assets/css/tinymce/formats.css', |
|
48 | 48 |
<?php $this->endblock(); ?> |
49 | 49 |
|
50 | 50 |
<?php $this->block('plugins'); ?> |
... | ... |
@@ -81,6 +81,12 @@ window.tinymce && tinymce.init({ |
81 | 81 |
{title: 'None', value: ''}, |
82 | 82 |
{title: 'Standalone hervorgehoben', value: '-emphasised-block'}, |
83 | 83 |
{title: 'Button (neutral)', value: 'button'} |
84 |
+ ], |
|
85 |
+ formats: { |
|
86 |
+ emphasise: { inline: 'span', classes: 'emphasised' } |
|
87 |
+ }, |
|
88 |
+ style_formats: [ |
|
89 |
+ { title: 'Hervorgehoben', format: 'emphasise' } |
|
84 | 90 |
] |
85 | 91 |
}); |
86 | 92 |
</script> |
1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,87 @@ |
1 |
+<?php |
|
2 |
+ |
|
3 |
+namespace Contao; |
|
4 |
+ |
|
5 |
+if ($GLOBALS['TL_CONFIG']['useRTE']): |
|
6 |
+ |
|
7 |
+// Use document.write() here in case TinyMCE is loaded in a subpalette (see #1424) |
|
8 |
+?> |
|
9 |
+<script>window.tinymce || document.write('<script src="<?= $this->asset('js/tinymce.min.js', 'contao-components/tinymce4') ?>">\x3C/script>')</script> |
|
10 |
+<script> |
|
11 |
+window.tinymce && tinymce.init({ |
|
12 |
+ selector: '#<?= $this->selector ?>', |
|
13 |
+ min_height: 336, |
|
14 |
+ language: '<?= Backend::getTinyMceLanguage() ?>', |
|
15 |
+ element_format: 'html', |
|
16 |
+ document_base_url: '<?= Environment::get('base') ?>', |
|
17 |
+ entities: '160,nbsp,60,lt,62,gt,173,shy', |
|
18 |
+ branding: false, |
|
19 |
+ setup: function(editor) { |
|
20 |
+ editor.getElement().removeAttribute('required'); |
|
21 |
+ document.querySelectorAll('[accesskey]').forEach(function(el) { |
|
22 |
+ editor.addShortcut('access+' + el.accessKey, el.id, function() { el.click(); }); |
|
23 |
+ }); |
|
24 |
+ }, |
|
25 |
+ init_instance_callback: function(editor) { |
|
26 |
+ if (document.activeElement && document.activeElement.id && document.activeElement.id == editor.id) { |
|
27 |
+ editor.editorManager.get(editor.id).focus(); |
|
28 |
+ } |
|
29 |
+ editor.on('focus', function() { Backend.getScrollOffset(); }); |
|
30 |
+ }, |
|
31 |
+ |
|
32 |
+ <?php $this->block('picker'); ?> |
|
33 |
+ file_picker_callback: function (callback, value, meta) { |
|
34 |
+ Backend.openModalSelector({ |
|
35 |
+ 'id': 'tl_listing', |
|
36 |
+ 'title': document.getElement('.tox-dialog__title').get('text'), |
|
37 |
+ 'url': Contao.routes.backend_picker + '?context=' + (meta.filetype == 'file' ? 'link' : 'file') + '&extras[fieldType]=radio&extras[filesOnly]=true&extras[source]=<?= $this->source ?>&value=' + value + '&popup=1', |
|
38 |
+ 'callback': function(table, val) { |
|
39 |
+ callback(val.join(',')); |
|
40 |
+ } |
|
41 |
+ }); |
|
42 |
+ }, |
|
43 |
+ file_picker_types: <?= json_encode($this->fileBrowserTypes) ?>, |
|
44 |
+ <?php $this->endblock(); ?> |
|
45 |
+ |
|
46 |
+ <?php $this->block('content_css'); ?> |
|
47 |
+ content_css: 'system/themes/<?= Backend::getTheme() ?>/tinymce.min.css', |
|
48 |
+ <?php $this->endblock(); ?> |
|
49 |
+ |
|
50 |
+ <?php $this->block('plugins'); ?> |
|
51 |
+ plugins: 'autosave charmap code fullscreen image importcss link lists paste searchreplace stripnbsp tabfocus table visualblocks visualchars', |
|
52 |
+ <?php $this->endblock(); ?> |
|
53 |
+ |
|
54 |
+ <?php $this->block('valid_elements'); ?> |
|
55 |
+ extended_valid_elements: 'q[cite|class|title],article,section,hgroup,figure,figcaption', |
|
56 |
+ <?php $this->endblock(); ?> |
|
57 |
+ |
|
58 |
+ <?php $this->block('menubar'); ?> |
|
59 |
+ menubar: 'file edit insert view format table', |
|
60 |
+ <?php $this->endblock(); ?> |
|
61 |
+ |
|
62 |
+ <?php $this->block('toolbar'); ?> |
|
63 |
+ toolbar: 'link unlink | image | formatselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | code', |
|
64 |
+ <?php $this->endblock(); ?> |
|
65 |
+ |
|
66 |
+ <?php $this->block('contextmenu'); ?> |
|
67 |
+ contextmenu: false, |
|
68 |
+ <?php $this->endblock(); ?> |
|
69 |
+ |
|
70 |
+ <?php $this->block('cache_suffix'); ?> |
|
71 |
+ cache_suffix: '?v=<?= $this->assetVersion('js/tinymce.min.js', 'contao-components/tinymce4') ?>', |
|
72 |
+ <?php $this->endblock(); ?> |
|
73 |
+ |
|
74 |
+ <?php $this->block('custom'); ?> |
|
75 |
+ <?php $this->endblock(); ?> |
|
76 |
+ |
|
77 |
+ browser_spellcheck: true, |
|
78 |
+ tabfocus_elements: ':prev,:next', |
|
79 |
+ importcss_append: true, |
|
80 |
+ link_class_list: [ |
|
81 |
+ {title: 'None', value: ''}, |
|
82 |
+ {title: 'Standalone hervorgehoben', value: '-emphasised-block'}, |
|
83 |
+ {title: 'Button (neutral)', value: 'button'} |
|
84 |
+ ] |
|
85 |
+}); |
|
86 |
+</script> |
|
87 |
+<?php endif; ?> |