[英]How to get my formatted content from tinyMCE using javascript?
我已經安裝了TinyMCE,當我的表單以傳統方式發布(進入某些php頁面)時,這不是問題,原因是我可以通過throug stripslashes()函數或類似的函數傳遞變量。
不幸的是,我的表單之一是通過jquery $ .ajax模塊傳遞的-不可能進行任何PHP操作。 有沒有辦法通過javascript傳遞完整格式的tinyMCE輸出,因為現在它看不到我已經完成的任何格式化。
根據以下答案: https : //stackoverflow.com/a/6541822/349012可能:
// Get the HTML contents of the currently active editor
tinyMCE.activeEditor.getContent();
// Get the raw contents of the currently active editor
tinyMCE.activeEditor.getContent({format : 'raw'});
// Get content of a specific editor:
tinyMCE.get('content id').getContent()
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.