Skip to content
Browse files

Check if initTinyMCE is available (Newer versions), otherwise fallbac…

…k to TinyMCEConfig (Older versions). Fixes #157
  • Loading branch information...
1 parent c5ad781 commit b0c7c261c20786365656eb49ca1c852bd7c80f7d @ericof ericof committed Apr 10, 2013
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/collective/cover/static/cover.js
View
4 src/collective/cover/static/cover.js
@@ -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();
@@ -119,6 +122,7 @@ $(document).ready(function() {
$('div.suppressVisualEditor').remove()
});
+ }
},
onClose: function() { location.reload(); }

2 comments on commit b0c7c26

@hvelarde
Plone Collective member

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

@ericof
Plone Collective member
ericof commented on b0c7c26 Apr 11, 2013

Done :-)

Please sign in to comment.
Something went wrong with that request. Please try again.