Autocompleter (slash command) doesn't respect allowed_block_types #6070
Labels
[Feature] Inserter
The main way to insert blocks using the + button in the editing interface
[Type] Bug
An existing feature does not function as intended
Milestone
Issue Overview
The blocks autocompleter (what you get when you type a /) doesn't respect the
allowed_block_types
filter.Steps to Reproduce (for bugs)
lib/load.php
:Expected Behavior
Only the Paragraph, Image and Quote bugs should appear in the dropdown.
Shared blocks should be properly filtered when using
allowed_block_types
filter.Current Behavior
All blocks should appear in the dropdown.
If you limit the blocks which can be shown using the allowed_block_types filter then shared blocks do not appear in the 'Shared' block inserter tab.
Possible Solution
The
getInserterItems
selector will correctly filter out non-allowed blocks if you pass the editor setting as its second argument.Screenshots / Video
Related Issues and/or PRs
#4225 #3791 — both of these would also be fixed by the above suggested solution.
The text was updated successfully, but these errors were encountered: