I am developing a theme where I would like to have a front-end area, but when I
try to include the wp_editor()
in the page template I am getting this result:
P.S.
The wordpress editor works fine in the dashboard.
Pietro
I am developing a theme where I would like to have a front-end area, but when I
try to include the wp_editor()
in the page template I am getting this result:
P.S.
The wordpress editor works fine in the dashboard.
Pietro
Comments are closed.
You need to first define the
$settings
and the$editor_id
and the$content
variables. Then you can callwp_editor()
.Something like this should work for you:
Remember, variables have to be defined before you can use them.
Wild guess, are you using
_
(underscore) in your editor ID? If yes, try removing them and use only lowercase letters.. Something likethisismyeditorid
.From the Codex..
To display it in a template, use this:
Or you can Display an empty editor on its own using the default settings:
Documentation: https://codex.wordpress.org/Function_Reference/wp_editor
For those who can instantiate the editor but don’t get the textarea updated on submitting the form sometimes there is incompatibility issues.
In this case you can trigger the save method before posting. Here is an example using jQuery: