case 'fck_mw_onlyinclude' :
sNodeName = 'onlyinclude' ;
break;
case 'fck_mw_source':
var lang = htmlNode.getAttribute( 'lang' );
var line = htmlNode.getAttribute( 'line' );
var start = htmlNode.getAttribute( 'start' );
var enclose = htmlNode.getAttribute( 'enclose' );
var strict = htmlNode.getAttribute( 'strict' );
stringBuilder.push( '<source ' ) ;
if ( lang && lang.length > 0 )
stringBuilder.push( ' lang="' + lang + '" ' ) ;
if ( line && line.length > 0 )
stringBuilder.push( ' line="' + line + '" ' ) ;
if ( start && start.length > 0 )
stringBuilder.push( ' start="' + start + '" ' ) ;
if ( enclose && enclose.length > 0 )
stringBuilder.push( ' enclose="' + enclose + '" ' ) ;
if ( strict && strict.length > 0 )
stringBuilder.push( ' strict="' + strict + '" ' ) ;
if ( htmlNode.innerHTML.length == 0 )
stringBuilder.push( ' />' ) ;
else {
stringBuilder.push( '>' ) ;
stringBuilder.push( htmlNode.textContent );
stringBuilder.push( '</source>' ) ;
}
break;
}
if(htmlNode.className == 'fck_mw_source')
break;
// Change the node name and fell in the "default" case.
if ( htmlNode.getAttribute( '_fck_mw_customtag' ))
sNodeName = htmlNode.getAttribute( '_fck_mw_tagname' ) ;
Hi, any idea how I would adapt the above hack in order to work with other tags, e.g. the rss tag or a custom tag? I naively tried substituting rss for source in the above code but it didn't work. Any ideas what else I would need to change? Thanks, David
Re: mediawiki+FCKeditor: make editor work with wiki extensions
case 'fck_mw_source': var lang = htmlNode.getAttribute( 'lang' ); var line = htmlNode.getAttribute( 'line' ); var start = htmlNode.getAttribute( 'start' ); var enclose = htmlNode.getAttribute( 'enclose' ); var strict = htmlNode.getAttribute( 'strict' ); stringBuilder.push( '<source ' ) ; if ( lang && lang.length > 0 ) stringBuilder.push( ' lang="' + lang + '" ' ) ; if ( line && line.length > 0 ) stringBuilder.push( ' line="' + line + '" ' ) ; if ( start && start.length > 0 ) stringBuilder.push( ' start="' + start + '" ' ) ; if ( enclose && enclose.length > 0 ) stringBuilder.push( ' enclose="' + enclose + '" ' ) ; if ( strict && strict.length > 0 ) stringBuilder.push( ' strict="' + strict + '" ' ) ; if ( htmlNode.innerHTML.length == 0 ) stringBuilder.push( ' />' ) ; else { stringBuilder.push( '>' ) ; stringBuilder.push( htmlNode.textContent ); stringBuilder.push( '</source>' ) ; } break; } if(htmlNode.className == 'fck_mw_source') break;Re: mediawiki+FCKeditor: make editor work with wiki extensions
David
Re: mediawiki+FCKeditor: make editor work with wiki extensions
<source lang="php">
<?php
$x = hi;
?>
</source>
becomes
<source lang="php"> <?php $x = hi; ?> </source>
Anyone know if this still works for the latest FckEditor+Mediawiki?
Re: mediawiki+FCKeditor: make editor work with wiki extensions
Any suggestions?
Regards
Christian
Re: mediawiki+FCKeditor: make editor work with wiki extensio
http://dev.ckeditor.com/ticket/2432