2016-07-24 70 views
0

我面臨CKEditor的一個問題,我不知道我在做什麼錯在這裏!如何在ckeditor中保存/編輯?

我保存了一些在我的PHP應用程序中使用CKEditor創建的HTML頁面,並且它得到正確保存。但是當我想編輯內容時,我從DB獲取內容並將其加載到CKEditor中。在這個時候,我以前給出的所有課程/ ID值都消失了。

我正在調用CKEditor使用下面的值。

<textarea name="pageContent" class="form-control" id="editor">'.$rowData->content.'</textarea> 

Value which i saved in the DB

When i load the content in CKEditor

+0

在js和CKeditor配置中進行了一些更多的調試後,我得到了修復。只需要添加config.allowedContent = true;在配置文件中。有關更多信息,請訪問http://docs.ckeditor.com/#!/api/CKEDITOR.config – Ricky

回答

0

在js一些調試和CKEDITOR配置後我得到了修復。只需要添加config.allowedContent = true;在配置文件中。欲瞭解更多信息,請訪問http://docs.ckeditor.com/#!/api/CKEDITOR.config

+0

實際上,您的解決方案不是最推薦的解決方案。除了禁用高級內容過濾器(ACF),您應該[根據需要調整它](http://docs.ckeditor.com/#!/guide/dev_acf-section-automatic-mode-and-allow-additional-tags% 2Fproperties)並允許您允許的其他內容。 –