Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #5 from codedor/develop

Trailing comma in options list vs Internet Explorer
  • Loading branch information...
commit e4dc400ea699de5959dda0898a06a678e55d0246 2 parents 2547b70 + 498fb83
@lorenzo lorenzo authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 views/helpers/tiny_mce.php
View
5 views/helpers/tiny_mce.php
@@ -69,7 +69,10 @@ public function editor($options = array()) {
foreach ($options as $option => $value) {
$lines .= Inflector::underscore($option) . ' : "' . $value . '",' . "\n";
}
- $this->Html->scriptBlock('tinyMCE.init({' . "\n" . $lines . '});' . "\n", array(
+ // remove last comma from lines to avoid the editor breaking in Internet Explorer
+ $lines = rtrim($lines);
+ $lines = rtrim($lines, ',');
+ $this->Html->scriptBlock('tinyMCE.init({' . "\n" . $lines . "\n" . '});' . "\n", array(
'inline' => false));
}
Please sign in to comment.
Something went wrong with that request. Please try again.