原文:
6 樓hsboy(PHP it!)回復于 2006-03-05 18:44:07 得分60
假設
1、你要用fckeditor編輯的內容通過$smarty->assign('content', $content)傳遞到模板
2、fckeditor編輯器放在當前被調用的php程序所在目錄(注意不是模板文件所在的目錄)的fckeditor目錄下
則模板只需這樣寫即可:
復制代碼代碼如下:
<script type="text/javascript" src="fckeditor/fckeditor.js"></script>
<form method="POST">
<script type="text/javascript">
var oFCKeditor = new FCKeditor( 'content' ) ;
oFCKeditor.BasePath = "fckeditor/" ;
oFCKeditor.Height = 300 ;
oFCKeditor.Value = '{ $content }' ;
oFCKeditor.Create() ;
</script>
</form>
自己仔細研究一下很容易解決你這個問題的。這并不是一個很困難的任務。其實這里很多都是菜鳥級別的。