user19491662
user19491662

Reputation:

Set values in summer note text editor using JavaScript

I want to set dynamic values in the summer note text editor using JavaScript/jQuery. I have tried to set value with both but nothing works for me.

document.getElementById('summernote').innerHTML = data.message;


$('.summernote').summernote('code', data.message);

Can anyone help me with how I can add values in summer note using JavaScript/jQuery?

Upvotes: 0

Views: 2253

Answers (1)

user19491662
user19491662

Reputation:

I got my Answer. I am fetching with summernote class not with ID.

$("#summernote").summernote('code', data.message);

Upvotes: 0

Related Questions