01: /*
02: * GWT-Ext Widget Library
03: * Copyright(c) 2007-2008, GWT-Ext.
04: * licensing@gwt-ext.com
05: *
06: * http://www.gwt-ext.com/license
07: */
08:
09: package com.gwtext.client.widgets.form.event;
10:
11: import com.gwtext.client.widgets.form.HtmlEditor;
12:
13: public interface HtmlEditorListener extends FieldListener {
14:
15: /**
16: * Fires when the editor is first receives the focus. Any insertion must wait until after this event.
17: *
18: * @param field this
19: */
20: void onActivate(HtmlEditor field);
21:
22: /**
23: * Fires before the iframe editor is updated with content from the textarea. Return false to cancel the push.
24: *
25: * @param field this
26: * @param html the html
27: * @return false to cancel
28: */
29: boolean doBeforePush(HtmlEditor field, String html);
30:
31: /**
32: * Fires before the textarea is updated with content from the editor iframe. Return false to cancel the sync.
33: *
34: * @param field this
35: * @param html the html
36: * @return false to cancel sync
37: */
38: boolean doBeforeSync(HtmlEditor field, String html);
39:
40: /**
41: * Fires when the editor switches edit modes.
42: *
43: * @param field this
44: * @param sourceEdit true if source edit, false if standard editing
45: */
46: void onEditModeChange(HtmlEditor field, boolean sourceEdit);
47:
48: /**
49: * Fires when the editor is fully initialized (including the iframe)
50: *
51: * @param field this
52: */
53: void onInitialize(HtmlEditor field);
54:
55: /**
56: * Fires when the iframe editor is updated with content from the textarea.
57: *
58: * @param field this
59: * @param html the html
60: */
61: void onPush(HtmlEditor field, String html);
62:
63: /**
64: * Fires when the textarea is updated with content from the editor iframe.
65: *
66: * @param field this
67: * @param html the html
68: */
69: void onSync(HtmlEditor field, String html);
70: }
|