Browse files

Revert "ENHANCEMENT Using 'autoresize' TinyMCE plugin in HTMLEditorFi…

…eld default config, in order to save space when no content is entered into the field" - causes artificial loading delay, and doesn't detect height correctly due to floated images in paragraphs. These paragraphs can't be clearfix'ed because they'd become contenteditable (resizeable) elements in IE because of this.

This reverts commit 69a8659.
  • Loading branch information...
1 parent d46a450 commit 4fc3aaf9393d0de1cf2726cf7f0157b01c1e7075 @chillu chillu committed Mar 12, 2012
Showing with 3 additions and 2 deletions.
  1. +1 −1 admin/_config.php
  2. +2 −1 forms/HtmlEditorField.php
View
2 admin/_config.php
@@ -25,7 +25,7 @@
'extended_valid_elements' => "img[class|src|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name|usemap],iframe[src|name|width|height|align|frameborder|marginwidth|marginheight|scrolling],object[width|height|data|type],param[name|value],map[class|name|id],area[shape|coords|href|target|alt]"
));
-HtmlEditorConfig::get('cms')->enablePlugins('media', 'fullscreen', 'autoresize');
+HtmlEditorConfig::get('cms')->enablePlugins('media', 'fullscreen');
HtmlEditorConfig::get('cms')->enablePlugins(array('ssbuttons' => '../../../cms/javascript/tinymce_ssbuttons/editor_plugin_src.js'));
HtmlEditorConfig::get('cms')->insertButtonsBefore('formatselect', 'styleselect');
View
3 forms/HtmlEditorField.php
@@ -13,7 +13,7 @@ class HtmlEditorField extends TextareaField {
*/
static $use_gzip = true;
- protected $rows = null;
+ protected $rows = 30;
/**
* Includes the JavaScript neccesary for this field to work using the {@link Requirements} system.
@@ -90,6 +90,7 @@ function getAttributes() {
parent::getAttributes(),
array(
'tinymce' => 'true',
+ 'style' => 'width: 97%; height: ' . ($this->rows * 16) . 'px', // prevents horizontal scrollbars
'value' => null,
)
);

0 comments on commit 4fc3aaf

Please sign in to comment.