CuteEditor not Using Sylesheet's Font-Size

Last post 07-30-2004, 4:34 PM by Adam. 6 replies.
Sort Posts: Previous Next
  •  07-30-2004, 11:48 AM 1385

    CuteEditor not Using Sylesheet's Font-Size

    Hello,

     
    I have a stylesheet linked to the same page that a CuteEditor is on.  I set the CssClass of the editor to be EDITORBODY where...
     
    .EDITORBODY
    {

        font-family: Verdana;

        font-size: 2;

    }
     
    If I change the font-family and re-load my page, the default font used by the CuteEditor does change.  However, if I change the font-size, the default font-size used by the CuteEditor does NOT change.  I have tried using different combinations of font-sizes (e.g, 2, 15px, large) but none of these seem to work.  Any one come across this before?
  •  07-30-2004, 1:02 PM 1386 in reply to 1385

    Re: CuteEditor not Using Sylesheet's Font-Size

     
    Try

    Editor.EditorStyle Property

     

    For example:
     
    editor1.EditorStyle = "

    BORDER: #c0c0c0 1px solid; PADDING: 10px; MARGIN: 0px 0px 0px 0px; OVERFLOW: auto;TEXT-ALIGN: left; font-size: 12px;

    ";
     
    Is that what you are looking for?
     
    Keep me posted.

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  07-30-2004, 1:40 PM 1387 in reply to 1386

    Re: CuteEditor not Using Sylesheet's Font-Size

    Thanks for the reply.

     
    After doing some tests with your code, I realized that I was asking the wrong question.
     
    Going back to my example, if you set the CssClass to be EDITORBODY, then the default font for the editor will be Verdana.  That is, if you highlight a block of text and change the font to Verdana, then there is no change in the resulting HTML representation of the block of text (this has been brought up on the forum before but I don't recall seeing an explanation.)
     
    My question is, why isn't this behaviour consistent with font-size?  Assuming that in EDITORBODY I set "font-size: 2;", and then I highlight a block of text in my editor and change the font size to 2, then in the resulting HTML I see that the block of text is now encapsulated by <font size=2>...</font>
     
    I realize that this isn't that big of an issue (worse case is that there will be redundant html code in the final result).  The only reason I ask is because I need to understand some of the limitations/flaws of the tool before I can recommend purchasing it.
  •  07-30-2004, 2:50 PM 1388 in reply to 1387

    Re: CuteEditor not Using Sylesheet's Font-Size

    EvilMonkey,
     
    There are two ways to control the Text Size in your web page:

    1. <FONT> tag


    You can use the SIZE attribute of the <FONT> tag to state the desired dimension as a value from 1 to 7. These values don't translate to pixels or points or any of the usual text measures, but the type size you're used to seeing on most Web pages is the browser default of 3. It's not the actual point size.
     
    This is FONT SIZE=1
    This is FONT SIZE=2

    This is FONT SIZE=3
    This is FONT SIZE=4
    This is FONT SIZE=5
    This is FONT SIZE=6
    This is SIZE=7
     

    The table below shows the point size actually used on your Web page by the major browsers. Browsers listed as Microsoft Internet Explorer Version 5.0 (IE 5.0), Netscape Navigator Version 4.2 (NN 4.2) and Version 4.7 (NN 4.7).


     
    PC
    IMAC
    Size
    IE 5.0
    NN 4.2
    IE 5.0
    NN 4.7
    1
    7
    8
    7
    9
    2
    9
    9
    9
    10
    3
    10
    12
    12
    12
    4
    12
    14
    14
    14
    5
    16
    18
    18
    18
    6
    20
    24
    24
    24
    7
    30
    34
    34
    34

    This table shows, for example, that FONT SIZE=4 gives you a 12 point font under Microsoft Internet Explorer Version 5.0 on the PC. But this same browser on the iMac will give you a 14 point font!
     
     
    2. Text Size Control with CSS
     
     
    Using the Cascading Stylesheets (CSS), you can get the actual point size:
     
     

    This is font-size: 7pt
    This is font-size: 8pt
    This is font-size: 9pt
    This is FONT SIZE=1
    This is font-size: 10pt
    This is FONT SIZE=2
    This is font-size: 11pt
    This is font-size: 12pt
    This is FONT SIZE=3
    This is font-size: 13pt
    This is font-size: 14pt
    This is font-size: 15pt
    This is FONT SIZE=4
    This is font-size: 16pt
    This is font-size: 17pt
    This is font-size: 18pt
    This is FONT SIZE=5
    This is font-size: 19pt
    This is font-size: 20pt
    This is font-size: 21pt
    This is font-size: 22pt
    This is font-size: 23pt
    This is font-size: 24pt
    This is FONT SIZE=6
    This is font-size: 25pt
    This is font-size: 26pt

     
     
     

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  07-30-2004, 3:07 PM 1389 in reply to 1388

    Re: CuteEditor not Using Sylesheet's Font-Size

    This is useful information (in fact you have already printed this exact post in a thread I created before) but it does not specifically answer my question.

     
    Are you implying that the reason for the behavioural inconsistency of the CuteEditor is because of these different ways to set the font size?  It would be nice to get a straight answer rather than a paste of some HTML specifications, especially when my question is about the behaviour of the CuteEditor and not HTML.
  •  07-30-2004, 3:26 PM 1390 in reply to 1389

    Re: CuteEditor not Using Sylesheet's Font-Size

    Sorry about this (I don't know much about css)

     
    My understanding of it now is, if I specify "font-size: 2;" in my Stylesheet, it is the same as if I wrote "font-size: 2pt;"  So in fact I haven't set the default font size to be "2" I have set it to be "2pt".  In which case, when I highlight a block of text in the CuteEditor and change the font size to 2, it correctly encapsulates that block of text in <font size=2>...</font>.
     
    Is this correct?
  •  07-30-2004, 4:34 PM 1391 in reply to 1390

    Re: CuteEditor not Using Sylesheet's Font-Size

View as RSS news feed in XML