次のように、カスタム プラグインで jquery を使用して WordPress エディターを動的に追加したいと考えています。
<?php
$content = '';
$editor_id = 'mycustomeditor';
?>
$('#container').append('<?php wp_editor( $content, $editor_id );?>');
エラーが発生しています:
SyntaxError: 引数リストの後に ) がありません
...-active"><link rel='stylesheet' id='editor-buttons-css' href='http://localhost
私は以下のコードも試しました(ここでは一重引用符を二重引用符に置き換えました):
<?php
$content = '';
$editor_id = 'mycustomeditor';
?>
$('#container').append("<?php wp_editor( $content, $editor_id );?>");
エラーが発生しています:
SyntaxError: missing ) after argument list $('#container').append("<div id="wp-mycustomeditor-wrap" class="wp-core-ui wp-ed...
何か解決策があれば教えてください。
前もって感謝します