WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.35k stars 4.13k forks source link

Add export feature to the editor #61807

Open bhubbard opened 4 months ago

bhubbard commented 4 months ago

What problem does this address?

I am working on migrating a DIVI site to Gutenberg. DIVI offers a import/export feature that was a pretty common workflow for the content editors. I'm not sure if an import makes sense, but I can definitely see the use case to have an easy export feature in the editor.

What is your proposed solution?

When the gutenberg editor is open, and a user clicks on options, under the tools they find a new link to export. This will export the one post/page they are currently editing using the standard wordpress export tool. It could just download the xml file on click, or redirect to the export tool page to have more options if needed.

DivyarajChudasama commented 4 months ago

Hi there,

The problem you're addressing is a common workflow for content editors - being able to easily export/import content. While Gutenberg itself doesn't have a built-in import/export feature yet, there are a couple of potential solutions:

  1. Utilize the existing WordPress export/import tools As you mentioned, you could add a link in the Gutenberg editor's options to redirect to the existing WordPress export tool (/wp-admin/export.php). This would allow users to export the current post/page they're editing, along with any other content they select.

    For importing, you could potentially add a similar link to the import tool (/wp-admin/import.php), although this may not be as seamless as an in-editor import.

  2. Develop a Gutenberg-specific export/import solution Alternatively, you could develop a Gutenberg-specific export/import feature as a plugin or as a core Gutenberg enhancement. This would involve creating a custom export format tailored for Gutenberg blocks and implementing import/export functionality within the editor interface itself.

    While more complex, this approach could provide a more streamlined experience for content editors working exclusively with the Gutenberg editor.

Either solution could work, but I'd recommend starting with the existing WordPress export/import tools as a minimal viable solution. This would address the immediate need while providing a familiar experience.