Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

contenteditable paste plain text

editor.addEventListener("paste", function(e) {
    // cancel paste
    e.preventDefault();

    // get text representation of clipboard
    var text = (e.originalEvent || e).clipboardData.getData('text/plain');

    // insert text manually
    document.execCommand("insertHTML", false, text);
});
Comment

PREVIOUS NEXT
Code Example
Javascript :: jquery validation manually trigger 
Javascript :: react native android padding style 
Javascript :: set data-id javascript 
Javascript :: multiple records in json 
Javascript :: discord.js send message to a given channel 
Javascript :: json typicode 
Javascript :: react font awesome 
Javascript :: What is data modeling in MongoDB 
Javascript :: vuejs get the url params withour router 
Javascript :: angular toaster 
Javascript :: js array two dimensional 
Javascript :: js get random from array 
Javascript :: check checkbox based on value using jquery 
Javascript :: upload file in react 
Javascript :: how to change user password firebase 
Javascript :: remove url from string javascript 
Javascript :: imdb-api 
Javascript :: .children javascript 
Javascript :: trim string after - in jquery 
Javascript :: jquery get display value 
Javascript :: convert date format from yyyy-mm-dd to dd-mm-yyyy using value javascript 
Javascript :: json-server npm 
Javascript :: queryselector name attribute 
Javascript :: convert array to number js 
Javascript :: regular expression for thousand separator 
Javascript :: sort object array javascript 
Javascript :: typed.js 
Javascript :: react conditionally disable button 
Javascript :: remove item from array in jquery 
Javascript :: local storege in jquery 
ADD CONTENT
Topic
Content
Source link
Name
3+7 =