用ckeditor分页符结合正则表达式给文章分页,ckeditor中插入的分页符的html标记是
<div style="page-break-after: always">
<span style="display: none"> </span></div>
用正则表达式描述就是:
^<div\s{1,}style="page-break-after\s{0,}:\s{0,}always">\s{0,}<span\s{1,}style="display\s{0,}:\s{0,}none">\s{0,} \s{0,}</span>\s{0,}</div>$
然后再用正则表达式分割:
string[] ss = System.Text.RegularExpressions.Regex.Split(原长文章,分割用正则表达式);
具体示例工程代码下载:
http://cid-21da4f7483a63c39.skydrive.live.com/self.aspx/myshared/CkeditorSolution1.rar