Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
tinymce
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sigfried Arnold
tinymce
Commits
c8feee41
Commit
c8feee41
authored
10 years ago
by
Stefan Galinski
Browse files
Options
Downloads
Patches
Plain Diff
[BUGFIX] Load the tinymce loader also if the code is added after the load event (IRRE)
parent
7bd8c9fc
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Classes/Loader.php
+19
-9
19 additions, 9 deletions
Classes/Loader.php
with
19 additions
and
9 deletions
Classes/Loader.php
+
19
−
9
View file @
c8feee41
...
...
@@ -113,20 +113,30 @@ class Loader {
/**
* Returns a file that contains the tinyMCE configuration
*
* Note: The load dom event cannot be used, because e.g. IRRE adds the javascript
* later on. This leads to code that is never executed. The interval timer hack fixes this
* issue.
*
* @return string
*/
protected
function
getConfiguration
()
{
$configuration
=
$this
->
tinymceConfiguration
[
'preJS'
];
$configuration
.
=
'
document.addEventListener(
"DOMContentLoaded", function() {
if (window.tinymce && window.tinymce.init) {
(new SG.TinyMceLoader(window.tinymce, {
'
.
$this
->
replaceTypo3Paths
(
$this
->
tinymceConfiguration
[
'configurationData'
])
.
'
}));
}
}, false
);
var SG = SG || {};
SG.initTinyMceLoadFunction = function() {
if (SG.initializedTinyMceLoaderInstance) {
return;
}
if (SG.TinyMceLoader && window.tinymce && window.tinymce.init) {
SG.initializedTinyMceLoaderInstance = new SG.TinyMceLoader(window.tinymce, {
'
.
$this
->
replaceTypo3Paths
(
$this
->
tinymceConfiguration
[
'configurationData'
])
.
'
});
clearInterval(SG.initTinyMceLoadInterval);
}
};
SG.initTinyMceLoadFunction();
SG.initTinyMceLoadInterval = window.setInterval(SG.initTinyMceLoadFunction, 1000);
'
;
$configuration
.
=
$this
->
tinymceConfiguration
[
'postJS'
];
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment