-
Notifications
You must be signed in to change notification settings - Fork 382
Closed
Labels
EnhancementNew feature or improvement of an existing oneNew feature or improvement of an existing oneIntegration: Gutenberg
Milestone
Description
Feature description
The AMP Stories editor is built on top of the Gutenberg block editor, which has a feature to switch between visual editing and the underlying code representing the blocks.
Other than in the regular post editor, this code view is not something that is of use in the stories editor.
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
- Access to the code editor via the "More tools & options" in top right corner should be prevented, i.e. it should not be visible
- The keyboard shortcut should not work either
- Access to the code editor for an individual block via the block toolbar should be prevented as well
Implementation brief
\AMP_Story_Post_Type::filter_block_editor_settingsshould be amended to disablecodeEditingEnabled.richEditingEnabledshould be alwaystruein that case.
(Documentation)- All parts of code related to the code editor should be removed as they are no longer needed.
QA testing instructions
- Create a new story
- Edit text block
- Verify: In the "More tools" (three dots) menu in the block toolbar, there should be no "Edit as HTML" option visible
- Click on "More tools & options" in top right corner
- Verify: there should be no "Code editor" menu item in the list
Demo
Changelog entry
- Disabled access to code editor
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
EnhancementNew feature or improvement of an existing oneNew feature or improvement of an existing oneIntegration: Gutenberg