Anishri Kumar
Anishri Kumar

Reputation: 69

GWT CK EDITOR - Rendering issue

I am using gwt-ckeditor in my application. I am using GWT 2.5 and I have embedded CKEDITOR in GWT. I have some fields in form containing CKEditor as well. When I navigate from one form to another, it does not sustain its value. I dont want to save it. But I want to sustain it atleast for my validations to get complete. How can I acheive this functionality ? Please let me know. As Whenever it is getting detached it is losing its values.

Upvotes: 2

Views: 294

Answers (1)

PVR
PVR

Reputation: 2524

Yeah I was also facing the same issue. CKeditor is actually extended from IFrame and that is why when it is detached from the form or widget, it will loose all the information. To sustain its value , you have to manually code it.

private String ckValue ;

CkEditor ckeditor = new CkEditor(new CkConfig());
ckeditor.addAttachHandler(new AttachHandler(){
       public void onAttach(Event value){
             setCkValue(value);
       }
});

public void setCkValue(String ckValue){
      this.ckValue = ckValue;
}

public String getCkValue(){
      return ckValue;
}

Upvotes: 1

Related Questions