DevExtreme HTML/Markdown Editor allows users to create and manage tables. This demo illustrates table resize support and table management with the toolbar, context menu, and in code.
"insertTable" / "deleteTable"
Manage a table.
"insertRowAbove" / "insertRowBelow" / "deleteRow"
"insertColumnLeft" / "insertColumnRight" / "deleteColumn"
"tableProperties" / "cellProperties"
Open a pop-up window with table or cell customization options.
To manage table layouts with the context menu, set the tableContextMenu.enabled property to true. In this demo, you can click the Enable Table Context Menu check box under the HtmlEditor to enable or disable this property. When it is enabled, right-click a table cell to open the context menu.
The context menu cannot be used to create new tables. The menu is only available within table boundaries. If you want users to create tables, add an "insertTable" item to the toolbar.
If you need to customize menu commands, override the tableContextMenu.items array. Refer to its description for a code example.
You can perform table-related actions in code. Use the getModules method to access the Table module. This module contains methods with names that match toolbar item names listed above. Refer to the following topic for the complete method list and code examples: DevExtreme Quill modules: Table.
You can also set the tableResizing.minColumnWidth and tableResizing.minRowHeight properties to specify minimum column width and row height. If you do not set these properties, width and height are determined by cell content. This demo illustrates the latter behavior (when you reduce column width or row height to small values).