Summernote: set focus after initialization

lsouza picture lsouza · Oct 24, 2014 · Viewed 13.1k times · Source

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?

Answer

ice picture ice · Aug 24, 2015
$('.summernote').summernote('focus')

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