Skip to content

Code editor mode only allows template (not content) editing when editing a "Page" with the site editor  #61731

@bacoords

Description

@bacoords

Description

If you jump into the code editor mode while editing a page, you'll only see the template markup. This happens regardless of whether the template preview mode is on or off.

In either case, using the code editor while editing a 'page' should allow you to edit the page not the template.

CC @youknowriad

Step-by-step reproduction instructions

  1. Enter the site editor
  2. Go to pages and select a page like "Sample Page"
  3. Switch to code editor and see the code for the template, not the page
  4. Disable "Template preview" in the inspector controls
  5. Switch to code editor again and see the code for the template, not the page, even though the template isn't even visible

Screenshots, screen recording, code snippet

screenrec.mov

Environment info

  • Gutenberg 18.3.0

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

Metadata

Metadata

Assignees

Labels

[Feature] Site EditorRelated to the overarching Site Editor (formerly "full site editing")[Status] In ProgressTracking issues with work in progress[Type] BugAn existing feature does not function as intended

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions