Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    RichTextEditor <font> tag

    Dear developers
    is RichTextEditor expected to switch from using the <font> tag to the css properties font-family, font-size, and color in the near future?

    #2
    it’s not in the roadmap. Why is this important to you?

    Comment


      #3
      We have strict content design rules. These rules strictly specify the font sizes that we can use. They are specified in px.
      This is why I would like to switch from pt to px in your editor.

      Now about the more unpleasant case of the editor that I encountered.

      We have texts saved in the database and we want to edit them using your editor. You can also print these texts using selections from the database. So there are big problems with the printout.

      Let me explain with an example...

      the database stores this text
      "text1 text2 text3 text4 text4 text5 text6"
      I only change the font color of individual words in the editor, as you can see in the picture
      Click image for larger version  Name:	rtEditor.jpg Views:	0 Size:	13.2 KB ID:	262982

      as a result, I get this html text
      "text1 <font color= "#ff0000">text2< / font>text3<font color= "#3366ff">text4< / font>text4<font color= "#339966">text5< / font><span style="color: rgb(255, 255, 255);">&nbsp; text6<br>< / span>"

      Then I want to print the received text. And as you may have guessed, I don't see the word text6 on paper.

      In reality, you can't see entire paragraphs.
      If the text printout was from my client, I could replace color: rgb(255, 255, 255) with color: rgb(0, 0, 0) before printing.
      But printing prepares our server.
      And this replacement has to be done on the server.

      Can you have any solution to this problem?


      I also give an example with paragraphs.
      There is such a mess that I think you will be interested to see.
      Attached Files
      Last edited by Hirn; 2nd Jul 2020, 05:19.

      Comment


        #4
        So to summarize, if the user is using a dark theme, they may pick text colors that don't print well?

        What are you hoping for our component to do - adjust the colors? Or are you saying, it would be easier to wipe out the user's color choices if the styling was done via CSS instead of via a font tag?

        Comment


          #5
          >> if the user is using a dark theme, they may pick text colors that don't print well?

          No, you don't understand me.
          I didn't choose the white text color.
          I chose only red, blue, and green.
          And white for some reason is automatically inserted in your editor.

          >>What are you hoping for our component to do - adjust the colors?

          I would suggest not to adopt the CSS properties of the theme.
          I'm not talking about the case where I explicitly set the font color in the text. In this case, it's my own fault that my text won't be visible in another CSS theme.

          And the fact that you adopt properties from the CSS theme leads to such a result, for example.
          What do you think? What color will this text be on the screen?

          <font color="#ff0000" style="color: rgb(255, 255, 255); font-size: 14px;">In der
          Gruppe "Print box" ist im Objekt "WBT-Titel" der Titel des WBTs
          anzupassen.Folgende Einstellungen sind im Dialog - Dialoge -&gt;
          Runtime-Einstellungen - f�r diese Seite zu treffen:<br>- Objekt
          ist im Men� unsichtbar
          </font>
          Last edited by Hirn; 2nd Jul 2020, 22:33.

          Comment


            #6
            OK, that was a very long story, but it looks like all you're saying is: in dark themes, don't apply the white color for text that the user hasn't explicitly styled. Is that it?

            Note this is very easy to work around, just use a regex to get rid of the white color before saving.

            Comment


              #7
              >>but it looks like all you're saying is: in dark themes, don't apply the white color for text that the user hasn't explicitly styled. Is that it?

              No, the problem is a little broader. The problem is not just the white font color in a dark theme. The point is that the color, size, and other font properties should not be taken over from the CSS properties of the theme, if they were not set by the editor user.

              Comment


                #8
                We'll take a look - please confirm your SGWT version and build-date, and your OS and Browser.

                Comment


                  #9
                  SGWT Version SNAPSHOT_v13.0d_2020-06-16
                  Windows 10 Pro
                  Google Chrome 83.0.4103.116

                  Comment

                  Working...
                  X