Doc Editor toolbar - custom toolbar items mixed with standard

Hello

In a SfDocumentEditorContainer if I have a toolbar defined like this:



and I want to add some (but not all) of the inbuilt toolbar items (i.e. table), how to I do this? 

Many thanks

1 Reply 1 reply marked as answer

SM Suriya Murugan Syncfusion Team April 20, 2021 09:08 AM UTC

Hi Richard, 

Syncfusion Greetings! 

You can use existing toolbar items in Documenteditor by referring below code snippet: 

<SfDocumentEditorContainer @ref="container" EnableToolbar=true ToolbarItems="@Items"> 
   
</SfDocumentEditorContainer> 
 
@code { 
 
    SfDocumentEditorContainer container; 
 
    List<Object> Items = new List<Object> { new CustomToolbarItemModel() { Id = "save", Text = "Save" }, "New", "Undo", "Redo", "Comments", "Image", "Table", "Hyperlink", "Bookmark", "TableOfContents", "Header", "Footer", "PageSetup", "PageNumber", "Break", "Find", "LocalClipboard", "RestrictEditing" }; 
 
} 

Note: We have added custom save button and existing toolbar items, you can use it based on your requirement. 

Please let us know if you have any questions. 

Regards, 
Suriya M. 


Marked as answer
Loader.
Up arrow icon