Announcement

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

    setEditAreaBackgroundColor in RichTextEditor

    Dear alll, I wrote the follwoing code and the result looks strange.

    RichTextEditor textEditor = new RichTextEditor();
    textEditor.setWidth(350);
    textEditor.setHeight(350);
    textEditor.setEditAreaBackgroundColor("#ff0000");


    Click image for larger version

Name:	RichTextEditor.jpg
Views:	116
Size:	10.0 KB
ID:	259838

    #2
    This has been fixed back to SC 11.1 / SGWT 6.1 for builds dated October 31 and later.

    For future reference, you didn't mention your version or build date - we always need that information.

    Comment


      #3
      Sorry.
      I am using SNAPSHOT_v12.1d_2019-10-29 version.
      I previously used the SNAPSHOT_v12.1d_2018-06-28 version and it worked.

      Windows 10 pro
      Chrome v. 77.0.3865.120

      in Internet Explorer 11 it works.
      Last edited by Hirn; 30 Oct 2019, 22:51.

      Comment


        #4
        Looks like a problem solved.
        I have in the main HTML page was

        html, body
        {
        background: #424345 !important;
        }

        Without !important everything works.

        Comment


          #5
          Unfortunately this effect appeared again starting with the version from 2019-11-02.

          It only helps to remove the background-color parameter from the css file, which is loaded into the main html page.
          But unfortunately this is not acceptable for my project.

          Comment


            #6
            Because I wonder, I assume Isomorphic will also wonder: Really 2019-11-02 or 2019-12-02 (today).

            Comment


              #7
              I noticed this bug in version 2019-12-01 and tracked back to version 2019-11-02.

              I have commented out in the file ISC_RichTextEditor.js string
              this.getContentDocument().body.style.backgroundColor = " transparent";
              and everything worked

              Comment


                #8
                Hi Hirn,
                That change was necessary to work around a problem where legitimate styling was failing to display in some cases, so we can't just back it out.

                We're not completely clear on what the current problem is and things appear to be working correctly in our quick testing.
                Can you share some more information with us, please?
                Specifically:

                - does this problem occur in all browsers, or some specific OS/browser combination
                - do you have the css specifying a background color for the page body? Any other CSS?
                - what does your code look like to reproduce the issue (should we be able to see it literally with just the snippet you shared above pasted into a new EntryPoint class?)

                Thanks
                Isomorphic Software

                Comment


                  #9
                  The error appears in all browsers except Internet Explorer 11.

                  What I have...
                  HTML-page index.HTML
                  Code:
                  <!DOCTYPE html>
                  <html lang="en">
                  <head>
                      <meta charset="UTF-8">
                      <title>tasks</title>
                      <link rel="stylesheet" href="css/project.css" type="text/css">
                      <script>
                          var isomorphicDir = "/sc/";
                          window.isc_useSimpleNames = false;
                      </script>
                      <script type="text/javascript" src="sc/modules/ISC_Core.js"></script>
                  ......
                  ......
                      <script type="text/javascript" src="sc/skins/standard/load_skin.js"></script>
                  </head>
                  <body class="tasksAPP">
                  <script type="text/javascript" src="com.abcd.tasksAPP/com.abcd.tasksAPP.nocache.js"></script>
                  <div id="content"></div>
                  </body>
                  </html>
                  the file project.css which contains the following

                  Code:
                  html, body
                  {
                     padding: 0;
                     margin: 0;
                     background: #424345;
                     font-family:  Arial, Verdana, sans-serif; font-size: 14px; color: white;
                  }
                  and the file tasksAPP.java, which I minimized to the form

                  Code:
                      public void onModuleLoad() {
                          RichTextEditor textEditor = new RichTextEditor();
                          textEditor.setWidth(350);
                          textEditor.setHeight(350);
                          textEditor.setEditAreaBackgroundColor("#ff0000");
                          RootPanel.get("content").add(textEditor);
                      }
                  the result you can see in the picture in my first post

                  maybe this will help you....
                  I noticed that when you create Rich Text Editor, an iFrame element is created. And it is loaded http://127.0.0.1:8888/sc/system/helpers/empty.html, which in turn pulls my http://127.0.0.1:8888/css/project.css

                  Comment


                    #10
                    Thanks for the clarifications. This issue will be fixed with the next nightly build (in branches 12.1, 12.0 and 11.1/6.1)

                    Regards
                    Isomorphic Software

                    Comment

                    Working...
                    X