Skip to content

Commit

Permalink
fixed tinyMce path for contao 4.4
Browse files Browse the repository at this point in the history
  • Loading branch information
koertho committed Oct 22, 2020
1 parent 0b72a35 commit 0cfd849
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
@@ -1,6 +1,9 @@
# Changelog
All notable changes to this project will be documented in this file.

## [2.11.1] - 2020-10-22
- fixed tinyMce path for contao 4.4

## [2.11.0] - 2020-10-20
- added row_inner block to default editor template
- fixes row indices not correctly updated on adding and deleting rows
Expand Down
10 changes: 8 additions & 2 deletions src/Widget/MultiColumnEditor.php
Expand Up @@ -106,8 +106,14 @@ public function generate(): string
}

if ($hasTinyMce) {
$template = new FrontendTemplate();
$responseText = '<script src="'.$template->asset('js/tinymce.min.js', 'contao-components/tinymce4').'"></script>'.$responseText;
if (version_compare(VERSION, '4.5') >= 0) {
$template = new FrontendTemplate();
$tinyMcePath = $template->asset('js/tinymce.min.js', 'contao-components/tinymce4');
} else {
$tinyMcePath = TL_ASSETS_URL.'assets/tinymce4/js/tinymce.min.js';
}

$responseText = '<script src="'.$tinyMcePath.'"></script>'.$responseText;
}

if ($this->container->get('huh.utils.container')->isBackend()) {
Expand Down

0 comments on commit 0cfd849

Please sign in to comment.