1

I want to edit content in frontend and backend with the Gutenberg editor in a popup window. I pass the content to the editor with JavaScript, open it, edit the content in Gutenberg and when I close it I pass the content to a variable again.

Now several questions arise:

  • When loading WordPress with a page without page or cpt-page wp.data/wp.block is not loaded. Also not with the plugin "Gutenberg Ramp" with which Gutenberg should always be loaded.

Therefore the question, is there a possibility to load Gutenberg with the hook init?

If so, how do I start Gutenberg proramaticly?

Many thanks for tips

Severin

  • 2
    I built Frontenberg, and tried to do exactly what you're asking. TLDR: Don't. To get it to work I had to heavily lock down the REST API so no saving could happen, and the theme was basically WP Admin styles only. Even then, it still has major issues, such as changing the URL to wp-admin URLs. Making it appear in a popup and actually using it as a frontend editor is a complete nonstarter. What you're asking is non-trivial and a huge task. Avoid this like the plague – Tom J Nowell Mar 25 at 20:34
  • Many thanks @tom-j-nowell i just read your post how frontenberg works yes there are many unknown ones. In my case there would be the simplification that the users are always logged in. This is simpler but still very complex. – Severin Mar 25 at 21:04
  • That your users are logged in helps, but GB just wasn't built for what you want, so unless you're a very experienced React developer who has the time to redo a lot of it every release I wouldn't even attempt it. Frontenberg is more of a kludge, definitely not a production ready thing – Tom J Nowell Mar 26 at 9:37
  • I had hoped that there would be a similar solution to opening the media overview with wp.media(). This case with Gutenberg is not possible because of my skills. I will make a button with link to the edit page. Not very nice but feasible. – Severin Mar 26 at 12:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.