By PainfulDay on
Hello,
I needed a rich text editor for drupal v5.2 , so I and installed these two packages:
http://ftp.drupal.org/files/projects/tinymce-5.x-1.x-dev.tar.gz
http://tinymce.moxiecode.com/ [v 2.1 for drupal]
The editor seems to work fine except that the text area is rather small...
I´ve searched the forum but found no direct solution for this. BTW, if there is supposed to be a width/height option in the editor´s settings it´s not showing here).
Any suggestions?
If there is no 5.2-compatible version, what would be you second choice.
Thanks in advance!.
Comments
TinyMCE uses the height of
TinyMCE uses the height of the textarea it's applied to, so if you made a textfield with CCK you could set the height to 20 'rows', or you could just use CSS.
You can use the TinyMCE:Configuration/height option.
You can use the TinyMCE:Configuration/height option. See http://wiki.moxiecode.com/index.php/TinyMCE:Configuration/height
First, if you have not done so already, and assuming you are using a PHPTemplate theme, you have to override the TinyMCE theme function. To do that, follow the instructions at: http://drupal.org/node/53296#comment-385655.
Find this code towards the bottom of your phptemplate_tinymce_theme:
After "$init['width'] = '100%';" add the height option as:
eg
$init['height'] = "480"; //pixelsor eg
$init['height'] = "200%"; //percentage of height of the underlying textarea.Thus you might end up with:
The disadvantage is that the height configuration will apply to all text areas that TinyMCE is enabled for. Thus if you use "$init['height'] = '300%';" all TinyMCE edit boxes will be 3 times as high as the underlying textarea. I found that worked for my site, but ... play around till you find what specification works.
Thanks
Cheers, just what I was looking for :D
FWIW, in case it's not immediately apparent, if you want to apply a size change to a specifically-named element you can slip this into the switch($textarea_name) clause. For example:
--Andy
Developing Drupal websites for Livelink New Media
++Andy
In case you want a CSS-only
In case you want a CSS-only solution to change the editor's height for specific node-types, you can use this
body.node-type-page textarea#edit-body.form-textarea { height: 690px; }to change the height only for page nodes. Only works with fixed heights as far as I can see.