Announcement

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

    Scrollbars in RichTextEditor

    Is it possible to get vertical scrollbar inside body of richTextEditor when there is large data?
    By keyboard up and down i am able to scroll to data but i need scrollbars too.

    <smartgwt.version>12.1-p20200824</smartgwt.version>

    Please suggest.

    #2
    Any update on this.

    Comment


      #3
      We're looking into it and will update here when we have more information.

      Comment


        #4
        We see the problem and are working on a fix. In the meantime, you should see scrolling working as expected if you call editor.setUseDesignMode(false).

        Comment


          #5
          Right now I am not able to find setUseDesignMode(false) on richTextEditor. Will this method on rich Text Editor available in future builds.

          Right now I am using this version: <smartgwt.version>12.1-p20200824</smartgwt.version>

          Comment


            #6
            This is a new feature and hadn't been back-ported - we've added it to 12.1 for builds dated September 26 and later.

            Comment


              #7
              Thanks it worked for RichTextEditor.

              Can you please suggest how can i get scrollbars in RichTextItem. As i am unable to find method setUseDesignMode() for RichTextItem.

              Comment


                #8
                If this is the default behavior you want, you can set it globally for all RichTextEditors, via RichTextEditor.setDefaultProperties()

                Comment


                  #9
                  Hi,

                  I have tried the following code:

                  RichTextItem projectNotesRichTextEditor = new RichTextItem(DSConst.ProjectSQL.PROJECT_NOTES, MESSAGES.projectNotes());
                  final RichTextEditor editor = new RichTextEditor();
                  editor.setUseDesignMode(false);
                  projectNotesRichTextEditor.setDefaultProperties(editor);

                  But it is giving me error.Attaching the screenshot.

                  I nedd scrollbars in RichTextItem.
                  Attached Files

                  Comment


                    #10
                    That code sets the defaults on a RichTextItem. You want to set the default on the global RichTextEditor, like this:

                    Code:
                    final RichTextEditor defaults = new RichTextEditor();
                    defaults.setUseDesignMode(false);
                    RichTextEditor.setDefaultProperties(defaults);

                    Comment


                      #11
                      Hi preeti_kanyal,

                      setting Default Properties on anything is done like this before you draw your first widget (=as your first line in onModuleLoad()):

                      Code:
                              BooleanItem bi = new BooleanItem() {
                                  {
                                      setWidth("*");
                                      setHeight(defaultFormItemHeight);
                                      setLabelAsTitle(true);
                                  }
                              };
                              BooleanItem.setDefaultProperties(bi);
                      Best regards
                      Blama

                      Comment

                      Working...
                      X