Couldn't Understand the way your editor behave
Considering that you want to save the text on one button click & display the test latter on
add the below button to you html on click of this button your editor content would be saved in a variable and editor will be blank
<input type='button' style="position: absolute; left: 20%; bottom: 2%;" id='save' value="Save"/>
Onclick of the below button the saved content would be displayed back
<button type= "button" style="position: absolute; left: 25%; bottom: 2%;" id="editortxt" >Show editor text
</button>
<script type='text/javascript'>
var StoreEditorContent; //declare a variable to save Content
document.getElementById('save').addEventListener("click", SaveText); // adding event listner for onclick for Saving text
function SaveText(){
StoreEditorContent = document.getElementById('editor').innerHTML; // Save the Content into
document.getElementById('editor').innerHTML = ""; // to blank the editor Content
}
document.getElementById('editortxt').addEventListener("click", ShowText); // adding event listner for onclick for Saving text
function ShowText(){
document.getElementById('editor').innerHTML = StoreEditorContent ; // Display the Content into editor
}
</script>