Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
TYPO3
tinymce
Commits
a049d3ae
Commit
a049d3ae
authored
Dec 10, 2015
by
Marco Huber
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[BUGFIX] Load TinyMCE via require.js to fix problems with IRRE and update some more core changes
parent
6fb938c8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
0 deletions
+24
-0
Classes/Loader.php
Classes/Loader.php
+23
-0
Resources/Public/JavaScript/Loader.js
Resources/Public/JavaScript/Loader.js
+1
-0
No files found.
Classes/Loader.php
View file @
a049d3ae
...
...
@@ -280,6 +280,29 @@ class Loader {
$pageRenderer
->
addJsFile
(
$script
,
'text/javascript'
,
FALSE
,
TRUE
,
''
,
TRUE
);
}
/**
* Loads the required javascript via the require.js
*
* @return void
* @see \SGalinski\Tinymce4Rte\Form\Element\RichTextElement->loadRequireModulesForRTE
*/
public
function
loadJsViaRequireJS
()
{
if
(
self
::
$init
)
{
return
;
}
self
::
$init
=
TRUE
;
$scripts
=
array
();
$pathToTinyMceExtension
=
ExtensionManagementUtility
::
extRelPath
(
'tinymce'
);
$scripts
[]
=
$GLOBALS
[
'BACK_PATH'
]
.
$pathToTinyMceExtension
.
'Contrib/tinymce/tinymce.min.js'
;
$scripts
[]
=
$GLOBALS
[
'BACK_PATH'
]
.
$pathToTinyMceExtension
.
'Contrib/MutationObserver/MutationObserver.js'
;
$scripts
[]
=
$GLOBALS
[
'BACK_PATH'
]
.
$pathToTinyMceExtension
.
'Contrib/WeakMap/WeakMap.js'
;
$scripts
[]
=
$GLOBALS
[
'BACK_PATH'
]
.
$pathToTinyMceExtension
.
'Resources/Public/JavaScript/Loader.js'
;
$scripts
[]
=
$this
->
getConfiguration
();
return
$scripts
;
}
/**
* Parses and processes the tinyMCE configuration
*
...
...
Resources/Public/JavaScript/Loader.js
View file @
a049d3ae
...
...
@@ -182,6 +182,7 @@ SG.TinyMceLoader.prototype = {
if
(
hasMatches
)
{
this
.
tinyMceOptions
.
selector
=
this
.
tinyMceOptions
.
selector
.
slice
(
1
);
this
.
originalInit
.
call
(
tinymce
,
this
.
getTinyMceOptionsAsNewObject
());
document
.
getElementById
(
'
pleasewait
'
+
this
.
tinyMceOptions
.
editornumber
).
style
.
display
=
'
none
'
;
}
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment