equal
deleted
inserted
replaced
117 console.info('$dynano().switchToMCE(): doing "exact"-type MCE init'); |
117 console.info('$dynano().switchToMCE(): doing "exact"-type MCE init'); |
118 enano_tinymce_options.mode = 'exact'; |
118 enano_tinymce_options.mode = 'exact'; |
119 enano_tinymce_options.elements = this.object.id; |
119 enano_tinymce_options.elements = this.object.id; |
120 initTinyMCE(); |
120 initTinyMCE(); |
121 this.object.dnIsMCE = 'yes'; |
121 this.object.dnIsMCE = 'yes'; |
122 return true; |
|
123 } |
122 } |
124 else |
123 else |
125 { |
124 { |
126 console.info('$dynano().switchToMCE(): tinyMCE already loaded, calling mceAddControl'); |
125 console.info('$dynano().switchToMCE(): tinyMCE already loaded, calling mceAddControl'); |
127 tinymce.EditorManager.execCommand("mceAddControl", true, this.object.id); |
126 tinymce.EditorManager.execCommand("mceAddControl", true, this.object.id); |
128 this.object.dnIsMCE = 'yes'; |
127 this.object.dnIsMCE = 'yes'; |
|
128 } |
|
129 // Any elements to hide? |
|
130 var objs = getElementsByClassName(this.object.parentNode, '*', 'hide-with-mce'); |
|
131 console.debug(objs); |
|
132 for ( var i = 0; i < objs.length; i++ ) |
|
133 { |
|
134 objs[i].style.display = 'none'; |
129 } |
135 } |
130 return this; |
136 return this; |
131 } |
137 } |
132 |
138 |
133 function DN_destroyMCE(performWikiTransform) |
139 function DN_destroyMCE(performWikiTransform) |
149 this.object.value = DN_XHTMLToWikitext(this.object.value); |
155 this.object.value = DN_XHTMLToWikitext(this.object.value); |
150 } |
156 } |
151 } |
157 } |
152 } |
158 } |
153 this.object.dnIsMCE = 'no'; |
159 this.object.dnIsMCE = 'no'; |
|
160 // Any elements to re-show? |
|
161 var objs = getElementsByClassName(this.object.parentNode, '*', 'hide-with-mce'); |
|
162 for ( var i = 0; i < objs.length; i++ ) |
|
163 { |
|
164 objs[i].style.display = 'block'; |
|
165 } |
154 return this; |
166 return this; |
155 } |
167 } |
156 |
168 |
157 function DN_isMCE() |
169 function DN_isMCE() |
158 { |
170 { |