diff --git a/packages/edit-post/src/editor.native.js b/packages/edit-post/src/editor.native.js index 633e870528a0f7..5203ff5edcea8b 100644 --- a/packages/edit-post/src/editor.native.js +++ b/packages/edit-post/src/editor.native.js @@ -43,9 +43,7 @@ class Editor extends Component { hasFixedToolbar, focusMode, hiddenBlockTypes, - blockTypes, - colors, - gradients + blockTypes ) { settings = { ...settings, @@ -75,14 +73,6 @@ class Editor extends Component { ); } - if ( colors !== undefined ) { - settings.colors = colors; - } - - if ( gradients !== undefined ) { - settings.gradients = gradients; - } - return settings; } @@ -124,8 +114,6 @@ class Editor extends Component { post, postId, postType, - colors, - gradients, initialHtml, editorMode, ...props @@ -136,9 +124,7 @@ class Editor extends Component { hasFixedToolbar, focusMode, hiddenBlockTypes, - blockTypes, - colors, - gradients + blockTypes ); const normalizedPost = post || { diff --git a/packages/editor/src/components/provider/index.native.js b/packages/editor/src/components/provider/index.native.js index 786f20c4ec065d..858d772d62c55a 100644 --- a/packages/editor/src/components/provider/index.native.js +++ b/packages/editor/src/components/provider/index.native.js @@ -73,9 +73,14 @@ class NativeEditorProvider extends Component { } componentDidMount() { - const { capabilities } = this.props; + const { capabilities, colors, gradients } = this.props; - this.props.updateSettings( capabilities ); + this.props.updateSettings( { + ...capabilities, + // Set theme colors for the editor + ...( colors ? { colors } : {} ), + ...( gradients ? { gradients } : {} ), + } ); this.subscriptionParentGetHtml = subscribeParentGetHtml( () => { this.serializeToNativeAction(); diff --git a/packages/react-native-editor/CHANGELOG.md b/packages/react-native-editor/CHANGELOG.md index ff8771e286fb33..23f13ce09b25a4 100644 --- a/packages/react-native-editor/CHANGELOG.md +++ b/packages/react-native-editor/CHANGELOG.md @@ -11,8 +11,9 @@ For each user feature we should also add a importance categorization label to i ## Unreleased -* [***] Adding support for selecting different unit of value in Cover and Columns blocks -* [**] Button block - Add link picker to the block settings +* [***] Adding support for selecting different unit of value in Cover and Columns blocks [#26161] +* [**] Button block - Add link picker to the block settingsĀ [#26206] +* [*] Fix theme colors syncing with the editor [#26821] ## 1.41.0