angular-froala icon indicating copy to clipboard operation
angular-froala copied to clipboard

Unable to fire and respond to editor events

Open AlmogCohen opened this issue 5 years ago • 3 comments

Hi, I've seen a few of these issues already open before but couldn't quite figure out where the issue is or how to solve this. Your help would be much appreciated!

When I set the editor settings in the scope, they all work fine and look as expected (see for example the inlineStyles, buttons and inline toolbar which all work), but no matter what I do I couldn't make the events work... The editor looks fine as you can see here but the events never fire. Do you have any recommendation? Is there anything I'm doing wrong?

No alerts are popping, no console errors... I'm using version 2.6.6 both for angular-froala and froala-wysiwyg-editor.

$ctrl.froalaOptions = {
      toolbarInline: true,
      placeholderText: 'Write your text here...',
      direction: 'auto',
      toolbarButtons: ['inlineStyle'],
      inlineStyles: {
        'Big Red': 'font-size: 20px; color: red;',
        'Small Blue': 'font-size: 14px; color: blue;'
      },
      events: {
        'froalaEditor.initialized': function () {
          alert('on initialized event!')
        },
        'froalaEditor.focus': function (e, editor) {
          alert('on focus event!')
        },
        'froalaEditor.keypress': function (e, editor, keypressEvent) {
          alert('on keypress event!')
        }
      }
    };

AlmogCohen avatar May 14 '19 16:05 AlmogCohen

Anyone monitoring this repo?

AlmogCohen avatar May 20 '19 20:05 AlmogCohen

@AlmogCohen do you think you could make a plunker for it? Thanks in advance.

stefanneculai avatar May 21 '19 13:05 stefanneculai

@AlmogCohen remove the prefix "froalaEditor.". Let me know if this works.

navneetnagpal avatar Jun 26 '19 05:06 navneetnagpal