FCK editor width

Questions about how to use the online - editors and suggestions how to improve them
Post Reply
Nicky
Posts: 164
Joined: Sun Feb 08, 2009 9:50 am
Location: Antwerp, Belgium

FCK editor width

Post by Nicky » Sat Jun 05, 2010 8:57 am

FCK editor textarea differs in 'edit' and in 'view' mode, so what you see is not completely what you get.
Is it possible to make the textarea a little wider so the width of the sentences (and tables if used) remains exactly the same in both modes?
I know this is no problem for Tinymce, but 'how to' for FCKeditor.
See demo:

[ external image ]

Holger
Site Admin
Posts: 3470
Joined: Mon May 19, 2008 7:10 pm
Location: Hessen, Germany

Re: FCK editor width

Post by Holger » Sat Jun 05, 2010 6:40 pm

Hi Nicky,

you can style the with by css, use the form#ta selector (but remember the scrollbar inside the edit-area).
I don't know another way at the moment :? .

But
Nicky wrote:I know this is no problem for Tinymce
how is it working with TinyMCE? Isn't it the same as with FCKeditor?

Holger

Nicky
Posts: 164
Joined: Sun Feb 08, 2009 9:50 am
Location: Antwerp, Belgium

Re: FCK editor width

Post by Nicky » Sat Jun 05, 2010 6:56 pm

With tinymce it's very easy.
Just edit cmsimple template, file stylesheet.css and add at the very bottom of the page :

form textarea#text{width:515px;} /*TinyMCE - width is also determined by the width of the editor control button lines */
.mceContentBody{/*background-image: none;*/ background-color: #1C1A13; color: white;} /*TinyMCE*/

This code also fixes textarea background colour and font colour.

Any ideas which files to edit for fck and what code exactly to add where?
Thx

Holger
Site Admin
Posts: 3470
Joined: Mon May 19, 2008 7:10 pm
Location: Hessen, Germany

Re: FCK editor width

Post by Holger » Sat Jun 05, 2010 7:09 pm

Nicky wrote:Any ideas which files to edit for fck and what code exactly to add where?
Yes, it's working the same way as with TinyMCE:
use the template css and add

Code: Select all

form#ta{width:515px;}
That's it.

The id "ta" is defined in /cmsimple/fckeditor.php:

Code: Select all

'<form method="post" id="ta" action="'.$sn.'">'
Holger

Nicky
Posts: 164
Joined: Sun Feb 08, 2009 9:50 am
Location: Antwerp, Belgium

Re: FCK editor width

Post by Nicky » Sat Jun 05, 2010 7:25 pm

Thanks Holger, works perfect.

David V. Loera
Posts: 6
Joined: Thu Mar 03, 2011 5:17 am

Re: FCK editor width

Post by David V. Loera » Fri Jul 15, 2011 3:27 pm

Nicky wrote:With tinymce it's very easy.
Just edit cmsimple template, file stylesheet.css and add at the very bottom of the page :

form textarea#text{width:515px;} /*TinyMCE - width is also determined by the width of the editor control button lines */
.mceContentBody{/*background-image: none;*/ background-color: #1C1A13; color: white;} /*TinyMCE*/

This code also fixes textarea background colour and font colour.

Any ideas which files to edit for fck and what code exactly to add where?
Thx
Thanks for the code! ;)
Don't go around saying the world owes you a living. The world owes you nothing. It was here first.

Post Reply