import { useState } from 'react';
import { DocumentEditorContainerComponent, Toolbar } from '@syncfusion/ej2-react-documenteditor';
import { ButtonComponent } from '@syncfusion/ej2-react-buttons';
DocumentEditorContainerComponent.Inject(Toolbar);
export default function MyEditor(props) {
const [enabled, setEnabled] = useState(false);
let container: DocumentEditorContainerComponent;
return (<>
{ setEnabled(!enabled) }} >{enabled ? 'Hide' : 'Show'
ref={(scope) => { container = scope; }}
id="container"
style={{ height: "590px" }}
enableToolbar={enabled} />
);
}
Shows 2 toolbars on show.
Hide and show again then 3 and so and so on
Version: 20.4.38 & 20.4.48