我想用tinymce 编辑器及其文本打印一个页面。
这是我的代码..
<script type="text/javascript">
tinyMceEditor("StaffResponsibility,Encourager,Bonus");
function printPage(printpage1, printpage2)
{
var headstr = "<html><head><title></title></head><body>";
var footstr = "</body>";
var newstr1 = document.getElementById(printpage1).innerHTML;
var newstr2 = document.getElementById(printpage2).innerHTML;
var oldstr = document.body.innerHTML;
document.body.innerHTML = headstr+newstr1+newstr2+footstr;
window.print();
document.body.innerHTML = oldstr;
location.reload();
return false;
}
</script>
<div style="float: right"><a href="javascript:void(0)" onclick="printPage('pnlMainHeader','div_print');"><img src="<?=$this->baseUrl('/images/icons/small/print.png')?>" title="Print" alt="Print" /></a></div>
<div id="div_print">
<?=$this->form->StaffResponsibility?>
<div class="clear10"></div>
<?=$this->form->Encourager?>
<div class="clear10"></div>
<?=$this->form->Bonus?>
<div class="clear10"></div>
</div>
当我单击打印图标时,我应该使用文本打印 tinymce 编辑器。但在这里我没有得到编辑器及其文本..
问候
乌代