55 | | type : 'hbox', |
56 | | align : 'top', |
57 | | padding : 0, |
58 | | widths : [ '350px' ], |
59 | | children : |
60 | | [ |
61 | | { |
62 | | type : 'html', |
63 | | id : 'charContainer', |
64 | | html : '', |
65 | | onMouseover : function( evt ) |
66 | | { |
67 | | var dialog = this.getDialog(); |
68 | | var htmlPreview = dialog.getContentElement( 'info', 'htmlPreview' ).getElement(); |
69 | | var preview = dialog.getContentElement( 'info', 'charPreview' ).getElement(); |
70 | | var target = evt.data.getTarget(); |
71 | | var targetName = target.getName(); |
| 55 | type : 'html', |
| 56 | id : 'charContainer', |
| 57 | html : '', |
| 58 | onMouseover : function( evt ) |
| 59 | { |
| 60 | var target = evt.data.getTarget(); |
| 61 | var targetName = target.getName(); |
86 | | var target = evt.data.getTarget(); |
87 | | var targetName = target.getName(); |
88 | | preview.setHtml( ' ' ); |
89 | | htmlPreview.setHtml( ' ' ); |
90 | | |
91 | | if ( targetName == 'td' ) |
92 | | target.removeClass( "LightBackground" ); |
93 | | }, |
94 | | onClick : function( evt ) |
95 | | { |
96 | | var target = evt.data.getTarget(); |
97 | | var targetName = target.getName(); |
98 | | var editor = this.getDialog().getParentEditor(); |
99 | | if ( targetName == 'td' ) |
100 | | { |
101 | | target = target.$; |
102 | | if ( value = target.getAttribute( 'value' ) ) |
103 | | { |
104 | | this.getDialog().restoreSelection(); |
105 | | editor.insertElement( CKEDITOR.dom.element.createFromHtml( value ) ); |
106 | | this.getDialog().hide(); |
107 | | } |
108 | | } |
| 69 | preview.setHtml( value ); |
| 70 | target.addClass( "LightBackground" ); |
| 71 | htmlPreview.setHtml( CKEDITOR.tools.htmlEncode( value ) ); |
| 73 | }, |
| 74 | onMouseout : function( evt ) |
| 75 | { |
| 76 | var target = evt.data.getTarget(); |
| 77 | var targetName = target.getName(); |
| 78 | if ( targetName == 'td' ) |
| 79 | { |
| 80 | var dialog = this.getDialog(); |
| 81 | var preview = dialog.getContentElement( 'info', 'charPreview' ).getElement(); |
| 82 | var htmlPreview = dialog.getContentElement( 'info', 'htmlPreview' ).getElement(); |
| 83 | preview.setHtml( ' ' ); |
| 84 | htmlPreview.setHtml( ' ' ); |
| 85 | target.removeClass( "LightBackground" ); |
119 | | type : 'html', |
120 | | html : '<div></div>' |
121 | | }, |
122 | | { |
123 | | type : 'html', |
124 | | id : 'charPreview', |
125 | | 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;', |
126 | | html : '<div> </div>' |
127 | | }, |
128 | | { |
129 | | type : 'html', |
130 | | id : 'htmlPreview', |
131 | | 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;', |
132 | | html : '<div> </div>' |
| 109 | type : 'vbox', |
| 110 | align : 'top', |
| 111 | children : |
| 112 | [ |
| 113 | { |
| 114 | type : 'html', |
| 115 | html : '<div></div>' |
| 116 | }, |
| 117 | { |
| 118 | type : 'html', |
| 119 | id : 'charPreview', |
| 120 | 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;', |
| 121 | html : '<div> </div>' |
| 122 | }, |
| 123 | { |
| 124 | type : 'html', |
| 125 | id : 'htmlPreview', |
| 126 | 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;', |
| 127 | html : '<div> </div>' |
| 128 | } |
| 129 | ] |