我的代码看起来应该是这样的:
<div class="menuslct">
<table width="980" border="0" style="text-align:center">
<tbody><tr>
<td width="33%"><a href="/en/education"><img src="/common/img/icons/01 online.PNG" name="online" width="81" height="78"></a></td>
<td width="33%"><a href="http://esukhia.org/en/education/immersion"><img src="/common/img/icons/02 immersion.jpg" name="immersion" width="80" height="78"></a></td>
<td width="33%"><a href="http://esukhia.org/en/education/thesisadv"><img src="/common/img/icons/03 Thesis Advisor.jpg" width="78" name="thesisadv" height="78"></a></td>
</tr>
<tr>
<td width="33%" name="online">Online</td>
<td width="33%" name="immersion">Immersion</td>
<td width="33%" name="thesisadv">Research Advisor</td>
</tr>
</tbody></table>
</div>
但是当通过php在ckeditor中打开包括:
<textarea name="editor1" id="editor1">
<?php echo file_get_contents('education.php');?>
</textarea>
<script>
CKEDITOR.replace( 'editor1' );
</script>
它看起来像这样:
<div class="menuslct">
<table border="0" style="text-align:center; width:980px">
<tbody>
<tr>
<td><a href="/en/education"><img src="/common/img/icons/01 onlie.PNG" style="height:78px; width:81px" /></a></td>
<td><a href="http://esukhia.org/en/education/immersion"><img src="/common/img/icons/02 immersion.jpg" style="height:78px; width:80px" /></a></td>
<td><a href="http://esukhia.org/en/education/thesisadv"><img src="/common/img/icons/03 Thesis Advisor.jpg" style="height:78px; width:78px" /></a></td>
</tr>
<tr>
<td>Online</td>
<td>Immersion</td>
<td>Research Advisor</td>
</tr>
</tbody>
</table>
</div>
为什么ckeditor会剥离我的代码?
答案 0 :(得分:0)
我通过这种方式调用此ckeditor来实现它:
CKEDITOR.replace( 'editor1',{allowedContent: true} );
删除所有ckeditor剥离功能。