Link to home
Start Free TrialLog in
Avatar of rgb192
rgb192Flag for United States of America

asked on

ckeditor with less width

the standard ckeditor is 800px
it can be shrunk by dragging the bottom right corner

is there a way to drag the right corner by default and make it less width
Avatar of Ray Paseur
Ray Paseur
Flag of United States of America image

You mean to set the width to a smaller size without dragging the corner?  I don't quite understand "drag the right corner by default"
Avatar of rgb192

ASKER

ckeditor is very wide
I want it to be narrow in width

<text area style="width:400px height:100px; ">
words go here
</text area>

I can change height, but not width by using code


the only way I know of changing width is to resize the ckeditor using the browser
Avatar of dagaz_de
dagaz_de

This will help you:

http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html#.width

Defined in: core/config.js.

you can config the width, f.e.:

config.width = 850;

or you do it with Javascript after replacing the Textarea:

This this:

CKEDITOR.replace( 'editor1',
    {
        toolbar : 'Basic',
        uiColor : '#9AB8F3'
        config.width = 850;
    });

or this:

CKEDITOR.config.width  = 850;
Avatar of rgb192

ASKER

addding

echo'
<script type="text/javascript">
CKEDITOR.replace( \'editor1\'),
    {
        toolbar : \'Basic\',
        uiColor : \'#9AB8F3\'
        config.width = 150;
    });
</script>';

produced no change

are you sure the
,
and
;
are in the correct place
echo'
  <textarea name="body" style="width:200px; height:100px;">'.$a['pdescription'].'</textarea>';

echo'      
<script type="text/javascript">
CKEDITOR.replace( \'body\' );
</script> 
';    
echo'
<script type="text/javascript">
CKEDITOR.replace( \'editor1\'),
    {
        toolbar : \'Basic\',
        uiColor : \'#9AB8F3\'
        config.width = 150;
    });
</script>';

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Ray Paseur
Ray Paseur
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rgb192

ASKER

thanks
Thanks for the points.  I have plenty and do not mind if you share some with @dagaz_de.

All the best, ~Ray