Solved

ckeditor with less width

Posted on 2011-02-21
7
477 Views
Last Modified: 2012-08-13
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
0
Comment
Question by:rgb192
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
7 Comments
 
LVL 110

Expert Comment

by:Ray Paseur
ID: 34944886
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"
0
 

Author Comment

by:rgb192
ID: 34944998
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
0
 
LVL 3

Expert Comment

by:dagaz_de
ID: 34945280
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;
0
Transaction Monitoring Vs. Real User Monitoring

Synthetic Transaction Monitoring Vs. Real User Monitoring: When To Use Each Approach? In this article, we will discuss two major monitoring approaches: Synthetic Transaction and Real User Monitoring.

 

Author Comment

by:rgb192
ID: 34945463
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

0
 
LVL 110

Accepted Solution

by:
Ray Paseur earned 500 total points
ID: 34945657
That .replace thing might be missing a comma after the end of the uiColor line.  But I think I would just follow this example:
http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html#.width
0
 

Author Closing Comment

by:rgb192
ID: 34946486
thanks
0
 
LVL 110

Expert Comment

by:Ray Paseur
ID: 34946522
Thanks for the points.  I have plenty and do not mind if you share some with @dagaz_de.

All the best, ~Ray
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question