我想在我的自定义插件中使用jquery动态添加WordPress编辑器,如下所示:
<?php
$content = '';
$editor_id = 'mycustomeditor';
?>
$('#container').append('<?php wp_editor( $content, $editor_id );?>');
Run Code Online (Sandbox Code Playgroud)
我收到错误:
参数列表后面的SyntaxError:missing)
Run Code Online (Sandbox Code Playgroud)...-active"><link rel='stylesheet' id='editor-buttons-css' href='http://localhost
我也尝试过波纹管代码(这里我用单引号代替双引号):
<?php
$content = '';
$editor_id = 'mycustomeditor';
?>
$('#container').append("<?php wp_editor( $content, $editor_id );?>");
Run Code Online (Sandbox Code Playgroud)
我收到错误:
Run Code Online (Sandbox Code Playgroud)SyntaxError: missing ) after argument list $('#container').append("<div id="wp-mycustomeditor-wrap" class="wp-core-ui wp-ed...
如果您有任何解决方案,请告诉我.
提前致谢