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

148
Views
How to move 1st textarea content to 2nd textarea on button click P(paragraph)?

How to move 1st textarea content to 2nd textarea on button click P(paragraph). on button click p it should add as paragraph in 2nd textarea. How to achieve this in javascript or jquery? How to create custom texteditor with inline edit and delete button, here the inline edit is for 2nd textarea content.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

$('#paragraph').on('click', function() {
        var first_para_text = $('#first_textarea').val();
    $('#second_textarea').val(first_para_text);
    $('#second_textarea').prop('disabled', true);
});

$('#edit').on('click', function() {
        $('#second_textarea').prop('disabled', false);
});

$('#reset').on('click', function() {
        $('#second_textarea').val('');
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<div class="col-md-12">
    <div class="col-md-6">
      <label>first text area</label>
      <textarea id="first_textarea"></textarea>
    </div>
    <div class="col-md-6">
      <label>second text area</label>
      <textarea id="second_textarea" disabled></textarea>
      <button id="edit">
      Edit
      </button>
      <button id="reset">
      Reset
      </button>
    </div>
    <hr>
    <button id="paragraph">
      Transfer Text
    </button>
</div>

about 4 years ago · Juan Pablo Isaza Report
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!