equal
deleted
inserted
replaced
20 { |
20 { |
21 this.object.dnIsMCE = 'no'; |
21 this.object.dnIsMCE = 'no'; |
22 this.switchToMCE = DN_switchToMCE; |
22 this.switchToMCE = DN_switchToMCE; |
23 this.destroyMCE = DN_destroyMCE; |
23 this.destroyMCE = DN_destroyMCE; |
24 this.getContent = DN_mceFetchContent; |
24 this.getContent = DN_mceFetchContent; |
|
25 this.setContent = DN_mceSetContent; |
25 } |
26 } |
26 } |
27 } |
27 function __DNObjGetHeight(o) { |
28 function __DNObjGetHeight(o) { |
28 return o.offsetHeight; |
29 return o.offsetHeight; |
29 } |
30 } |
146 { |
147 { |
147 return this.object.value; |
148 return this.object.value; |
148 } |
149 } |
149 } |
150 } |
150 |
151 |
|
152 function DN_mceSetContent(text) |
|
153 { |
|
154 if ( this.object.name ) |
|
155 { |
|
156 this.object.value = text; |
|
157 if ( tinyMCE.get(this.object.id) ) |
|
158 { |
|
159 var editor = tinyMCE.get(this.object.id); |
|
160 editor.setContent(text); |
|
161 } |
|
162 } |
|
163 else |
|
164 { |
|
165 this.object.value = text; |
|
166 } |
|
167 } |
|
168 |
151 // A basic Wikitext to XHTML converter |
169 // A basic Wikitext to XHTML converter |
152 function DN_WikitextToXHTML(text) |
170 function DN_WikitextToXHTML(text) |
153 { |
171 { |
154 text = text.replace(/^===[\s]*(.+?)[\s]*===$/g, '<h3>$1</h3>'); |
172 text = text.replace(/^===[\s]*(.+?)[\s]*===$/g, '<h3>$1</h3>'); |
155 text = text.replace(/'''(.+?)'''/g, '<b>$1</b>'); |
173 text = text.replace(/'''(.+?)'''/g, '<b>$1</b>'); |