My requirement is to add the custom button/menu to add the form elements with in TinyMCE Angular editor.
Here is the template code i have used. My requirement is to add the new button in the toolbar or anywhere within editor.
`<editor
apiKey="2zr2n................................g26r3pdhfruj"
formControlName="body"
[init]="{
plugins: 'advlist autolink link image lists',
toolbar: 'paste undo redo',
}"
></editor>`
This is the code i have tried to use in ts file.
`OnInit(editor) {
editor.ui.registry.addButton('test', {
text: 'My button',
icon: false,
onclick: function () {
alert('test')
}
})
}`