import BuildInPluginState , { BuildInPluginProps , UrlPlaceholder } from '../../BuildInPluginState' ; import OptionsPane from './OptionsPane' ; import SidePanePluginImpl from '../SidePanePluginImpl' ; import { getDefaultContentEditFeatures } from 'roosterjs-editor-plugins' ; import { SidePaneElementProps } from '../SidePaneElement' ; const initialState = { pluginList : { hyperlink : true , paste : true , contentEdit : true , watermark : false , imageResize : true , tableResize : true , customReplace : true , pickerPlugin : true , } , contentEditFeatures : getDefaultContentEditFeatures ( ) , defaultFormat : { } , linkTitle : 'Ctrl+Click to follow the link:' + UrlPlaceholder , watermarkText : 'Type content here ...' , showRibbon : true , } ; export default class EditorOptionsPlugin extends SidePanePluginImpl < OptionsPane , BuildInPluginProps > { constructor ( ) { super ( OptionsPane , 'options' , 'Editor Options' ) ; } getBuildInPluginState ( ) { let result ; this . getComponent ( component => ( result = component . getState ( ) ) ) ; return result || initialState ; } getComponentProps ( base ) { return { ... initialState , ... base , } ; } }