Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 
 
 

44 строки
1.9 KiB

  1. <?php
  2. namespace Contao;
  3. if ($GLOBALS['TL_CONFIG']['useRTE']):
  4. // Use document.write() here in case TinyMCE is loaded in a subpalette (see #1424)
  5. ?>
  6. <script>window.tinymce || document.write('<script src="<?= $this->asset('js/tinymce.min.js', 'contao-components/tinymce4') ?>">\x3C/script>')</script>
  7. <script>
  8. window.tinymce && tinymce.init({
  9. skin: 'contao',
  10. selector: '#<?= $this->selector ?>',
  11. language: '<?= Backend::getTinyMceLanguage() ?>',
  12. element_format: 'html',
  13. document_base_url: '<?= Environment::get('base') ?>',
  14. entities: '160,nbsp,60,lt,62,gt,173,shy',
  15. branding: false,
  16. setup: function(editor) {
  17. editor.getElement().removeAttribute('required');
  18. },
  19. init_instance_callback: function(editor) {
  20. if (document.activeElement && document.activeElement.id && document.activeElement.id == editor.id) {
  21. editor.editorManager.get(editor.id).focus();
  22. }
  23. editor.on('focus', function() { Backend.getScrollOffset(); });
  24. },
  25. file_browser_callback: function(field_name, url, type, win) {
  26. Backend.openModalBrowser(field_name, url, type, win, '<?= $this->source ?>');
  27. },
  28. file_browser_callback_types: <?= json_encode($this->fileBrowserTypes) ?>,
  29. content_css: 'system/themes/<?= Backend::getTheme() ?>/tinymce.min.css',
  30. plugins: 'autosave charmap code fullscreen image importcss link lists paste searchreplace stripnbsp tabfocus table visualblocks visualchars',
  31. browser_spellcheck: true,
  32. tabfocus_elements: ':prev,:next',
  33. importcss_append: true,
  34. extended_valid_elements: 'q[cite|class|title],article,section,hgroup,figure,figcaption',
  35. menubar: 'file edit insert view format table',
  36. toolbar: 'link unlink | image | formatselect | bold italic | styleselect | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | code',
  37. content_css: ['/files/theme/assets/css/tinymce.css']
  38. });
  39. </script>
  40. <?php endif; ?>