MS Word provides a quick insert table drop-down to insert tables into the document. This sample shows how to replace the insert table button with such a table insert drop-down.

MVC: Replace the ribbon table menu with a quick insert table drop-down

The replacement and the new drop down button is done using Javascript and can be found in the GitHub repository. In order to insert the specific table, a controller method is called using Javascript:


The controller method creates a new ServerTextControl instance to insert the specified table. The document is returned to the client and inserted at the current input position using the Javascript method loadSelection.


Download the sample from GitHub and test it on your own.