Skip to content

Disable toolbar options in code editor #3010

@swissspidy

Description

@swissspidy

Gutenberg disables the global block inserter when code editing is on:

Screenshot 2019-08-12 at 13 46 57

Since we override that inserter with our custom one, that doesn't work in the Stories editor.

We should align behavior here so that the inserter is disabled as well.

Also, the shortcuts in the toolbar should be disabled and the current block should be de-selected.

Gutenberg's behavior is documented in an e2e test:

https://github.com/WordPress/gutenberg/blob/2f757fa8012edb5cd684a26adef9cb4e8c2158db/packages/e2e-tests/specs/editor-modes.test.js#L88-L118

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions