Project

General

Profile

1
package eu.dnetlib.client.widgets;
2

    
3
/**
4
 * Created by stefania on 4/17/15.
5
 */
6
public class CKEditor {
7

    
8
    protected CKEditorJSO editor;
9

    
10
    public CKEditor(String id) {
11
        editor = initCKEditor(id);
12
    }
13

    
14
    public void setValue(String value) {
15
        editor.setData(value);
16
    }
17

    
18
    public String getValue() {
19
        return editor.getData();
20
    }
21

    
22
    public void setUIColor(String value) {
23
        editor.setUiColor(value);
24
    }
25

    
26
    public void destroy() {
27
        editor.destroy();
28
    }
29

    
30
    private native CKEditorJSO initCKEditor(String id) /*-{
31
        return $wnd.CKEDITOR.replace( id );
32
    }-*/;
33
}
(6-6/21)