1
我有一個textarea,它是一個Ckeditor,但是我包含了允許我上傳圖像的ckfinder。 我需要將textarea內的所有數據發送到頁面以處理收到的數據。使用CKEditor和CKfinder並將內容保存到數據庫中
其實我無法發送textarea裏面的數據。
<label>Corpo da Instrução de Trabalho</label>
<textarea name="editor1" id="editor1" rows="10" cols="80" placeholder="Escrever o conteúdo da IT aqui...">
</textarea>
<script>
// Replace the <textarea id="editor1"> with a CKEditor
// instance, using default configuration.
// CKEDITOR.replace('editor1');
var editor = CKEDITOR.replace('editor1');
CKFinder.setupCKEditor(editor);
</script>
當我試圖挽救其上接收到數據文件中的數據我做這樣的事:
$myText = $_POST['editor1'];
但它是空的。
我已經完成了你所說的。但是在我的savetextarea.php中,$ _PosT [''editor1']不存在。 –
你的意思是它不會顯示在你的savetextarea.php中?嘗試我發佈在單獨的文件中的示例,它的工作原理。一行一行,並與您的代碼進行比較。檢查是否包含CK庫,並在savetextarea.php上需要顯示ckeditor。你是否在同一頁面提交你的表單?從沒有CKeditor的簡單事情開始。試試簡單的PHP表單,看看你是否有任何輸出。如果你有,那麼你可以移動到ckeditor實現。如果你有完整的例子,通過http://pastebin.com發送給我,並在這裏分享,我會解決它 – Blackcoat77