Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

154
Views
I am using WYSIWYG text editor I need to get the value of a textarea in jQuery. I have tried without WYSIWYG then I abled to get the value

I need to get the value of the textarea but I cannot get the value using the WYSIWYG text editor. I got the value without WYSIWYG text editor but I need the value in WYSIWYG text area. How can I fix this?


 <!--Jquery CDN-->
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<!--WYSIWYG Texteditor CDN-->
    <script src="https://cdn.tiny.cloud/1/142v261jlrz3ntk7kklzqfs5hzmv2lhvw3ln73zsq66ln2pr/tinymce/5/tinymce.min.js" referrerpolicy="origin"></script>

<form th:action="@{/answerSave}" method="post"th:object="${answer}">

<textarea id="comment" name="comment" th:field="*{fullAnswer}"> </textarea><br>
<button id="previewAnswers" class="btn btn-success" onclick="answerQuestionMappping()">Submit Answer</button> 
</form>

This is my javascript part


 function answerQuestionMappping(){

   var answerComment = $("#comment").val();

   console.log(answerComment);
   alert(answerComment);
 
 }
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!