I want to add WordPress editor dynamically using jquery in my custom plugin as follow:
<?php
$content = '';
$editor_id = 'mycustomeditor';
?>
$('#container').append('<?php wp_editor( $content, $editor_id );?>');
I am getting error:
SyntaxError: missing ) after argument list
...-active"><link rel='stylesheet' id='editor-buttons-css' href='http://localhost
I have also tried bellow code(here I have replaced single quotes to double quotes):
<?php
$content = '';
$editor_id = 'mycustomeditor';
?>
$('#container').append("<?php wp_editor( $content, $editor_id );?>");
I am getting error:
SyntaxError: missing ) after argument list $('#container').append("<div id="wp-mycustomeditor-wrap" class="wp-core-ui wp-ed...
If you have any solution please let me know.
Thanks in advance