7 Replies Latest reply on Jan 11, 2011 2:45 AM by sars

    How to override default style class in rich:editor

    sarlinraj

      Hi!

         In my application I used rich:editor.  but my application theme did not match with rich:editor style class(Appearence).

      So I need to over ride the default style class of rich:editor.

      but i dont have any idea about how to do this.

      if any body knows then plz help me!

       

       

      thanks in advance

      Saravanan

        • 1. Re: How to override default style class in rich:editor
          ilya40umov

          You can use firebug and find classes of elements which does not match with your pages. Then you can define the same classes(with the same names) in your css file and browser should use your styles instead of defaults.

           

          You can find more about css classes of rich:editor here:

          http://docs.jboss.org/richfaces/latest_3_3_X/en/devguide/html/rich_editor.html

          • 2. Re: How to override default style class in rich:editor
            sarlinraj

            Hi!

              Thanks for your response!

              I tried that. After the implementation , the firebug showed "Default style class overrided my custom style class".

              if u have any idea about that then plz help me!

            • 3. Re: How to override default style class in rich:editor
              ilya40umov

              Does it mean that you didn't override needed class? Is your browser still using old class instead of yours?

              • 4. Re: How to override default style class in rich:editor
                sarlinraj

                It doesn't mean "I did not". It means "I can't".  I override needed class. Eventhough rich:editor's default style class overrided my custom style class.

                Firebug showed my custom style class was strikeout.

                • 5. Re: How to override default style class in rich:editor
                  ilya40umov

                  It's strange bacause the same stuff worked for me very well. Look at your html and find when your css file is getting attached. Because mine is attached after all RF css files.

                   

                  How do you include your css on a page? (with aj4:loadStyle or not)

                   

                  P.S. You can try to define class directly on a page.

                  <style>

                  .some-rf-style {

                  }

                  </style>

                  • 6. Re: How to override default style class in rich:editor
                    sars

                    Hi,

                     

                    I get the same problem but little bit different. I succeeded to override .rich-panel-body style to be

                    .rich-panel-body{

                      PADDING-RIGHT: 1px;

                      PADDING-LEFT: 1px;

                      PADDING-BOTTOM: 10px;

                      PADDING-TOP: 10px;

                     

                    } in external css I saved it in style.css. But I need to override one more time for one page only, in the page I did this code

                     

                     

                    .....rich faces elements

                    <style>

                                                                                          .rich-panel-body

                                                                                          {

                                                                                            margin-top: 81px;

                                                                                          }

                                                                      </style>

                    ......rich faces elements

                     

                    but why, the second override can't work? Please help

                    • 7. Re: How to override default style class in rich:editor
                      sars

                      It's solved : )

                       

                      I just made other class in my style.css, then I called it by bodyClass="my-new-class", and it work. Thanks guys.