-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No way to create custom toolbar button #28
Comments
try: - setup: function (editor) {
+ setup: (editor) => { |
The type of function, whether standard or fat arrow, is not the issue. The problem is that the I forked your Stackblitz example to show you what I mean. https://stackblitz.com/edit/ngx-tinymce-uac1n2 config: any = {
height: 250,
...
setup: (editor) => {
editor.ui.registry.addButton('customInsertButton', {
text: 'My Button',
onAction: function (_) {
editor.insertContent(' <strong>It\'s my button!</strong> ');
}
});
}
}; This results in this error: ERROR Is there a way to get this to work? I've looked at your source code and it seems your |
You can try using latest version of tinymce via NgxTinymceModule.forRoot({
baseURL: 'https://cdnjs.cloudflare.com/ajax/libs/tinymce/5.7.1/',
}) |
addMenuButton instead of addButton (in version 5.0.15 of tinymce) |
Is there no way to create a custom toolbar button as described here https://www.tiny.cloud/docs/demo/custom-toolbar-button/?
If I try to add the
setup
function to theconfig
object, theeditor.ui
property is undefined.Is it possible to create a custom toolbar button?
The text was updated successfully, but these errors were encountered: