0

我已经安装了 TinyMCE,当我的表单以传统方式发布(到某些 php 页面)时,这不是问题,因为我可以通过变量 stripslashes() 函数或类似的东西传递。

不幸的是,我的一种形式是通过 jquery $.ajax 模块传递的——并且不可能进行任何 PHP 操作。有没有办法通过javascript传递完整格式的tinyMCE输出,因为现在它看不到我所做的任何格式。

4

1 回答 1

3

根据这个答案: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()

另一个参考:https ://stackoverflow.com/a/11112221/349012

于 2012-09-18T10:24:42.010 回答