Announcement

Do not use the forums to submit bug reports, feature requests or patches, submit a New Ticket instead.

#1 2005-11-28 10:36:14

mkalliol
New member
Registered: 2005-11-28
Posts: 2

How to set editor smaller?

Hi,

I used my_config.js configuration to create xinha-editor and it works fine. Now I try to resize it smaller with the following code:

 
  /** STEP 5 ***************************************************************
       * If you want to change the configuration variables of any of the
       * editors,  this is the place to do that, for example you might want to
       * change the width and height of one of the editors, like this...
       *
       *   xinha_editors.myTextArea.config.width  = '640px';
       *   xinha_editors.myTextArea.config.height = '480px';
       *
       *
       *
       ************************************************************************/

    name_config = new HTMLArea.Config();

    name_config.toolbar = [
          ["fontname","fontsize","bold","italic","underline","strikethrough","forecolor","hilitecolor","subscript","superscript","removeformat"]
    ];

    name_config.statusBar = false;
    
    xinha_editors.name.config = name_config;
    xinha_editors.name.config.height = '100px';
    xinha_editors.name.config.width  = '100px';

height and width have no effect, but if I put larger sizes, height='500px' and width='500px' it makes the editor larger.
Is there some kind of minimum size for the editor, which can not be changed? Do I need to fork the source code? I also tried to give the height and witdth paremeter before "xinha_editors.name.config = name_config;", but same result.

Thanks for help,

mkalliol

Offline

#2 2005-11-28 11:12:31

gogo
Xinha Leader
From: New Zealand
Registered: 2005-02-11
Posts: 1,015
Website

Re: How to set editor smaller?

I don't remember writing in a specific minimum (and a quick search of the code reveals nothing), but there will be a practical minimum, particularly a minimum width dictated by the toolbar, height not so much.  I doubt you'd get it much smaller than 100x100, that's pretty small right there.

You could try leaving height & width to the defaults ('auto') and setting the size on the textarea

<textarea style="width:100px;height:100px"></textarea>

James Sleeman

Offline

#3 2005-11-29 03:47:26

mkalliol
New member
Registered: 2005-11-28
Posts: 2

Re: How to set editor smaller?

You could try leaving height & width to the defaults ('auto') and setting the size on the textarea

I tried that, but it doesn't work.

I also tried to change some other configuration changing the sizeIncludesBars and sizeIncludesPanels to 'false', but it changes nothing. It seems that the smallest height is around 180-190px. I don't mind about the width so much. It's ok. But if there is a way to set height smaller than 180-190px, I'm interested to hear.

Here is my latest.

In my_config.js

name_config = new HTMLArea.Config();

    name_config.toolbar = [
    ["fontname","fontsize","bold","italic","underline","strikethrough","forecolor","hilitecolor","subscript","superscript","removeformat"]
    ];

    name_config.statusBar = false;
    
    xinha_editors.name.config = name_config;
    xinha_editors.name.config.height = 'auto';
    xinha_editors.name.config.weight = 'auto';
    xinha_editors.name.config.sizeIncludesBars = false;
    xinha_editors.name.config.sizeIncludesPanels = false;
    
    address_config = new HTMLArea.Config();

    address_config.toolbar = [
    ["fontname","fontsize","bold","italic","underline","strikethrough","forecolor","hilitecolor","subscript","superscript","removeformat"]
    ];

    address_config.statusBar = false;
    address_config.sizeIncludesBars = false;
    address_config.sizeIncludesPanels = false;
    
    xinha_editors.address.config = address_config;

    xinha_editors.address.config.height = 'auto';
    xinha_editors.address.config.weight = 'auto';

And in the .html page

//other code
<textarea id="name" name="name" style="width:250px;height:100px;"><?php echo $name ?></textarea>
//other code
<textarea id="address" name="address" style="width:250px;height:100px;"><?php echo $address ?></textarea>
//other code

Last edited by mkalliol (2005-11-29 03:49:32)

Offline

#4 2005-12-05 08:18:29

Wolfgang
Xinha Community Member
Registered: 2005-11-26
Posts: 13

Re: How to set editor smaller?

Size of Editor Window: I found a diffrence using IE6 and FF1.07:

IE6: works as expected using width / height in textarea.
FF1.07: uses a minimum height / width regardless of setting in textarea.

Last edited by Wolfgang (2005-12-05 08:18:57)

Offline

Board footer

Powered by FluxBB