Skip to content

Commit

Permalink
Check if initTinyMCE is available (Newer versions), otherwise fallbac…
Browse files Browse the repository at this point in the history
…k to TinyMCEConfig (Older versions). Fixes #157
  • Loading branch information
ericof committed Apr 11, 2013
1 parent c5ad781 commit b0c7c26
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/collective/cover/static/cover.js
Expand Up @@ -111,6 +111,9 @@ $(document).ready(function() {
},
config: {
onLoad: function() {
if(typeof initTinyMCE!='undefined'){
initTinyMCE(this.getOverlay());
}else{
$('textarea.mce_editable').each(function() {
var config = new TinyMCEConfig($(this).attr('id'));
config.init();
Expand All @@ -119,6 +122,7 @@ $(document).ready(function() {
$('div.suppressVisualEditor').remove()

});
}
},
onClose: function() { location.reload(); }

Expand Down

2 comments on commit b0c7c26

@hvelarde
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please fill the bloody change log or it will cost you a Belgian 🍺 per line!

@ericof
Copy link
Member Author

@ericof ericof commented on b0c7c26 Apr 11, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done :-)

Please sign in to comment.