Changeset 542
- Timestamp:
- 2007-07-26 01:03:02 (18 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
MediaWiki/trunk/extensions/FCKeditor/FCKeditor.body.php
r539 r542 258 258 global $wgStylePath, $wgStyleVersion; 259 259 260 print "ONEDIT!!!!!"; 261 260 262 $options = new FCKeditorParserOptions(); 261 263 $options->setTidy(true); … … 263 265 $parser->setOutputType(OT_HTML); 264 266 $form->textbox1 = $parser->parse($form->textbox1, $wgTitle, $options)->getText(); 265 266 $EditorAreaCSS = " "; 267 $EditorAreaCSS .= ""; 268 $EditorAreaCSS .= ""; 269 $EditorAreaCSS .= ""; 270 $EditorAreaCSS .= ""; 271 $EditorAreaCSS .= ""; 272 267 273 268 if (!$wgUser->getOption( 'showtoolbar' ) || $wgUser->getOption( 'riched_disable' )) { 274 269 return true; … … 281 276 $printsheet = htmlspecialchars( "$wgStylePath/common/wikiprintable.css?$wgStyleVersion" ); 282 277 278 //CSS trick, we need to get user CSS stylesheets somehow... it must be done in a different way! 279 $skin = $wgUser->getSkin(); 280 $skin->loggedin = $wgUser->isLoggedIn(); 281 $skin->mTitle =& $wgTitle; 282 $skin->skinname = 'monobook'; 283 $skin->userpage = $wgUser->getUserPage()->getPrefixedText(); 284 $skin->setupUserCss(); 285 286 preg_match_all('/@import "([^"]+)";/', $skin->usercss, $matches); 287 $userStyles = $matches[1]; 288 //End of CSS trick 283 289 284 290 $script = <<<HEREDOC … … 292 298 <!--[if IE 7]><script type="text/javascript">sEditorAreaCSS += ',/mediawiki/skins/monobook/IE70Fixes.css?{$wgStyleVersion}'; </script><![endif]--> 293 299 <!--[if lt IE 7]><script type="text/javascript">sEditorAreaCSS += ',/mediawiki/skins/monobook/IEFixes.css?{$wgStyleVersion}'; </script><![endif]--> 294 300 HEREDOC; 301 302 if (!is_null($userStyles) && !empty($userStyles)) { 303 $script .= ' 304 <script type="text/javascript"> 305 sEditorAreaCSS += ",'.implode(',', $userStyles).'"; 306 </script>'; 307 } 308 309 $script .= <<<HEREDOC 295 310 <script type="text/javascript"> 296 311 function onLoadFCKeditor() … … 301 316 oFCKeditor.BasePath = '$wgScriptPath/$wgFCKEditorDir/' ; 302 317 oFCKeditor.Config['CustomConfigurationsPath'] = '$wgScriptPath/$wgFCKEditorExtDir/fckeditor_config.js' ; 303 //oFCKeditor.Config['EditorAreaCSS'] = sEditorAreaCSS; 304 //oFCKeditor.Config['EditorAreaCSS'] = '/mediawiki/allinone.css?{$wgStyleVersion}'; 318 oFCKeditor.Config['EditorAreaCSS'] = sEditorAreaCSS; 305 319 oFCKeditor.Height = '$wgFCKEditorHeight' ; 306 320 oFCKeditor.ToolbarSet = '$wgFCKEditorToolbarSet' ; 307 321 oFCKeditor.ReplaceTextarea() ; 308 322 document.getElementById('toolbar').style.cssText = 'display:none;' ; 309 //alert(oFCKeditor.Config['EditorAreaCSS']);310 323 } 311 324 }