I am trying to make it so that when a user presses a button after inputing text inside a content editable area it will paste it to another div based on what the user inputed in the contenteditable field. The function will paste based on each individual line the user inputs.
Below is the code provided and a picture of an example of how I want the outcome. Currently when the button is pressed it gives an output of [object Object]. Any help would be great. Thanks!
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
<meta charset="UTF-8">
<title> VERO Filter Program</title>
</head>
<body>
<div id="pbf-container">
<div class="pbf-header">
<h1> VERO Filter Program </h1>
<h3> Input Links Here </h3>
</div>
<div class="pbf-link-container" contenteditable="true">
</div>
<div class="pbf-button-control">
<button id="pbf-filter"> Filter </button>
</div>
<div class="pbf-link-output">
</div>
</div>
<script>
var $pbfOutput = $('.pbf-link-container[contenteditable]');
$('#pbf-filter').click(function(){
$('.pbf-link-output').text($pbfOutput);
});
</script>
</body>
</html>
Here is the css
/* DIV class and ID's */
#pbf-container {
display: block;
width: 1080px;
margin: 0 auto;
background-color: #333;
padding: 3%;
}
.pbf-header {
text-align: center;
}
.pbf-link-container {
width: 1080px;
min-height: 300px;
background-color: #f8f8f8;
font-size: 20px;
font-family: 'Lato', sans-serif;
}
.pbf-button-control {
text-align: center;
padding: 2%;
}
.pbf-link-output {
font-family: 'Lato', sans-serif;
font-size: 20px;
color: #fff;
}