1 Reply Latest reply on Sep 21, 2010 8:40 AM by Glauco Correa

    Rich:editor changing toolbar theme and set fullscreen mode

    Glauco Correa Newbie

      Hello everyone, I am new here and just started learning about richfaces...


      I am using rich:editor in my web page and I need to set its theme from simple to advance, but at the same time I want to change it to fullscreen mode.


      Ok, I am doing this:


      I have a button with a javascript function (.click) that gets the toggle fullscreen mode button id from the advanced rich:editors toolbar. Ok, it works fine, the problem is... when the page is loaded for the first time, the toolbar is in the simple theme, so the fullscreen button does not exist yet, and  i cant get its id.


      I would like to know if it is possible to insert the fullscreen button in the simple theme toolbar. So I could keep this javascript funtion that Im using.


      Or if is there any other function that I can use to set the rich:editor to fullscreen mode also changing the toolbars theme.





        • 1. Re: Rich:editor changing toolbar theme and set fullscreen mode
          Glauco Correa Newbie

          This is my code:




          function fullScreen(){

          <a4j:form id="formReq">


                     <rich:editor value="#{requisito.requisito.detail}"
                           id="detail" required="true"
                           requiredMessage="Message" width="460"
                           <c:if test="${requisito.changeEditor}">
                                 <ui:include src="editor_config_plus.jsf" />




             <a4j:commandButton styleClass="botao icon_novo"
                    id="btnEditor1" value="#{requisito.btnName}"
                    oncomplete="fullScreen();" reRender="btnEditor1,detail" />







          boolean changeEditor;

          String btnEditor;


          public void changeEditor(){
                  clicou = true;
                      if(changeEditor && btnEditor.equals("Editor Simple")){
                          BtnEditor = "Editor Advanced";
                          changeEditor = true;
                          if(changeEditor) btnEditor = "Editor Simple";
                          else btnEditor = "Editor Advanced";
                  clicou = false;




          Glauco Correa