1

我正在构建一个在 TinyMCE 弹出窗口中有一个短代码管理员的 WP 插件。每当我完成时,它都会正确插入所有内容,但每次都会添加一个新行。

我的脚本与此非常相似:http: //pastebin.com/RVXfrQL9

tinyMCEPopup.execCommand('mceReplaceContent', false, output);

4

2 回答 2

2

你是说autop吗??

尝试 -

remove_filter( 'the_content', 'wpautop' );
于 2012-07-25T15:19:35.010 回答
1

我将引用的行更改为:

myeditorName.selection.setContent(output);

它有效!

于 2012-07-25T15:18:01.357 回答