Ticket #1432 (closed Bug: fixed)
Patch for template: line breaks in IE and documentation preview
| Reported by: | ycombarnous | Owned by: | |
|---|---|---|---|
| Priority: | Normal | Milestone: | |
| Component: | Project : MediaWiki+FCKeditor | Version: | SVN (FCKeditor) |
| Keywords: | HasPatch | Cc: |
Description
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.
Attachments
Change History
Note: See
TracTickets for help on using
tickets.
