Create 2 different menu items with different template source

Viewed 19

For now I was able to add a new menu item called order with a template source:

            <Editor apiKey='123456' init=
            {{
                selector: 'textarea',  // change this value according to your HTML
                plugins: 'template',
                menu: {
                    file: { title: 'File', items: 'newdocument restoredraft | preview | export print | deleteallconversations' },
                    edit: { title: 'Edit', items: 'undo redo | cut copy paste pastetext | selectall | searchreplace' },
                    view: { title: 'View', items: 'code | visualaid visualchars visualblocks | spellchecker | preview fullscreen | showcomments' },
                    insert: { title: 'Order', items: 'template' },
                    format: { title: 'Format', items: 'bold italic underline strikethrough superscript subscript codeformat | styles blocks fontfamily fontsize align lineheight | forecolor backcolor | language | removeformat' }
                },
                templates: order // where order is my JSON file contains the template definition,
            }} />

now I would like to add a new menu item called customer on which the user will choose to use a template which is completely different from the order template.

How can I achieve this? I just see 1 attribute called templates in order to specify the template.

0 Answers
Related