109 | | if ( targetName == 'td' && ( value = target.getAttribute( 'value' ) ) ) |
110 | | { |
111 | | var dialog = this.getDialog(), |
112 | | preview = dialog.getContentElement( 'info', 'charPreview' ).getElement(), |
113 | | htmlPreview = dialog.getContentElement( 'info', 'htmlPreview' ).getElement(); |
114 | | |
115 | | preview.setHtml( value ); |
116 | | htmlPreview.setHtml( CKEDITOR.tools.htmlEncode( value ) ); |
117 | | target.addClass( "LightBackground" ); |
118 | | } |
119 | | }, |
120 | | onMouseout : function( evt ) |
121 | | { |
122 | | var dialog = this.getDialog(); |
123 | | var preview = dialog.getContentElement( 'info', 'charPreview' ).getElement(); |
124 | | var htmlPreview = dialog.getContentElement( 'info', 'htmlPreview' ).getElement(); |
125 | | var target = evt.data.getTarget(); |
126 | | var targetName = target.getName(); |
127 | | preview.setHtml( ' ' ); |
128 | | htmlPreview.setHtml( ' ' ); |
129 | | |
130 | | if ( targetName == 'td' ) |
131 | | target.removeClass( "LightBackground" ); |
132 | | }, |
133 | | onClick : function( evt ) |
134 | | { |
135 | | var target = evt.data.getTarget(); |
136 | | var targetName = target.getName(); |
137 | | var editor = this.getDialog().getParentEditor(); |
138 | | var value; |
139 | | |
140 | | if ( targetName == 'td' ) |
141 | | { |
142 | | target = target.$; |
143 | | if ( ( value = target.getAttribute( 'value' ) ) ) |
144 | | { |
145 | | this.getDialog().restoreSelection(); |
146 | | editor.insertHtml( value ); |
147 | | this.getDialog().hide(); |
148 | | } |
149 | | } |
150 | | } |
| 106 | dialog.getContentElement( 'info', 'charPreview' ).getElement().setHtml( value ); |
| 107 | htmlPreview.setHtml( CKEDITOR.tools.htmlEncode( value ) ); |
| 108 | target.addClass( "LightBackground" ); |
152 | | ] |
| 110 | }, |
| 111 | onMouseout : function( evt ) |
| 112 | { |
| 113 | var target = evt.data.getTarget(); |
| 114 | if ( target.getName() == 'td' ) |
| 115 | { |
| 116 | var dialog = this.getDialog(); |
| 117 | dialog.getContentElement( 'info', 'charPreview' ).getElement().setHtml( ' ' ); |
| 118 | dialog.getContentElement( 'info', 'htmlPreview' ).getElement().setHtml( ' ' ); |
| 119 | target.removeClass( "LightBackground" ); |
| 120 | } |
| 121 | }, |
| 122 | onClick : function( evt ) |
| 123 | { |
| 124 | var target = evt.data.getTarget(); |
| 125 | if ( target.getName() == 'td' && ( value = target.$.getAttribute( 'value' )) ) |
| 126 | { |
| 127 | var dialog = this.getDialog(); |
| 128 | target.removeClass( "LightBackground" ); |
| 129 | dialog.restoreSelection(); |
| 130 | dialog.getParentEditor().insertHtml( value ); |
| 131 | dialog.hide(); |
| 132 | } |
| 133 | } |
160 | | type : 'html', |
161 | | html : '<div></div>' |
162 | | }, |
163 | | { |
164 | | type : 'html', |
165 | | id : 'charPreview', |
166 | | style : 'border:1px solid #eeeeee;background-color:#EAEAD1;font-size:28px;height:40px;padding-top:9px;font-family:\'Microsoft Sans Serif\',Arial,Helvetica,Verdana;text-align:center;', |
167 | | html : '<div> </div>' |
168 | | }, |
169 | | { |
170 | | type : 'html', |
171 | | id : 'htmlPreview', |
172 | | style : 'border:1px solid #eeeeee;background-color:#EAEAD1;font-size:14px;height:20px;padding-top:2px;font-family:\'Microsoft Sans Serif\',Arial,Helvetica,Verdana;text-align:center;', |
173 | | html : '<div> </div>' |
| 142 | type : 'vbox', |
| 143 | align : 'top', |
| 144 | children : |
| 145 | [ |
| 146 | { |
| 147 | type : 'html', |
| 148 | html : '<div></div>' |
| 149 | }, |
| 150 | { |
| 151 | type : 'html', |
| 152 | id : 'charPreview', |
| 153 | style : 'border:1px solid #eeeeee;background-color:#EAEAD1;font-size:28px;height:40px;width:70px;padding-top:9px;font-family:\'Microsoft Sans Serif\',Arial,Helvetica,Verdana;text-align:center;', |
| 154 | html : '<div> </div>' |
| 155 | }, |
| 156 | { |
| 157 | type : 'html', |
| 158 | id : 'htmlPreview', |
| 159 | style : 'border:1px solid #eeeeee;background-color:#EAEAD1;font-size:14px;height:20px;width:70px;padding-top:2px;font-family:\'Microsoft Sans Serif\',Arial,Helvetica,Verdana;text-align:center;', |
| 160 | html : '<div> </div>' |
| 161 | } |
| 162 | ] |