Skip to content
Snippets Groups Projects
Commit d5e2e9a7 authored by Andy C's avatar Andy C
Browse files

Added sync button

parent e05e6343
No related branches found
No related tags found
No related merge requests found
......@@ -8,9 +8,16 @@ html, body{
height: 90%;
}
#input-div, #output-div{
height: 95%;
width: 45%;
display: block;
}
#update-code-div {
height: 90%;
width: 48%;
width: 5%;
display: block;
float:left;
text-align: center;
}
#input-div{
float: left;
......
......@@ -46,6 +46,9 @@
</div>
<div id="input-textarea" autocomplete="off" contenteditable="true" aria-labelledby="input-header"></div>
</div>
<div id="update-code-div">
<button id="update-code"><i class="fas fa-exchange-alt"></i></button>
</div>
<div id="output-div">
<h2 id="output-header">Ready-to-go output!</h2>
<div id="output-pre" aria-labelledby="output-header">
......
......@@ -6,6 +6,9 @@ $(document).ready(function () {
$('#input-textarea').val('');
$('#input-textarea').on('input propertychange', function () {
//console.log('Alteration!')
});
$('#update-code').click(function(){
$('#output-pre').text($('#input-textarea').html());
});
var buttonList = [
......@@ -16,6 +19,8 @@ $(document).ready(function () {
'id': 'bold',
'title': 'Bold',
'onclick': function () {
let selectedtext = window.getSelection().toString();
document.execCommand('bold', false, '');
return true;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment