Search code examples
javascriptjquerysummernote

Summernote: set focus after initialization


Summernote gives you the option of giving focus to the editor when you create it, passing this options:

$('#summernote').summernote({
     focus: true
});

But after initialization, it seems you can't give focus to the textarea by clicking a button or similar. I've tried several ways, without success.

Anyone did that?


Solution

  • $('.summernote').summernote('focus')
    

    ps. i want to find an angular way out .. and it works