Inputs

Inputs fields

by Imri Paloja

HTML

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.1/normalize.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/skeleton/2.0.4/skeleton.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<div class="container">

<h2>Buttons</h2>

  <div class="button">
    button
  </div>

<h2>Inputs</h2>

  <div class="input" contenteditable="true" placeholder="placeholder">
    
  </div>


<h2>textarea</h2>

  <div class="textarea" id="textarea" contenteditable="true" placeholder="placeholder" onchange="strip()">
    <p><strong>Lorem Ipsum</strong> is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
  </div>

</div>

CSS

html,
body {
  color: #454545;
}

.container {
  margin-top: 1%;
}

.input {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;


  height: 38px;
  padding: 6px 10px;
  background-color: #fff;
  border: 1px solid #D1D1D1;
  border-radius: 4px;
  box-shadow: none;
  box-sizing: border-box;

  font-family: inherit;
  font-size: 100%;
  line-height: 1.15;
  margin: 0;
  margin-bottom: 0px;
  margin-bottom: 1.5rem;
  overflow: visible;

}


.input:active {
  border: 5px solid;
  outline: 5px solid;
}

[contenteditable="true"]:focus-visible {
  outline: 2px solid #CCCCCC;
}


.textarea {
  background: #EEEEEE;
  border: 1px solid #CCCCCC;

  max-width: 100%;

  width: auth;

  min-width: 25%;

  max-height: 100%;

  height: 250px;

  min-height: 25%;


  resize: vertical;
  overflow: auto;

  padding: 10px 20px;
  margin: 2px 0px;


}

JavaScript

function strip() {
  var text = document.getElementById('textarea').innerText;
	console.log(text);
  //div.innertext = div;
  document.getElementById('textarea').innerText = text;

}

window.onload = (event) => {
  strip();
};