protected function displayPreviewArea( $previewOutput, $isOnTop = false ) {
global $wgOut;
- $classes = array( 'wikiPreview' );
- if( $isOnTop ) $classes[] = 'ontop';
- $attribs = array( 'class' => implode( ' ', $classes ) );
- if( $this->formtype != 'preview' ) $attribs['style'] = 'display: none;';
+ $classes = array();
+ if( $isOnTop )
+ $classes[] = 'ontop';
+
+ $attribs = array( 'id' => 'wikiPreview', 'class' => implode( ' ', $classes ) );
+
+ if( $this->formtype != 'preview' )
+ $attribs['style'] = 'display: none;';
+
$wgOut->addHTML( Xml::openElement( 'div', $attribs ) );
+
if ( $this->formtype == 'preview' ) {
$this->showPreview( $previewOutput );
}
+
$wgOut->addHTML( '</div>' );
if ( $this->formtype == 'diff') {
/* add a bit of margin space between the preview and the toolbar */
/* this replaces the ugly <p><br /></p> we used to insert into the page source */
-.wikiPreview.ontop { margin-bottom: 1em; }
+#wikiPreview.ontop { margin-bottom: 1em; }
/* Stop floats from intruding into edit area in previews */
#toolbar, #wpTextbox1 { clear: both; }