I have setup a div for the summernote to alter text pulled from a database.
<div id="summernote" class="form-control"><?php echo $laws['content']; ?></div>
$(document).ready(function() {
$('#summernote').summernote({
height: 300,
});
});
directly following the div I have a text area with an ID.
<textarea id="lawsContent"></textarea>
I want the content of the textarea to change as I type in the summernote div. Just like what is happening while I am typing this question.
I think it is better to handle the onChange event.
v0.7.0
v0.6.5
As of this version, callback only works with camel case string.
Use This Example:
This worked for me
Using the summernote API
I came up with this solution:
Inspired by @user3367639, this is a more generic way to do it
And with this method :
You could do in your JS controller something like this to get the text value of your textarea
Hope this will help