4 Replies Latest reply on Aug 27, 2007 6:46 AM by kcell

    Rich textbox , htmltext and font size

    kcell Level 2

      We are checking to use the rich textbox in our app and we found a problem with the font size, which acts different in a normal webbrowser and in in the rich textbox.

      In a html the font size="2" and we set it to the htmltext (of rich textbox), it is really displayed as font size ="2", but if we call the same html in a webbrowser (ie, firefox) it looks as expected.
      The html was created from a RTF string, where the font size is 12.

      So I am confused if the html is wrong or if I have to do something else in the rich textbox.

      Any help is appreciated,

      best regards,

      Here is an example of the html:

      <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
      <title>Untitled document</title>
      <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
      <div align="left">
      <font face="MS Sans Serif" size="2" color="#000000"><b>Testtext</b></font></div>
        • 1. Re: Rich textbox , htmltext and font size
          kcell Level 2
          Hi all,

          found out that the htmlText of the RTE is no "real" HTML :((((

          There are several blogs in the net who recommend to use instead the fckeditor ( http://www.fckeditor.net/) in a iframe. Currently I don´t know how to use it, but I am pretty sure I will figure it out ;)

          Maybe someone from Adobe can give me/us a statement if there are any planned changes for the RTE with "real" HTML support. (If Adobe change it, it may break current implementations and already saved data structures. )

          So if you like to use the htmltext property of the RTE, be aware that the produced html can not be used anywhere else!!!!!!!!!

          best regards,
          • 2. Re: Rich textbox , htmltext and font size
            levancho Level 3
            as far as I know RTE is using regular textArea for input and as doc says it takes regular html,
            what do you mean by :
            RTE is no "real" HTML?
            is it different markup, something like BBCode?
            • 3. Re: Rich textbox , htmltext and font size
              kcell Level 2
              Hi Levancho,

              the htmlText needs html, which contains the font size in pixel and not in the normal used 1-7 ( * xx-small | x-small | small | medium | large | x-large | xx-large ).

              Also if you insert text and get the string from htmltext, it contains a lot of unwanted tags and still the font-size is used as pixel.

              Some links for more information/external blogs:
              - Block in Black
              - HTML frustration

              Nevertheless at least for the set htmltext a string which contain HTML+CSS can be used.
              ( but if I call get htmltext the same , for my use "unusable" html is returned.)
              A solution for my problem might be to write a own HTML Parser, which extracts the html as I needed it, but it would be easier to use another RTE for it.

              best regards,

              • 4. Rich textbox , htmltext and font size
                kcell Level 2
                Hello all,

                just want to let you know that if found a solution for parsing the htmltext from the RTE.

                The solution is Regular Expressions

                best regards,