﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
1432	Patch for template: line breaks in IE and documentation preview	barns		"IE does not seem to retain line breaks in templates.
In addition, I added a tab to the template dialog to see the templates page (it will display a documentation on the selected template if there is a noinclude part).

In FCKeditorParser.body.php
{{{
$this->fck_mw_strtr_span['Fckmw'.$this->fck_mw_strtr_span_counter.'fckmw'] = '<span class=""fck_mw_template"">'.str_replace(array(""\r\n"", ""\n"", ""\r""),""fckLR"",$inner).'</span>';
}}}

In fckplugin.js:
{{{
case 'fck_mw_template' :		
stringBuilder.push( FCKTools.HTMLDecode(htmlNode.innerHTML).replace(/fckLR/g,'\r\n') ) ;
return ;
}}}

In FCKeditorSjax.body.php, add:
{{{
function wfSajaxSearchTemplateFCKeditor($empty)
{
    global $wgContLang, $wgOut; 
    $ns = NS_TEMPLATE;

    $db =& wfGetDB( DB_SLAVE );
    $res = $db->select( 'page', 'page_title',
    array(  'page_namespace' => $ns),
    ""wfSajaxSearch""
    );

    $ret = """";
    while ( $row = $db->fetchObject( $res ) ) {
        $ret .= $row->page_title .""\n"";
    }

    return $ret;
}
}}}

The patched template.html is in attachment."	Bug	closed	Normal		Project : MediaWiki+FCKeditor	SVN (FCKeditor) - Retired	fixed	HasPatch	
