FCKeditor修改分页符插件

版权声明:原创作品,允许转载,转载时请务必以超链接形式标明文章原始出版、作者信息和本声明。否则将追究法律责任。 http://blog.csdn.net/mayongzhan - 马永占,myz,mayongzhan

今天简单的修改了下,分页符的fck插件.
分页是fck自带的...改一下就可以了.
分页的那个在fck_othercommands.js文件里
找到e.innerHTML = '
后面改成你想要的分页符...
比如 e.innerHTML = '<span class="color:#FFFFFF;">马永占_分割符_MyZ_</span>' ;
然后保存...OK
fck_othercommands.js文件里包含很多插件...没有的去网上搜一下,基本上什么都有.实在没有了.自己开发..不是很难.
// ### Page Break
var FCKPageBreakCommand = function()
{
this.Name = 'PageBreak' ;
}
FCKPageBreakCommand.prototype.Execute = function()
{
// Take an undo snapshot before changing the document
FCKUndo.SaveUndoStep() ;
// var e = FCK.EditorDocument.createElement( 'CENTER' ) ;
// e.style.pageBreakAfter = 'always' ;
// Tidy was removing the empty CENTER tags, so the following solution has
// been found. It also validates correctly as XHTML 1.0 Strict.
var e = FCK.EditorDocument.createElement( 'DIV' ) ;
e.style.pageBreakAfter = 'always' ;
e.innerHTML = '<span class="color:#FFFFFF;">马永占_MyZ_分割符</span>' ;
var oFakeImage = FCKDocumentProcessor_CreateFakeImage( 'FCK__PageBreak', e ) ;
FCK.InsertElement( oFakeImage ) ;
}
FCKPageBreakCommand.prototype.GetState = function()
{
return 0 ; // FCK_TRISTATE_OFF
}
v

你可能感兴趣的:(.net,XHTML,fckeditor,prototype,出版)