tinymce-vue
tinymce-vue copied to clipboard
Dynamically generate custom menu items
What is the current behavior?
Currently we have created a function inside fetch
. Which should generate a array of objects.
Please provide the steps to reproduce and if possible a minimal demo of the problem https://codesandbox.io/s/tinymce-vue-y504od
Click on the button "My button" and check console. Now I get the following errors:
Unknown item in general menu
{value: "generated-menu-item_7770287682291661522230581", type: "menuItem", text: "[customer_firstname]"}
Unknown item in general menu
{value: "generated-menu-item_1540549822281661522230581", type: "menuItem", text: "[customer_lastname]"}
What is the expected behavior? In my opinion it should provide me the list which is created from the function CreateShortcodes.
Which versions of TinyMCE, and which browser / OS are affected by this issue? Did this work in previous versions of TinyMCE or tinymce-vue? 6.0.2
Ref: INT-2999
Any solution guys? Can't go further with the projects.
@nhatimme your problem here is that you have a typo... if you change menuItem
to menuitem
with all lowercase it should fix the issue. You'll see it uses a lowercased version in the docs for the menubutton as well, see https://www.tiny.cloud/docs/tinymce/6/custom-menu-toolbar-button/
Closing as resolved