|
| 1 | +--- |
| 2 | +title: Opening the Table Wizard in Kendo UI Editor Using the exec Command |
| 3 | +description: Learn how to open the Table Wizard dialog in the Kendo UI for jQuery Editor by using the exec command. |
| 4 | +type: how-to |
| 5 | +page_title: How to Open the Table Wizard Dialog in Kendo UI for jQuery Editor |
| 6 | +slug: how-to-open-table-wizard-kendo-ui-editor |
| 7 | +tags: kendo-ui, editor, tablewizard, exec-command |
| 8 | +res_type: kb |
| 9 | +ticketid: 1678934 |
| 10 | +--- |
| 11 | + |
| 12 | +## Description |
| 13 | + |
| 14 | +When working with the [Editor for Progress® Kendo UI®](https://docs.telerik.com/kendo-ui/api/javascript/ui/editor), there might be a need to programmatically open the `Table Wizard` dialog. This is possible by using the `exec` command with a specific argument. This knowledge base article also answers the following questions: |
| 15 | + |
| 16 | +- How to open the Table Wizard dialog in Kendo UI Editor? |
| 17 | +- How to link the Table Wizard opening with a button click in Kendo UI Editor? |
| 18 | +- How to use the `exec` command to open dialogs in Kendo UI Editor? |
| 19 | + |
| 20 | +## Environment |
| 21 | + |
| 22 | +<table> |
| 23 | +<tbody> |
| 24 | +<tr> |
| 25 | +<td>Product</td> |
| 26 | +<td>Editor for Progress® Kendo UI®</td> |
| 27 | +</tr> |
| 28 | +<tr> |
| 29 | +<td>Version</td> |
| 30 | +<td>2025.1.211</td> |
| 31 | +</tr> |
| 32 | +</tbody> |
| 33 | +</table> |
| 34 | + |
| 35 | +## Solution |
| 36 | + |
| 37 | +To open the `Table Wizard` dialog in the Kendo UI Editor, use the `exec` command with the argument `tableWizardInsert`. This command can be tied to a button click event or any other event in your application. |
| 38 | + |
| 39 | +Here's an example of how to achieve this: |
| 40 | + |
| 41 | +```javascript |
| 42 | +$('#editor').data('kendoEditor').exec('tableWizardInsert'); |
| 43 | +``` |
| 44 | + |
| 45 | +This code snippet gets the instance of the Kendo UI Editor and executes the `tableWizardInsert` command, which opens the Table Wizard dialog. |
| 46 | + |
| 47 | +For a practical demonstration, refer to the example below: |
| 48 | + |
| 49 | +```dojo |
| 50 | + <button id='openWizard'>tableWizard</button> |
| 51 | + <textarea id="editor" rows="10" cols="30" style="width:100%; height:840px" aria-label="editor"> |
| 52 | +
|
| 53 | + </textarea> |
| 54 | +
|
| 55 | + <script> |
| 56 | + var editor = $("#editor").kendoEditor({ |
| 57 | + tools: [ |
| 58 | + "tableWizard", |
| 59 | + "tableProperties", |
| 60 | + "tableCellProperties", |
| 61 | + "createTable", |
| 62 | + "addRowAbove", |
| 63 | + "addRowBelow", |
| 64 | + "addColumnLeft", |
| 65 | + "addColumnRight", |
| 66 | + "deleteRow", |
| 67 | + "deleteColumn", |
| 68 | + "mergeCellsHorizontally", |
| 69 | + "mergeCellsVertically", |
| 70 | + "splitCellHorizontally", |
| 71 | + "splitCellVertically", |
| 72 | + "tableAlignLeft", |
| 73 | + "tableAlignCenter", |
| 74 | + "tableAlignRight" |
| 75 | + ] |
| 76 | + }); |
| 77 | +
|
| 78 | + $("#openWizard").click(function(){ |
| 79 | + $('#editor').data('kendoEditor').exec('tableWizardInsert'); |
| 80 | + }) |
| 81 | + </script> |
| 82 | +``` |
| 83 | + |
| 84 | +## See Also |
| 85 | + |
| 86 | +- [Kendo UI Editor Overview](https://docs.telerik.com/kendo-ui/controls/editor/overview) |
| 87 | +- [Kendo UI Editor Exec Command Documentation](https://docs.telerik.com/kendo-ui/api/javascript/ui/editor/methods/exec) |
0 commit comments