-
15 Jun 2012 7:22 AM #1
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.
-
17 Jun 2012 1:57 AM #2
Which version of GXT are you using? I would like to move this to the correct bug forum.
-
17 Jun 2012 6:22 AM #3
-
8 Aug 2012 8:07 AM #4
-
6 Nov 2012 10:43 AM #5
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(); }
Success! Looks like we've fixed this one. According to our records the fix was applied for
EXTGWT-2195
in
3.0.3.


Reply With Quote