JavaScript How to add button inside textarea using Javascript? button inside textarea bootstrap,button inside textarea html,button inside

My client wants me to create a textarea inside where there has to be a button like the below picture:

This is sample

Into the above pictue please follow into the right side of the picture where you can see blue color braces which is the button.

This has to be work like this 2nd picture on-click (like drop down):

enter image description here

Into the 2nd pictue we can see that upon clicking on the braces button the list has opened and clicking on an option from the list is writing on the Textarea. But this whole thing should work in client side i.e. using Javascript or Jquery in which I'm quite new at. So, I could not start on this. I need your wise suggestion on the above regarding how may I achieve the following meanwhile I'm also doing my research if I get to know anything then I will update my question or answer my question for other. Thanks in advance.

Answer:1

To achieve this you can place both the textarea and button within the same div which has position: relative set on it. You can then make the button position: absolute and put it in the top right. Something like this:

.textarea-container {
  position: relative;
}
.textarea-container textarea {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
}
.textarea-container button {
  position: absolute;
  top: 0;
  right: 0;
}
<div class="textarea-container">
  <textarea name="foo">Some content here...</textarea>
  <button>Menu</button>
</div>
Answer:2

How can i add class to single li element using onClick? At the moment when i click on whatever li, all div's are getting item-active class when state is changed. I do have index from mapped array, ...

How can i add class to single li element using onClick? At the moment when i click on whatever li, all div's are getting item-active class when state is changed. I do have index from mapped array, ...

I have multiple pages in my Angular app that the user can change quite a bit, i.e. open tabs and pills, modals, etc. Let's say, for example, they open a modal and then click a link in that modal which ...

I have multiple pages in my Angular app that the user can change quite a bit, i.e. open tabs and pills, modals, etc. Let's say, for example, they open a modal and then click a link in that modal which ...

I am generating random numbers and appending with the previous variable and trying to get the value of images. but also the random number only generated. How can I do this ? Here's my code var img1 =...

I am generating random numbers and appending with the previous variable and trying to get the value of images. but also the random number only generated. How can I do this ? Here's my code var img1 =...

  1. generate random image
  2. generate random image python
  3. generate random image javascript
  4. generate random image url
  5. generate random image name php
  6. generate random image matlab
  7. generate random image java
  8. generate random image php
  9. generate random image using base64 string
  10. generate random image online
  11. generate random image numpy
  12. generate random image c#
  13. generate random image linux
  14. generate random image node
  15. opencv generate random image
  16. imagemagick generate random image
  17. generate random background image
  18. opencv generate random image python
  19. swift generate random image
  20. js generate random image

I continuously run into this issue when designing sites that have scroll-based events (animation, parallax, etc etc etc). Is there any reliable to test if a browser halts repainting on scroll, so I ...

I continuously run into this issue when designing sites that have scroll-based events (animation, parallax, etc etc etc). Is there any reliable to test if a browser halts repainting on scroll, so I ...