CustomToolbarItemModel as dropdownlist

we are using react.js DocumentEditorContainerComponent.How can we add CustomToolbarItemModel as dropdownlist

like this its not working

let drop1: CustomToolbarItemModel = new DropDownButton({
items: [
{ text: 'key1', id: '1' },
{ text: 'key2', id: '2' },
],
});

let toolbarItems: (CustomToolbarItemModel | ToolbarItem)[] = [
drop1,
'New',
'Open',
'Separator',
'FormFields',
'UpdateFields',
];

return (
<>
<DocumentEditorContainerComponent
ref={docEditorRef}
id="container"
enableToolbar={true}
locale="tr"
height="600px"
toolbarItems={toolbarItems}
/>
);


Attachment: index_307048de.7z


3 Replies

AE Ajithamarlin Edward Syncfusion Team July 28, 2022 05:00 AM UTC

Hi Umut,


Currently we are working on this. We will share you a simple sample by July 29,2022.


Regards,

Ajithamarlin E



AE Ajithamarlin Edward Syncfusion Team August 1, 2022 06:53 AM UTC

Hi Umut,


Currently we are working on this. We will share you a simple sample by August 1,2022.


Regards,

Ajithamarlin E




KM Kavitha Muralitharan Syncfusion Team December 29, 2022 06:48 AM UTC

Umut, We have prepared a simple sample and attached here for your reference. Kindly, refer the sample that we have added the  CustomToolbarItemModel as dropdownlist using react.js in DocumentEditorContainerComponent.


Sample Link: https://stackblitz.com/edit/react-1znoyr-thvrsn?file=index.js,index.html


Loader.
Up arrow icon