Studio Developer Manual / Version 2107
Table Of Contents
There are predefined commands for merging and splitting of table cells that can easily be
made available in the richtext toolbar. To do so, use the AddItemsPlugin
as
in the following example and keep in mind the restrictions in this warning.
<editor:RichTextPropertyField> <editor:plugins> <ui:AddItemsPlugin recursive="true"> <ui:items> <!--the mandatory ckEditorValueExpression is set by default in RichTextPropertyField--> <MenuSeparator/> <ui:RichTextMenuItem itemId="{RichTextPropertyField.CELL_MERGE_ITEM_ID}" commandName="{RichTextAction.COMMAND_CELL_MERGE}"/> <ui:RichTextMenuItem itemId="{RichTextPropertyField.CELL_MERGE_RIGHT_ITEM_ID}" commandName="{RichTextAction.COMMAND_CELL_MERGE_RIGHT}"/> <ui:RichTextMenuItem itemId="{RichTextPropertyField.CELL_MERGE_DOWN_ITEM_ID}" commandName="{RichTextAction.COMMAND_CELL_MERGE_DOWN}"/> <ui:RichTextMenuItem itemId="{RichTextPropertyField.CELL_VERTICAL_SPLIT_ITEM_ID}" commandName="{RichTextAction.COMMAND_CELL_VERTICAL_SPLIT}"/> <ui:RichTextMenuItem itemId="{RichTextPropertyField.CELL_HORIZONTAL_SPLIT_ITEM_ID}" commandName="{RichTextAction.COMMAND_CELL_HORIZONTAL_SPLIT}"/> </ui:items> <ui:after> <Component itemId="{RichTextPropertyField.TABLE_REMOVE_ITEM_ID}"/> </ui:after> </ui:AddItemsPlugin> </editor:plugins> </editor:RichTextPropertyField>
Example 7.26. Adding table cell merge and split commands
Please note that the RichTextMenuItem
has a mandatory ckEditorValueExpression
config.
This config can only be omitted here, because the RichTextPropertyField
's menu automatically adds it to all its menu items.