admin管理员组文章数量:1327127
I'm trying to implement WordPress Gutenberg editor outside of WordPress itself. Everything is working fine except having old classic block support and that requires window.wp.oldEditor
to be set.
If you take a look at devtools console on post editing pages, window.wp.oldEditor
is initiated with this:
How can I initiate this variable by myself, out of the WordPress environment?
I'm trying to implement WordPress Gutenberg editor outside of WordPress itself. Everything is working fine except having old classic block support and that requires window.wp.oldEditor
to be set.
If you take a look at devtools console on post editing pages, window.wp.oldEditor
is initiated with this:
How can I initiate this variable by myself, out of the WordPress environment?
Share Improve this question asked Aug 9, 2020 at 23:16 Amirreza NasiriAmirreza Nasiri 1115 bronze badges1 Answer
Reset to default 0Ah ... Got it. It's not related to Gutenberg editor but WordPress core itself:
window.wp.editor
is being initiated here with those methods:
https://github/WordPress/wordpress-develop/blob/9ed92faaca92f66ec9e2979c9d896ddab3e4e993/src/js/_enqueues/wp/editor/base.js
And then, window.wp.oldEditor = window.wp.editor
:
https://github/WordPress/wordpress-develop/blob/5868743f1f2b05c93642c9eebf89cb7f6610d6df/src/wp-includes/script-loader.php#L369
本文标签: How windowwpoldEditor is being set in the editor
版权声明:本文标题:How `window.wp.oldEditor` is being set in the editor? 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742201148a2431982.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论