Home > Blockchain >  how to get input value from summornote text Editor
how to get input value from summornote text Editor

Time:07-06

enter image description here

//html code //<div id="txtDescription" //title="Description Reuired">

// jquery code for get data i use $('#txtDescription').val() to access value But not getting.

CodePudding user response:

I think you need to $("#txtDescription").code() or $("#txtDescription").summernote('code') either of this might help you solve your problem.

please refer Here

for further info.

CodePudding user response:

div elements don't have value. input elements have it. In case of div you might use

document.getElementById("txtDescription").innerHTML 

or

document.getElementById("txtDescription").innerText

CodePudding user response:

Remember to use this when the page is loaded, or in an onl oad event.

 document.querySelector('#txtDescription').innerHTML

   or

 document.querySelector('#txtDescription').innerText
  • Related