CKeditor 内の doc ファイルの内容を表示する必要があります。doc ファイルの内容を読み取り、それを 1 行ずつ配列に渡します。
$rs = fopen("text.doc", "r");
while ($line = fgets($rs, 1024)) {
$this->data[] = $line . "<BR>";
}
次に、CKeditor のインスタンスを作成します。
include_once("ckeditor/ckeditor.php");
$CKeditor = new CKeditor();
$CKeditor->basePath = '/ckeditor/';
foreach ($this->data as $value) {
//what should I write here
}
$CKeditor->editor('editor1');
CKeditor は現在動作しており、私の Web ページに表示されますが、コンテンツがありません。配列の内容をエディターに渡すには、foreach の中で何をすればよいですか? 助けてください =(