[問題] CKeditor圖片上傳後吃掉文字
大家好
小弟最近在裝ckeditor遇到一些問題,
我有弄了一個多圖上傳,可以把圖片馬上顯示在ckeditor裡面,
但是遇到一個問題,我上傳的方式是用ajax把ckeditor裡的content
傳到一個處理檔,
<textarea id='content' name='content'><textarea>
<script>CKEDITOR.replace( 'article_content' );</script>
這是我的ajax程式碼
$.ajax({
url:'upload_Protext.php',
cache:false,
dataType:'html',
type:'POST',
data:$("#CodeForm").serialize(),
beforeSend:function(){
$('#UpLoadImg').show();
},
success: function(response) {
$('#UpLoadImg').hide();
/*$('#htmlArea').hide();*/
$('#htmlArea').html(response);
}
});
但是我在開發工具上發現我form的表單有傳出去,唯獨content,也就是
CKeditor 取代的部分沒有傳值,所以我圖片傳上去之後我之前打的內容
也會消失,但沒有用ajax時,我的content是可以正常被後台吃下的,
簡單來說,就是當使用到ajax,我的content就會失靈,傳了空的值,
但其他欄位卻都正常,我想應該是被 ckeditor影響,請問有人有遇到類似
問題嗎@@?
抱歉小弟描述得有點爛 看不懂得點請見諒我可以再更清楚描述
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 36.228.47.42
※ 文章網址: https://www.ptt.cc/bbs/Web_Design/M.1444804994.A.9B6.html
推
10/14 15:02, , 1F
10/14 15:02, 1F
推
10/14 15:30, , 2F
10/14 15:30, 2F
→
10/14 15:31, , 3F
10/14 15:31, 3F
→
10/14 15:31, , 4F
10/14 15:31, 4F
→
10/14 15:31, , 5F
10/14 15:31, 5F
→
10/14 15:32, , 6F
10/14 15:32, 6F
推
10/14 16:16, , 7F
10/14 16:16, 7F
→
10/14 16:18, , 8F
10/14 16:18, 8F
→
10/14 21:43, , 9F
10/14 21:43, 9F
→
10/14 21:46, , 10F
10/14 21:46, 10F
→
10/14 21:46, , 11F
10/14 21:46, 11F
→
10/14 21:49, , 12F
10/14 21:49, 12F
推
10/14 22:03, , 13F
10/14 22:03, 13F
→
10/14 22:04, , 14F
10/14 22:04, 14F
→
10/14 22:04, , 15F
10/14 22:04, 15F
Web_Design 近期熱門文章
PTT數位生活區 即時熱門文章
50
75