Announcement

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

    Styling the Rich Text Editor

    Hi,

    I've noticed the Rich Text Editor's toolstrip doesn't fit the style of the standard ISC ToolStrip object. Is there a way to style the background of the Rich Text Editor toolstrip?

    Also, how can the buttons in the toolstrip be styled e.g. giving them another class than the standard button?

    See attached screenshot for clarification.

    There's a similar question posted here without any answer:
    http://forums.smartclient.com/showthread.php?t=21207

    Thanks!
    Attached Files

    #2
    What skin, what browser and what mode (CSS3 on or off) is this from?

    Comment


      #3
      Please also be sure to post your *full* version, and indicate whether you can see this with the default skin or only once you've added customizations (which we'll need to see if you can't reproduce this with the default skin).

      Comment


        #4
        SmartClient Version: SNAPSHOT_v9.1d_2014-01-26/Pro Deployment (built 2014-01-26)

        It's a question, there is nothing to reproduce. I am using a custom skin based on the Enterprise skin.

        Comment


          #5
          Ah those are your purple colors. We thought you were reporting purple buttons mysteriously appearing.

          Each of the built-in controls in the ControlName enum is an AutoChild, but in camel case like normal AutoChildren (so BOLDSELECTION -> "boldSelection").

          There is also an AutoChild "toolbar" which is what holds the controls.

          We'll get this cleared up in the docs as well.

          Comment


            #6
            Hi, thank you for the clarification, but I'm still not quite able to get it to work. It is unclear to me if the controls are autochildren of the richTextEditor or of the toolbar you mentioned.

            I managed to style the toolbar via:
            Code:
            isc.RichTextEditor.changeDefaults("toolbarDefaults", {
                   styleName:"richTextToolbar"
            });
            but I cant figure out how to style the buttons.
            I tried this but it didnt work:
            Code:
            isc.RichTextEditor.changeDefaults("boldSelectionDefaults", {
                   styleName:"testboldedit3"
            });
            Can you post some example code of how I would change the stylename of the controls in the toolbar of the richTextEditor?
            Last edited by Niels_EMP; 27 Feb 2014, 06:50. Reason: Accidentally a word :)

            Comment


              #7
              The "boldSelection" control is a Button, so setting icon or baseStyle would be expected; styleName would be ignored in favor of the existing baseStyle setting.

              Comment


                #8
                Thank you, now all my buttons are styled.

                My last problem is changing the background color of the toolarea/toolbar. I tried to give it a new style but the background-color of the element.style overwrites it.
                Then I tried to set the background color to null and transparent, neither of which worked. (See attached screenshot

                Code:
                isc.RichTextEditor.changeDefaults("toolAreaDefaults", {
                     styleName:"richTextToolbar",
                     backgroundColor:"transparent"
                });
                So my question is this. How do I set the background color of the toolbar/toolarea?
                Attached Files

                Comment


                  #9
                  Ah, this is controlled by RichTextEditor.toolbarBackgroundColor, so set that to "transparent" (or whatever value you want). We'll make sure this gets properly documented.

                  Comment


                    #10
                    RichTextEditor.toolbarBackgroundColor is now exposed and documented.

                    Comment


                      #11
                      Thank you very much for your help.

                      Comment

                      Working...
                      X