Home > php教程 > php手册 > body text

CKeditor的分页问题

WBOY
Release: 2016-06-06 19:32:37
Original
995 people have browsed it

源码出处:http://www.codephp.cn/html/tools/editortool/2013/1205/17.html 无 源码与演示: 源码出处演示出处 $strArr = preg_split('/div[^].*page-break-after:\salways(;)?[^].*([^].*)\/div/',$_POST['descr'],null,PREG_SPLIT_NO_EMPTY);$count = coun

源码出处:http://www.codephp.cn/html/tools/editortool/2013/1205/17.html

源码与演示:源码出处 演示出处

$strArr = preg_split('/<div[^>].*page-break-after:\salways(;)?[^>].*>([^>].*)<\/div>/',$_POST['descr'],null,PREG_SPLIT_NO_EMPTY);
$count = count($strArr);
if($count>1){
	$outstr   = '<div id="page_break">'; 
	foreach($strArr as $_k=>$_v){
		if($_k<=0){
			$outstr .='<div id="page_'.($_k+1).'">'.$_v.'</div>'; 
		}else{
			$outstr .='<div id="page_'.($_k+1).'" class="collae">'.$_v.'</div>'; 
		}
	}
	$outstr .='<div class="num">';
	for($i=0;$i<$count;$i++){
		$outstr .='<li>'.($i+1).'</li>';
	}
	$outstr .="</div></div>";
	$_POST['description'] = $outstr;
}
Copy after login
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template