From 04fb048d3f6ca1a527436413f4085d4670770212 Mon Sep 17 00:00:00 2001
From: David Gurk <dgurk@medienwerft.de>
Date: Thu, 2 Jun 2016 10:39:14 +0200
Subject: [PATCH] [BUGFIX] Fix broken RTE within flexform

In my case with EXT:flux and TYPO3 7.6 the RTE doesn't appear. This is caused by a syntax error within the JavaScript. The selector of the content element text field looks actually like $('.tinymce4_rte#RTEarea'data_tt_content__55__bodytext_''), where are single quotes arround the "editornumber". This is caused by addConfigurationOption(), where strings get wrapped.

This fix removes the single quotes around the string and respects the previous fix in Commit e699df35da045b9dec09de9e27e54ecea6166542.
---
 Classes/Loader.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Classes/Loader.php b/Classes/Loader.php
index b85fdd3..cc80635 100644
--- a/Classes/Loader.php
+++ b/Classes/Loader.php
@@ -301,10 +301,10 @@ class Loader {
 			var RTEarea = RTEarea || window.RTEarea;
 
 			define([\'TYPO3/CMS/Tinymce/../../../../typo3conf/ext/tinymce/tinymce_node_modules/tinymce/jquery.tinymce.min.js\'], function () {
-				$(\'.tinymce4_rte#RTEarea' . str_replace('.', '\\\\.', $this->tinymceConfiguration['configurationDataArray']['editornumber']) . '\').tinymce({
+				$(\'.tinymce4_rte#RTEarea' . strtr($this->tinymceConfiguration['configurationDataArray']['editornumber'], array('.' => '\\\\.', '\'' => '')) . '\').tinymce({
 					script_url : \'' . $this->getPath($tinymceSource, TRUE) . '\',
 					' . $this->replaceTypo3Paths($this->tinymceConfiguration['configurationData']) . ',
-					selector: \'.tinymce4_rte#RTEarea' . str_replace('.', '\\\\.', $this->tinymceConfiguration['configurationDataArray']['editornumber']) . '\'
+					selector: \'.tinymce4_rte#RTEarea' . strtr($this->tinymceConfiguration['configurationDataArray']['editornumber'], array('.' => '\\\\.', '\'' => '')) . '\'
 				});
 			});
 		';
-- 
GitLab