Skip to content

Commit

Permalink
Pick only the block editor settings from the settings object
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowriad authored and aduth committed Feb 28, 2019
1 parent 94715ed commit d6a3b56
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions packages/editor/src/components/provider/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* External dependencies
*/
import { map } from 'lodash';
import { map, pick } from 'lodash';
import memize from 'memize';

/**
Expand Down Expand Up @@ -53,7 +53,22 @@ class EditorProvider extends Component {

getBlockEditorSettings( settings, meta, onMetaChange, reusableBlocks ) {
return {
...settings,
...pick( settings, [
'alignWide',
'colors',
'disableCustomColors',
'fontSizes',
'disableCustomFontSizes',
'imageSizes',
'maxWidth',
'blockTypes',
'hasFixedToolbar',
'focusMode',
'styles',
'isRTL',
'bodyPlaceholder',
'titlePlaceholder',
] ),
__experimentalMetaSource: {
value: meta,
onChange: onMetaChange,
Expand Down

0 comments on commit d6a3b56

Please sign in to comment.