{this.renderTitleBar()}
{!this.state.popoutWindow && this.renderTabs()}
- {!this.state.popoutWindow && this.renderRibbon(imageEditPlugin)}
+ {!this.state.popoutWindow && this.renderRibbon(this.imageEditPlugin)}
{this.state.popoutWindow
- ? this.renderPopout(imageEditPlugin)
- : this.renderMainPane(imageEditPlugin)}
+ ? this.renderPopout(this.imageEditPlugin)
+ : this.renderMainPane(this.imageEditPlugin)}
);
@@ -237,6 +236,9 @@ export class MainPane extends React.Component<{}, MainPaneState> {
resetEditorPlugin(pluginState: OptionState) {
this.updateContentPlugin.update();
+ this.imageEditPlugin = new ImageEditPlugin({
+ disableSideResize: pluginState.disableSideResize,
+ });
this.setState({
initState: pluginState,
});
@@ -553,7 +555,7 @@ export class MainPane extends React.Component<{}, MainPaneState> {
pluginList.tableEdit && new TableEditPlugin(),
pluginList.watermark && new WatermarkPlugin(watermarkText),
pluginList.markdown && new MarkdownPlugin(markdownOptions),
- imageEditPlugin,
+ pluginList.imageEditPlugin && imageEditPlugin,
pluginList.emoji && createEmojiPlugin(),
pluginList.pasteOption && createPasteOptionPlugin(),
pluginList.sampleEntity && new SampleEntityPlugin(),
diff --git a/demo/scripts/controlsV2/sidePane/editorOptions/EditorOptionsPlugin.ts b/demo/scripts/controlsV2/sidePane/editorOptions/EditorOptionsPlugin.ts
index 83b03db04669..a2a55a701ac2 100644
--- a/demo/scripts/controlsV2/sidePane/editorOptions/EditorOptionsPlugin.ts
+++ b/demo/scripts/controlsV2/sidePane/editorOptions/EditorOptionsPlugin.ts
@@ -72,6 +72,7 @@ const initialState: OptionState = {
experimentalFeatures: new Set