2

I have done some bit of script of trying to wrap div elements with textarea. This will enable be log the values and submit them to the database. So far when I try to wrap up everything with texarea its displays HTML tags instead of display readable elements.

with only divs, its display readable elements

 <div  class="editable w-50" contenteditable="true" id="fields">
        <div class="row text-center">
                <div class="col">
                    <label contenteditable="false" class="bg-info rounded shadow-lg text-white w-50 text-center font-weight-bolder ">Keyword</label>
                    <ul>
                        <li >Ex. air conditioning</li>
                    </ul>
                </div>
                 <div class="col">
                    <label contenteditable="false" class="bg-info rounded shadow-lg text-white w-50 text-center font-weight-bolder ">Density</label>

                    <ul>
                        <li>i.e Density</li>
                    </ul>
                </div>
        </div>

    </div>

Tried to do this with textarea

<textarea class="form-control" name="conent" >
    <div  class="editable w-50" contenteditable="true" id="fields" >
        <div class="row text-center">
                <div class="col">
                    <label contenteditable="false" class="bg-info rounded shadow-lg text-white w-50 text-center font-weight-bolder ">Keyword</label>
                    <ul>
                        <li >Ex. air conditioning</li>
                    </ul>
                </div>
                 <div class="col">
                    <label contenteditable="false" class="bg-info rounded shadow-lg text-white w-50 text-center font-weight-bolder ">Density</label>

                    <ul>
                        <li>i.e Density</li>
                    </ul>
                </div>
        </div>

    </div>
    </textarea>

Its fails and only display HTML tags.

Kindly help to solve the problem

Dominic
  • 341
  • 4
  • 15

0 Answers0