Success! Looks like we've fixed this one. According to our records the fix was applied for EXTGWT-2195 in a recent build.
  1. #1
    Ext GWT Premium Member
    Join Date
    Oct 2008
    Posts
    72
    Vote Rating
    5
    elirov is on a distinguished road

      0  

    Default HtmlEditor component getValue() doesn't return the right value

    HtmlEditor component getValue() doesn't return the right value


    If we create a new HtmlEditor e = new HtmlEditor();
    when we run e.getValue(), we get the value of the Rich Text Editor always, so if the user switches to the source editor, and clicks our Save button without switching back to the rich text editor, then their changes do not get saved.

    Proposed solutions:
    1. getValue() should figure out which editor mode you're using and get the HTML from that mode, not just from the RTE mode.
    2. add a getEditingMode() method to allow us to figure out what editing mode the HtmlEditor is currently in, so we can decide if we want to pushValue() or syncValue() before getValue()

    Thanks.

  2. #2
    Sencha User
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    Which version of GXT are you using? I would like to move this to the correct bug forum.

  3. #3
    Ext GWT Premium Member
    Join Date
    Oct 2008
    Posts
    72
    Vote Rating
    5
    elirov is on a distinguished road

      0  

    Default


    GXT 3.0.0b
    Thanks!

  4. #4
    Ext GWT Premium Member
    Join Date
    Oct 2008
    Posts
    72
    Vote Rating
    5
    elirov is on a distinguished road

      0  

    Default


    Any fixes in sight?

  5. #5
    Sencha - GXT Dev Team darrellmeyer's Avatar
    Join Date
    May 2007
    Location
    Washington, DC
    Posts
    2,242
    Vote Rating
    2
    darrellmeyer is on a distinguished road

      0  

    Default


    This is now fixed. Changes will go out in 3.0.3.
    Code:
    public boolean isEnableSourceEditMode()
    public void setEnableSourceEditMode(boolean enable) {}
    
    public boolean isSourceEditMode() 
    public void setSourceEditMode(boolean sourceEditMode)  {}
    
      @Override
      public String getValue() {
        if (sourceEditMode && sourceTextArea != null) {
          pushValue();
        }
        return textArea.getHTML();
      }

Thread Participants: 2

Tags for this Thread