108 // |
108 // |
109 // BUILD EDITOR |
109 // BUILD EDITOR |
110 // |
110 // |
111 |
111 |
112 var heading = document.createElement('h3'); |
112 var heading = document.createElement('h3'); |
|
113 heading.style.cssFloat = 'left'; |
|
114 heading.style.styleFloat = 'left'; |
113 heading.appendChild(document.createTextNode($lang.get('editor_msg_editor_heading'))); |
115 heading.appendChild(document.createTextNode($lang.get('editor_msg_editor_heading'))); |
114 |
116 |
115 // Plaintext/wikitext toggler |
117 // Plaintext/wikitext toggler |
116 // Only build the editor if using TinyMCE is allowed. THIS IS WEAK |
118 // Only build the editor if using TinyMCE is allowed. THIS IS WEAK |
117 // AND CANNOT BE MADE ANY STRONGER. |
119 // AND CANNOT BE MADE ANY STRONGER. |
118 |
120 |
119 if ( allow_wysiwyg ) |
121 if ( allow_wysiwyg ) |
120 { |
122 { |
121 var toggler = document.createElement('p'); |
123 var toggler = document.createElement('p'); |
122 toggler.style.marginLeft = '0'; |
124 toggler.style.marginLeft = '0'; |
|
125 toggler.style.cssFloat = 'right'; |
|
126 toggler.style.styleFloat = 'right'; |
|
127 toggler.style.paddingTop = '4pt'; |
123 |
128 |
124 var span_wiki = document.createElement('span'); |
129 var span_wiki = document.createElement('span'); |
125 var span_mce = document.createElement('span'); |
130 var span_mce = document.createElement('span'); |
126 span_wiki.id = 'enano_edit_btn_pt'; |
131 span_wiki.id = 'enano_edit_btn_pt'; |
127 span_mce.id = 'enano_edit_btn_mce'; |
132 span_mce.id = 'enano_edit_btn_mce'; |
172 var preview_anchor = document.createElement('a'); |
178 var preview_anchor = document.createElement('a'); |
173 preview_anchor.name = 'ajax_preview'; |
179 preview_anchor.name = 'ajax_preview'; |
174 preview_anchor.id = 'ajax_preview'; |
180 preview_anchor.id = 'ajax_preview'; |
175 var preview_container = document.createElement('div'); |
181 var preview_container = document.createElement('div'); |
176 preview_container.id = 'enano_editor_preview'; |
182 preview_container.id = 'enano_editor_preview'; |
|
183 preview_container.style.clear = 'both'; |
177 |
184 |
178 // Textarea containing the content |
185 // Textarea containing the content |
179 var ta_wrapper = document.createElement('div'); |
186 var ta_wrapper = document.createElement('div'); |
180 ta_wrapper.style.margin = '10px 0'; |
187 ta_wrapper.style.margin = '10px 0'; |
|
188 ta_wrapper.style.clear = 'both'; |
181 var textarea = document.createElement('textarea'); |
189 var textarea = document.createElement('textarea'); |
182 textarea.value = content; |
190 textarea.value = content; |
183 textarea._edTimestamp = timestamp; |
191 textarea._edTimestamp = timestamp; |
184 textarea.id = 'ajaxEditArea'; |
192 textarea.id = 'ajaxEditArea'; |
185 textarea.rows = '20'; |
193 textarea.rows = '20'; |