1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.student.common.ui.client.widgets.impl;
17
18
19
20 import org.kuali.student.common.ui.client.widgets.KSRichEditorAbstract;
21
22 import com.google.gwt.event.dom.client.BlurHandler;
23 import com.google.gwt.event.dom.client.FocusHandler;
24 import com.google.gwt.event.shared.HandlerRegistration;
25 import com.google.gwt.user.client.ui.RichTextArea;
26
27
28
29
30
31 public class KSRichEditorImpl extends KSRichEditorAbstract {
32 private final RichTextArea textArea = new RichTextArea();
33
34 public KSRichEditorImpl(){
35 init();
36 }
37
38 @Override
39 public String getHTML() {
40 return textArea.getHTML();
41 }
42
43 @Override
44 public RichTextArea getRichTextArea() {
45 return textArea;
46 }
47
48 @Override
49 public String getText() {
50 return textArea.getText();
51 }
52
53 @Override
54 protected void init() {
55 this.initWidget(textArea);
56 }
57
58 @Override
59 public void setHTML(String html) {
60 textArea.setHTML(html);
61 }
62
63 @Override
64 public void setStyleName(String style) {
65 textArea.setStyleName(style);
66
67 }
68
69 @Override
70 public void setText(String text) {
71 textArea.setText(text);
72 }
73
74 @Override
75 public HandlerRegistration addBlurHandler(BlurHandler handler) {
76 return textArea.addBlurHandler(handler);
77 }
78
79 @Override
80 public HandlerRegistration addFocusHandler(FocusHandler handler) {
81 return textArea.addFocusHandler(handler);
82 }
83
84
85
86 }