Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

155
Visualizações
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
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda