Search
 
SCRIPT & CODE EXAMPLE
 

HTML

div content editable

<div contenteditable="true">
  This text can be edited by the user.
</div>
Comment

content editable

<p contenteditable="true">
  Hello
</p>


Comment

content editable

var content = document.querySelector('[contenteditable]');

// 1. Listen for changes of the contenteditable element
content.addEventListener('input', function(event) {
  // 2. Retrive the text from inside the element
  console.log(content.innerHTML);
});
Comment

PREVIOUS NEXT
Code Example
Html :: how to collect input textbox in html 
Html :: how to turn html5 picturee into link 
Html :: What is the correct HTML element for playing audio files? 
Html :: how to make website 
Html :: dropdown content left 
Html :: call javascript function from a tag 
Html :: markdown summary details 
Html :: tailwind css text wrap 
Html :: asp net mvc 5 add logo to navbar 
Html :: ai writer 
Html :: coloring and size of text in html 
Html :: bootstrap 5 accordion 
Html :: html always show scrollbar 
Html :: hide first option in select 
Html :: how to add active class to current element javascript 
Html :: js download File object 
Html :: bootstrap alert 
Html :: show spinner during API request pure html and jquery 
Html :: how to make text uppercase html 
Html :: html basic template 
Html :: html pallete 
Html :: link in md 
Html :: javascript how to set a textbox value to nothing 
Html :: html login and registration form 
Html :: Horizontal Scrolling Bopostrap 
Html :: color de las letras en html 
Html :: html button click scroll to div 
Html :: allow multiple select on radio button in html 
Html :: how to add video in html 
Html :: bold font html 
ADD CONTENT
Topic
Content
Source link
Name
5+2 =